public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58990] New: G++ generates duplicate labels for linux 32-bit when optimization+LFS is enabled
@ 2013-11-04 21:13 novulae at hotmail dot com
  2013-11-04 21:57 ` [Bug c++/58990] " hjl.tools at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: novulae at hotmail dot com @ 2013-11-04 21:13 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-11-10 21:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).