Consistent bugs with dmd -O -inline in a large project
Peter Alexander via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 16 03:25:10 PDT 2014
On Thursday, 16 October 2014 at 08:45:18 UTC, Chris wrote:
> I think there is no easy way of finding out where the
> optimization goes wrong. But should this happen at all, i.e.
> does it point to a flaw in my program or is it a compiler bug?
> I like to think it's the latter, after all the program works
> perfectly without -O. On the other hand, it's scary because I
> have no clue where to look for the offender.
It could be either.
Sometimes, if you program relies on undefined behaviour, enabling
optimizations might be what uncovers the bug, and manifest as a
crash.
On the other hand, it could be just a compiler bug. It has
happened several times to me with DMD, so it's not entirely
unlikely. These things happen.
Run Dustmite, reduce, and if you still think you're program is
right, file a bug against DMD.
More information about the Digitalmars-d
mailing list