[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/14608] New: --detect-odr-violations doesn't work with GCC 4.7
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug gold/14608] New: --detect-odr-violations doesn't work with GCC 4.7 |
Date: |
Sat, 22 Sep 2012 15:08:52 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=14608
Bug #: 14608
Summary: --detect-odr-violations doesn't work with GCC 4.7
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: gold
AssignedTo: address@hidden
ReportedBy: address@hidden
CC: address@hidden
Classification: Unclassified
On Linux/ia32, with GCC 4.7, I got
address@hidden testsuite]$ /usr/gcc-4.7.1/bin/g++ -W -Wall -Werror
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -o
debug_msg_so.err -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_so
debug_msg.so odr_violation1.so odr_violation2.so
gcctestdir/ld: warning: while linking debug_msg_so: symbol
'Ordering::operator()(int, int)' defined in multiple places (possible ODR
violation):
/net/gnu-6/export/gnu/import/git/binutils/gold/testsuite/odr_violation1.cc:6
from odr_violation1.so
/net/gnu-6/export/gnu/import/git/binutils/gold/testsuite/odr_violation2.cc:12
from odr_violation2.so
debug_msg.so: error: undefined reference to 'undef_int'
debug_msg.so: error: undefined reference to 'undef_float'
debug_msg.so: error: undefined reference to 'undef_fn1()'
debug_msg.so: error: undefined reference to 'undef_fn2()'
collect2: error: ld returned 1 exit status
address@hidden testsuite]$
FAIL: debug_msg.sh
It passed with GCC 4.2:
address@hidden testsuite]$ /usr/gcc-4.2/bin/g++ -W -Wall -Werror
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -o
debug_msg_so.err -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_so
debug_msg.so odr_violation1.so odr_violation2.so
gcctestdir/ld: warning: while linking debug_msg_so: symbol
'SometimesInlineFunction(int)' defined in multiple places (possible ODR
violation):
/net/gnu-6/export/gnu/import/git/binutils/gold/testsuite/odr_violation2.cc:27
from odr_violation2.so
/net/gnu-6/export/gnu/import/git/binutils/gold/testsuite/debug_msg.cc:68 from
debug_msg.so
gcctestdir/ld: warning: while linking debug_msg_so: symbol
'Ordering::operator()(int, int)' defined in multiple places (possible ODR
violation):
/net/gnu-6/export/gnu/import/git/binutils/gold/testsuite/odr_violation2.cc:12
from odr_violation2.so
/net/gnu-6/export/gnu/import/git/binutils/gold/testsuite/odr_violation1.cc:6
from odr_violation1.so
debug_msg.so: error: undefined reference to 'undef_fn1()'
debug_msg.so: error: undefined reference to 'undef_fn2()'
debug_msg.so: error: undefined reference to 'undef_int'
collect2: ld returned 1 exit status
address@hidden testsuite]$
Linux/x86-64 is OK.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
- [Bug gold/14608] New: --detect-odr-violations doesn't work with GCC 4.7,
hjl.tools at gmail dot com <=