Consistent bugs with dmd -O -inline in a large project

Lumi Pakkanen via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 12 08:44:13 PDT 2014


I'm creating a somewhat large hobby project with D. I'm enjoying 
the ride so far. Unit tests and contract programming have saved 
me from long bug hunts, but today I ran into a bug that seems to 
be caused by the -O and -inline flags with dmd.

Without the flags the program runs correctly, but -O produces 
wrong results consistently and -inline seems to cause memory 
corruption.

Now my problem here is that the program has over 5000 lines of 
code with interdependencies running everywhere so I'm not sure if 
it's possible to come up with a neat small program that 
demonstrates the problem for a bug report.

What should I do? Am I stuck with not using -O and -inline for 
now, hoping that things will improve in the future?


More information about the Digitalmars-d mailing list