DMD buggy optimizing

Dave Dave_member at pathlink.com
Sun Apr 23 18:40:52 PDT 2006


Craig Black wrote:
> "Dave" <Dave_member at pathlink.com> wrote in message 
> news:e2apq1$2uo7$1 at digitaldaemon.com...
>> Michael wrote:
>>> Is it possible to mark a certain section of code as not optimizing? My 
>>> program
>>> works fine in debug mode but then when I use the release build it refuses 
>>> to
>>> work, and there is no way for me to debug it either.
>>>
>>> If we could mark a certain section of code as "dont optimize" then this 
>>> would
>>> solve the problem. I know rougly where the problem is, but not exactly.
>>>
>> You really need to provide more info. than that... Compiler switches, post 
>> some code showing exactly where it quits working or ideally isolate the 
>> problem down to as few lines of code as you can, etc.
> 
> Yes, but who knows when Walter will get around to fixing it?  Compler 
> optimization is by nature complex and error prone.  I think being able to 
> selectively optimize is a good idea.  This will allow us to identify 
> optimization bugs more easily.
> 
> -Craig 
> 

Yea, but that could substantially increase the complexity of the
compiler and cause more bugs, not to mention how I'd hate to maintain D
code marked up by all those "pragma-like" things, remove one, retest,
remove another, retest, etc... <g>

And IMO Walter is better at fixing that sort of thing than any compiler 
vendor I've seen.

I guess I assumed that what the OP really needed was help with the 
program source code (I've done this myself where I could swear a 
compiler switch was buggy only to find it was my code).

IMHO, the burden-of-proof would be on the person reporting a bug
before they assume that it is a buggy compiler switch ;)

- Dave



More information about the Digitalmars-d mailing list