public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/53442] New: llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0
@ 2012-05-21 20:56 ncahill_alt at yahoo dot com
  2012-05-21 20:57 ` [Bug regression/53442] " ncahill_alt at yahoo dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ncahill_alt at yahoo dot com @ 2012-05-21 20:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53442

             Bug #: 53442
           Summary: llvm 2.9 tblgen executable possibly miscompiled with
                    gcc 4.7.0
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ncahill_alt@yahoo.com


This is a most complex problem, but an executable fails with gcc 4.7.0, giving
a segmentation fault.  But when linked with gcc 4.5.3, it works.  I say linked
because the same object files are involved, only the version of gcc for linking
changes.

It does appear the problem is with the executable itself, but it is so complex
that I am unable to generate a test case.  My suggestion to anyone trying to
reproduce this is to get a source release of llvm-2.9 for 32-bit x86, and if it
builds successfully, problem solved.  I give the configure command for the
package below.  This is not a bug yet, but a reported, possible bug occurrence,
and it may be that it happens elsewhere.  

In case this turns out to be something, I wanted it to be noted for now.

It occurs with the Release/bin/tblgen executable, which is generated in the
build process, and the error occurs after this line of output: Building
Intrinsics.gen.tmp from Intrinsics.td.

Thank you.
Neil.



The package was configured the package as follows:

configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
--sysconfdir=/etc --localstatedir=/var/lib --enable-shared
--with-optimize-option= --enable-optimized --disable-assertions
--disable-expensive-checks --enable-targets=host-only
--with-llvmgccdir=/dev/null --with-llvmgcc=nope --with-llvmgxx=nope
--enable-bindings=none --enable-libffi


gcc -v...

Using built-in specs.
COLLECT_GCC=/usr/i686-pc-linux-gnu/gcc-bin/4.7.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-linux-gnu/4.7.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.7.0/configure --disable-bootstrap --disable-libada
--disable-ld --disable-gold --enable-lto --enable-libssp
--enable-cloog-backend=isl --without-cloog --prefix=/usr
--bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.7.0
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.7.0/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.7.0
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.7.0/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.7.0/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.7.0/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-ppl --enable-nls --without-included-gettext
--with-system-zlib --disable-werror --enable-secureplt --disable-multilib
--enable-libmudflap --disable-libgomp
--with-python-dir=/share/gcc-data/i686-pc-linux-gnu/4.7.0/python
--enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran,lto
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/
Thread model: posix
gcc version 4.7.0 (GCC)


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

* [Bug regression/53442] llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0
  2012-05-21 20:56 [Bug regression/53442] New: llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0 ncahill_alt at yahoo dot com
@ 2012-05-21 20:57 ` ncahill_alt at yahoo dot com
  2012-05-21 21:07 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ncahill_alt at yahoo dot com @ 2012-05-21 20:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53442

--- Comment #1 from ncahill_alt at yahoo dot com 2012-05-21 19:52:57 UTC ---
In case it is of interest, here is the generating command for the tblgen
executable.  I don't know how to turn this into a test case as it seems to use
only pregenerated code.


i686-pc-linux-gnu-g++ -I/var/altsrc/buildllvm/include
-I/var/altsrc/buildllvm/utils/TableGen -I/var/altsrc/llvm-2.9/include
-I/var/altsrc/llvm-2.9/utils/TableGen  -DNDEBUG -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS   -fPIC -Woverloaded-virtual
-Wcast-qual   -Wl,-R -Wl,'$ORIGIN/../lib' -Wl,-R -Wl,/usr/lib/llvm 
-L/var/altsrc/buildllvm/Release/lib -L/var/altsrc/buildllvm/Release/lib
-Wl,--version-script=/var/altsrc/llvm-2.9/autoconf/ExportMap.map
-Wl,-O1,--as-needed   -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter
-Wwrite-strings   -o /var/altsrc/buildllvm/Release/bin/tblgen 
/var/altsrc/buildllvm/utils/TableGen/Release/ARMDecoderEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/AsmMatcherEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/AsmWriterEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/AsmWriterInst.o
/var/altsrc/buildllvm/utils/TableGen/Release/CallingConvEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/ClangASTNodesEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/ClangAttrEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/ClangDiagnosticsEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/ClangSACheckersEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/CodeEmitterGen.o
/var/altsrc/buildllvm/utils/TableGen/Release/CodeGenDAGPatterns.o
/var/altsrc/buildllvm/utils/TableGen/Release/CodeGenInstruction.o
/var/altsrc/buildllvm/utils/TableGen/Release/CodeGenTarget.o
/var/altsrc/buildllvm/utils/TableGen/Release/DAGISelEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/DAGISelMatcher.o
/var/altsrc/buildllvm/utils/TableGen/Release/DAGISelMatcherEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/DAGISelMatcherGen.o
/var/altsrc/buildllvm/utils/TableGen/Release/DAGISelMatcherOpt.o
/var/altsrc/buildllvm/utils/TableGen/Release/DisassemblerEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/EDEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/FastISelEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/FixedLenDecoderEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/InstrEnumEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/InstrInfoEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/IntrinsicEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/LLVMCConfigurationEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/NeonEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/OptParserEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/Record.o
/var/altsrc/buildllvm/utils/TableGen/Release/RegisterInfoEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/StringMatcher.o
/var/altsrc/buildllvm/utils/TableGen/Release/SubtargetEmitter.o
/var/altsrc/buildllvm/utils/TableGen/Release/TGLexer.o
/var/altsrc/buildllvm/utils/TableGen/Release/TGParser.o
/var/altsrc/buildllvm/utils/TableGen/Release/TGValueTypes.o
/var/altsrc/buildllvm/utils/TableGen/Release/TableGen.o
/var/altsrc/buildllvm/utils/TableGen/Release/TableGenBackend.o
/var/altsrc/buildllvm/utils/TableGen/Release/X86DisassemblerTables.o
/var/altsrc/buildllvm/utils/TableGen/Release/X86RecognizableInstr.o
-lLLVMSupport -lpthread -lffi -ldl -lm


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

* [Bug regression/53442] llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0
  2012-05-21 20:56 [Bug regression/53442] New: llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0 ncahill_alt at yahoo dot com
  2012-05-21 20:57 ` [Bug regression/53442] " ncahill_alt at yahoo dot com
@ 2012-05-21 21:07 ` pinskia at gcc dot gnu.org
  2012-05-21 23:45 ` steven at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-21 21:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53442

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-21 21:05:08 UTC ---
The last time I looked at a bug from clang/llvm, the issue was it was using a
temporary variable pasted the scope.


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

* [Bug regression/53442] llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0
  2012-05-21 20:56 [Bug regression/53442] New: llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0 ncahill_alt at yahoo dot com
  2012-05-21 20:57 ` [Bug regression/53442] " ncahill_alt at yahoo dot com
  2012-05-21 21:07 ` pinskia at gcc dot gnu.org
@ 2012-05-21 23:45 ` steven at gcc dot gnu.org
  2012-05-22  5:38 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: steven at gcc dot gnu.org @ 2012-05-21 23:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53442

--- Comment #3 from Steven Bosscher <steven at gcc dot gnu.org> 2012-05-21 22:32:38 UTC ---
Have you compared the linker command lines (using gcc -v)?


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

* [Bug regression/53442] llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0
  2012-05-21 20:56 [Bug regression/53442] New: llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0 ncahill_alt at yahoo dot com
                   ` (2 preceding siblings ...)
  2012-05-21 23:45 ` steven at gcc dot gnu.org
@ 2012-05-22  5:38 ` pinskia at gcc dot gnu.org
  2012-05-22 18:34 ` ncahill_alt at yahoo dot com
  2012-05-22 19:51 ` ncahill_alt at yahoo dot com
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-22  5:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53442

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-05-22
     Ever Confirmed|0                           |1

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-22 05:37:45 UTC ---
Can you at least figure out which source file is being miscompiled?  If so can
you attach the preprocessed source for that source file?


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

* [Bug regression/53442] llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0
  2012-05-21 20:56 [Bug regression/53442] New: llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0 ncahill_alt at yahoo dot com
                   ` (3 preceding siblings ...)
  2012-05-22  5:38 ` pinskia at gcc dot gnu.org
@ 2012-05-22 18:34 ` ncahill_alt at yahoo dot com
  2012-05-22 19:51 ` ncahill_alt at yahoo dot com
  5 siblings, 0 replies; 7+ messages in thread
From: ncahill_alt at yahoo dot com @ 2012-05-22 18:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53442

--- Comment #5 from ncahill_alt at yahoo dot com 2012-05-22 18:22:09 UTC ---
By comparing the linker commands, I've found that replacing crtbegin.o and
crtend.o is sufficient to fix the problem.  I've built parts of gcc with -flto
and I suspect there was a mismatch between those crt.o files and libgcc_s.so
possibly, I must be more careful.

With a newly built gcc 4.7.0, I'll just see if this builds correctly.


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

* [Bug regression/53442] llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0
  2012-05-21 20:56 [Bug regression/53442] New: llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0 ncahill_alt at yahoo dot com
                   ` (4 preceding siblings ...)
  2012-05-22 18:34 ` ncahill_alt at yahoo dot com
@ 2012-05-22 19:51 ` ncahill_alt at yahoo dot com
  5 siblings, 0 replies; 7+ messages in thread
From: ncahill_alt at yahoo dot com @ 2012-05-22 19:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53442

ncahill_alt at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |INVALID

--- Comment #6 from ncahill_alt at yahoo dot com 2012-05-22 19:07:50 UTC ---
Sorry, false alarm.  This now works fine.  A simple typing error was the
ultimate cause.

Please ignore, thank you.
Neil.


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

end of thread, other threads:[~2012-05-22 19:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-21 20:56 [Bug regression/53442] New: llvm 2.9 tblgen executable possibly miscompiled with gcc 4.7.0 ncahill_alt at yahoo dot com
2012-05-21 20:57 ` [Bug regression/53442] " ncahill_alt at yahoo dot com
2012-05-21 21:07 ` pinskia at gcc dot gnu.org
2012-05-21 23:45 ` steven at gcc dot gnu.org
2012-05-22  5:38 ` pinskia at gcc dot gnu.org
2012-05-22 18:34 ` ncahill_alt at yahoo dot com
2012-05-22 19:51 ` ncahill_alt at yahoo dot com

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).