[Issue 14979] New: [REG2.068] Wrong tempCString result on x64 with ternary operator
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Aug 29 19:05:10 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14979
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 at puremagic.com
Reporter: thecybershadow at gmail.com
////////////////////// test.d /////////////////////
enum testStr = "Hello, beautiful world!";
void funA(const char* node)
{
import core.stdc.string;
assert(strcmp(node, testStr)==0);
}
unittest
{
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?
--
More information about the Digitalmars-d-bugs
mailing list