[Issue 12862] New: [ICE] backend assertion (Internal error: backend/cg87.c 331) with inline, optimizing and floats
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jun 5 18:28:03 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12862
Issue ID: 12862
Summary: [ICE] backend assertion (Internal error:
backend/cg87.c 331) with inline, optimizing and floats
Product: D
Version: unspecified
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: ice, ice-on-valid-code
Severity: enhancement
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: code at dawg.eu
cat > bug.d << CODE
struct FRect
{
float left, top, right, bottom;
}
void formatValue(float obj)
{
static void byRef(ref float a) {}
byRef(obj);
}
void formatValue(FRect val)
{
formatValue(val.left);
formatValue(val.top);
}
struct Foo
{
void bug()
{
formatValue(bounds);
}
@property FRect bounds()
{
if (&this !is null)
return FRect();
else
return FRect();
}
}
CODE
dmd -c -O -inline bug.d
----
Internal error: backend/cg87.c 331
----
The assertion is in
STATIC code * makesure87(elem *e,unsigned offset,int i,unsigned flag)
assert(_8087elems[i].e == NULL);
Debug output for the assertion is
_8087elems[0].e = 0x1050968, .offset = 8
Looks like a place in the floating point stack is still occupied by some older
value. No idea how to fix this though.
--
More information about the Digitalmars-d-bugs
mailing list