www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14979] New: [REG2.068] Wrong tempCString result on x64 with


          Issue ID: 14979
           Summary: [REG2.068] Wrong tempCString result on x64 with
                    ternary operator
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

////////////////////// test.d /////////////////////
enum testStr = "Hello, beautiful world!";

void funA(const char* node)
    import core.stdc.string;
    assert(strcmp(node, testStr)==0);

    string node = testStr;
    import std.internal.cstring;
    funA(node is null ? null : node.tempCString());

Introduced in https://github.com/D-Programming-Language/phobos/pull/3415/files

Happens only on x64, perhaps this is a codegen bug?

Aug 29 2015