[Issue 14459] String literal merge bug causes incorrect runtime program behavior

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Aug 6 10:05:43 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14459

--- Comment #7 from Kenji Hara <k.hara.pg at gmail.com> ---
I think it's clearly a bug. Because:

1. The identiry of the string literal is saved into a variable, then copied to
one another variable. The two pointer variables comparison must match.
2. But the excessive front end 'optimization' didn't save the identity. It's a
problem.

A point is the variable s0 is a stack allocated variable. Its value is
evaluated and determined at runtime. The optimization wrongly beyond the
compile time/runtime evaluation boundary.

--


More information about the Digitalmars-d-bugs mailing list