* [Bug c++/58990] G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled
2013-11-04 21:13 [Bug c++/58990] New: G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled novulae at hotmail dot com
@ 2013-11-04 21:57 ` hjl.tools at gmail dot com
2013-11-04 22:06 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-04 21:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58990
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
Works for me with gcc 4.8.2 from Fedora 19:
[hjl@gnu-29 tmp]$ cat x.cc
#include <sys/stat.h>
#include <stdint.h>
void *foo(bool var) {
if (var) return (void*)(intptr_t)&stat;
return (void*)(intptr_t)&stat64;
}
[hjl@gnu-29 tmp]$ g++ -O1 -D_FILE_OFFSET_BITS=64 -c x.cc
[hjl@gnu-29 tmp]$ uname -a
Linux gnu-29.sc.intel.com 3.11.6-201.0.fc19.i686.PAE #1 SMP Sun Nov 3 12:14:57
PST 2013 i686 i686 i386 GNU/Linux
[hjl@gnu-29 tmp]$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.8.2/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin
--enable-initfini-array --enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-isl=/builddir/build/BUILD/gcc-4.8.2-20131017/obj-i686-redhat-linux/isl-install
--with-cloog=/builddir/build/BUILD/gcc-4.8.2-20131017/obj-i686-redhat-linux/cloog-install
--with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.8.2 20131017 (Red Hat 4.8.2-1) (GCC)
[hjl@gnu-29 tmp]$
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58990] G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled
2013-11-04 21:13 [Bug c++/58990] New: G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled novulae at hotmail dot com
2013-11-04 21:57 ` [Bug c++/58990] " hjl.tools at gmail dot com
@ 2013-11-04 22:06 ` pinskia at gcc dot gnu.org
2013-11-05 16:12 ` novulae at hotmail dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-11-04 22:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58990
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2013-11-04
Ever confirmed|0 |1
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you attach the preprocessed source? It might be a bug in the glibc
headers.http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58990#
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58990] G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled
2013-11-04 21:13 [Bug c++/58990] New: G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled novulae at hotmail dot com
2013-11-04 21:57 ` [Bug c++/58990] " hjl.tools at gmail dot com
2013-11-04 22:06 ` pinskia at gcc dot gnu.org
@ 2013-11-05 16:12 ` novulae at hotmail dot com
2013-11-05 16:13 ` novulae at hotmail dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: novulae at hotmail dot com @ 2013-11-05 16:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58990
--- Comment #3 from Caleb Sunstrum <novulae at hotmail dot com> ---
Created attachment 31160
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31160&action=edit
Preprocessed source with -O1 -D_FILE_OFFSET_BITS=64
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58990] G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled
2013-11-04 21:13 [Bug c++/58990] New: G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled novulae at hotmail dot com
` (2 preceding siblings ...)
2013-11-05 16:12 ` novulae at hotmail dot com
@ 2013-11-05 16:13 ` novulae at hotmail dot com
2013-11-05 16:13 ` novulae at hotmail dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: novulae at hotmail dot com @ 2013-11-05 16:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58990
--- Comment #4 from Caleb Sunstrum <novulae at hotmail dot com> ---
Created attachment 31161
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31161&action=edit
Preprocessed source with -D_FILE_OFFSET_BITS=64
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58990] G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled
2013-11-04 21:13 [Bug c++/58990] New: G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled novulae at hotmail dot com
` (3 preceding siblings ...)
2013-11-05 16:13 ` novulae at hotmail dot com
@ 2013-11-05 16:13 ` novulae at hotmail dot com
2013-11-05 16:14 ` novulae at hotmail dot com
2013-11-10 21:07 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: novulae at hotmail dot com @ 2013-11-05 16:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58990
--- Comment #5 from Caleb Sunstrum <novulae at hotmail dot com> ---
I've attached preprocessed source with and without -O1 on the command line. The
latter compiles, the former does not.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58990] G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled
2013-11-04 21:13 [Bug c++/58990] New: G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled novulae at hotmail dot com
` (4 preceding siblings ...)
2013-11-05 16:13 ` novulae at hotmail dot com
@ 2013-11-05 16:14 ` novulae at hotmail dot com
2013-11-10 21:07 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: novulae at hotmail dot com @ 2013-11-05 16:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58990
--- Comment #6 from Caleb Sunstrum <novulae at hotmail dot com> ---
glibc on the system looks to be 2.9.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/58990] G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled
2013-11-04 21:13 [Bug c++/58990] New: G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled novulae at hotmail dot com
` (5 preceding siblings ...)
2013-11-05 16:14 ` novulae at hotmail dot com
@ 2013-11-10 21:07 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-11-10 21:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58990
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |INVALID
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The issue is simple, GCC is generating the correct assembly. The problem is
C++ defines extern inline differently from GNU C90 and more like C99's extern
inline. We had a way to fix up the header files for this specific issue but it
looks like it is not happening for your version of glibc or rather the fixed up
headers are not being used as the package installer did not do that which means
this is a bug in your distro's binary package and should be reported to them.
^ permalink raw reply [flat|nested] 8+ messages in thread