[Issue 18534] Wrong code for ?: operator when compiling with -O

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 27 20:11:59 UTC 2018


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

ag0aep6g at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0aep6g at gmail.com

--- Comment #1 from ag0aep6g at gmail.com ---
Reduced Phobos away:

----
void f(char x) {}
void foo(int invert)
{
    char c = invert ? 'A' : 'A';
    f(c);
    assert(c == 'A'); // assertion fails
}
void main()
{
    foo(0);
}
----

--


More information about the Digitalmars-d-bugs mailing list