[Issue 6599] ICE(constfold.c) On use of invalid expression as a compile-time initializer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 7 00:04:15 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6599


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #2 from Don <clugdbug at yahoo.com.au> 2011-09-07 00:04:01 PDT ---
(In reply to comment #1)
> That's a strange place to get the error.  I get an AV at constfold.c:1396.
> 
> CatExp::optimize calls :optimize on fileProtocol (which does nothing) then
> passes it along to Cat, which crashes trying to access fileProtocol's type.
> 
> It seems to happen for all operators:
[snip] 
> It is probably invalid to assume e->type has been set inside Cat and other
> constfold functions.

No, it's valid. Those functions should only be called after the semantic pass
was completed successfully on the expression. This is yet another gagging
system bug.

Repository is forward referenced from Orbit. Semantic is run on Repository with
errors gagged. This semantic pass fails, but leaves Repository's members in an
invalid state.
If you move Orbit after Repository, you see the correct error messages.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list