dmd -O causes incorrect output
H. S. Teoh
hsteoh at quickfur.ath.cx
Mon Jan 25 18:19:24 UTC 2021
On Mon, Jan 25, 2021 at 06:07:46PM +0000, Saurabh Das via Digitalmars-d-learn wrote:
> I'm seeing what appears to be a bug with the -O flag in dmd.
[...]
> The assert trips when run with "rdmd -O test.d" and it does not trip
> when run with "rdmd test.d".
It's probably a bug. File a bug on bugzilla: https://issues.dlang.org
> This bug is observed in all compiler versions from dmd-2.060 through
> to dmd-2.095! Please shed some light on the issue – any help would be
> greatly appreciated.
[...]
DMD's backend is known to have obscure bugs that crop up every so often.
If this issue is being a showstopper, consider switching to LDC or GDC
instead. (You might want to try the same code with LDC/GDC anyway, just
to see whether they have the same problem. My guess is they don't.)
T
--
People demand freedom of speech to make up for the freedom of thought which they avoid. -- Soren Aabye Kierkegaard (1813-1855)
More information about the Digitalmars-d-learn
mailing list