This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58990] New: G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled
- From: "novulae at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Nov 2013 21:11:29 +0000
- Subject: [Bug c++/58990] New: G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58990
Bug ID: 58990
Summary: G++ generates duplicate labels for linux 32-bit when
optimization+LFS is enabled
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: novulae at hotmail dot com
GCC 4.4.5 compiles this code without issue, GCC 4.6.0 produces the below error,
as does GCC 4.8.0. This happens on linux 32-bit, but not 64-bit. I haven't
tried to see if g++ -m32 has the same issue when on linux 64-bit.
$ cat test.cpp
#include <sys/stat.h>
#include <stdint.h>
void *foo(bool var) {
if (var) return (void*)(intptr_t)&stat;
return (void*)(intptr_t)&stat64;
}
$ g++ -O1 -D_FILE_OFFSET_BITS=64 -c test.cpp
/tmp/ccI8JqrP.s: Assembler messages:
/tmp/ccI8JqrP.s:22: Error: symbol `stat64' is already defined
$ uname -rvmop
2.6.32-131.0.15.el6.i686 #1 SMP Tue May 10 15:42:28 EDT 2011 i686 i686
GNU/Linux