[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/16650] New: PREVAILING_DEF / PREVAILING_DEF_IRONLY_EXP mix-up
From: |
markus at trippelsdorf dot de |
Subject: |
[Bug gold/16650] New: PREVAILING_DEF / PREVAILING_DEF_IRONLY_EXP mix-up |
Date: |
Mon, 03 Mar 2014 07:55:16 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=16650
Bug ID: 16650
Summary: PREVAILING_DEF / PREVAILING_DEF_IRONLY_EXP mix-up
Product: binutils
Version: 2.25 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gold
Assignee: ian at airs dot com
Reporter: markus at trippelsdorf dot de
CC: ccoutant at google dot com
With the following file from the gcc test-suite:
address@hidden tmp % cat 20090302_0.C
struct Foo {
bool Mumble();
static void Bar() { if (foo_->Mumble()) foo_ = 0; }
static void Baz() { Bar(); }
static Foo *foo_;
};
void Unused() { Foo::Bar(); Foo::Baz(); }
I get with gold:
address@hidden tmp % ld -v
GNU gold (GNU Binutils 2.24.51.20140218) 1.11
address@hidden tmp % g++ --save-temps -fPIC -flto -r -nostdlib 20090302_0.C
address@hidden tmp % cat 20090302_0.res
1
20090302_0.o 5
181 aadbdfab9720df19 PREVAILING_DEF _ZN3Foo3BarEv
184 aadbdfab9720df19 PREVAILING_DEF _ZN3Foo3BazEv
187 aadbdfab9720df19 PREVAILING_DEF _Z6Unusedv
203 aadbdfab9720df19 UNDEF _ZN3Foo4foo_E
200 aadbdfab9720df19 UNDEF _ZN3Foo6MumbleEv
ld.bfd gives the correct resolution:
address@hidden tmp % ld -v
GNU ld (GNU Binutils) 2.24.51.20140218
address@hidden tmp % g++ --save-temps -fPIC -flto -r -nostdlib 20090302_0.C
address@hidden tmp % cat 20090302_0.res
1
20090302_0.o 5
181 5195e340d5f136e PREVAILING_DEF_IRONLY_EXP _ZN3Foo3BarEv
184 5195e340d5f136e PREVAILING_DEF_IRONLY_EXP _ZN3Foo3BazEv
187 5195e340d5f136e PREVAILING_DEF_IRONLY_EXP _Z6Unusedv
203 5195e340d5f136e UNDEF _ZN3Foo4foo_E
200 5195e340d5f136e UNDEF _ZN3Foo6MumbleEv
The PREVAILING_DEF resolution (instead of PREVAILING_DEF_IRONLY_EXP) that gold
produces leads to missed optimizations in gcc.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gold/16650] New: PREVAILING_DEF / PREVAILING_DEF_IRONLY_EXP mix-up,
markus at trippelsdorf dot de <=