Bug 38100

Summary: gcc fails to compile with (undefined symbol) gimple_check_failed error
Product: gcc Reporter: Kamaraju Kusumanchi <kamaraju>
Component: bootstrapAssignee: Jakub Jelinek <jakub>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs
Priority: P3    
Version: unknown   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2008-11-13 08:46:52
Attachments: gcc44-pr38100.patch

Description Kamaraju Kusumanchi 2008-11-13 00:13:55 UTC
The weekly snapshot (dated 20081107) of gcc 4.4 fails to compile on a Sun
Solaris machine with the following errors.

cc  -g -DIN_GCC    -DHAVE_CONFIG_H  -o cc1-dummy c-lang.o stub-objc.o
attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o
c-convert.o c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o
c-ppoutput.o c-cppbuiltin.o c-objc-common.o c-dump.o c-pch.o
c-parser.o sol2-c.o c-gimplify.o tree-mudflap.o c-pretty-print.o
c-omp.o dummy-checksum.o \
         main.o tree-browser.o libbackend.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a ../libcpp/libcpp.a ./../intl/libintl.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lmpfr -lgmp
-lmpfr -lgmp
ild: (undefined symbol) gimple_check_failed -- referenced in the text
segment of libbackend.a(tree-ssa-loop-unswitch.o)
ild: (undefined symbol) gimple_check_failed -- referenced in the text
segment of libbackend.a(tree-ssa-loop-prefetch.o)
ild: (undefined symbol) gimple_check_failed -- referenced in the text
segment of libbackend.a(tree-loop-linear.o)
ild: (undefined symbol) gimple_check_failed -- referenced in the text
segment of libbackend.a(tree-affine.o)
ild: (undefined symbol) gimple_check_failed -- referenced in the text
segment of libbackend.a(lambda-trans.o)

.... lot of these errors.....

make[3]: *** [cc1-dummy] Error 5
make[3]: Leaving directory
`/home/kkusuman/software/compileHere/gcc-4.4-20081107/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory
`/home/kkusuman/software/compileHere/gcc-4.4-20081107'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory
`/home/kkusuman/software/compileHere/gcc-4.4-20081107'


I am using the Sun solaris cc compiler.
> cc -V
cc: Sun C 5.5 2003/03/12

$ ar t gcc/libbackend.a | grep gimple.o
gimple.o

However,

$ nm gcc/gimple.o | grep check_failed

        U gimple_check_failed

The issue was first pointed out at http://gcc.gnu.org/ml/gcc-help/2008-11/msg00135.html . More information can be found in that thread. I will gladly provide any additional information (if necessary) to fix this bug.

thanks
raju
Comment 1 Jakub Jelinek 2008-11-13 08:46:52 UTC
Testing a patch.
Comment 2 Jakub Jelinek 2008-11-13 08:54:48 UTC
Created attachment 16661 [details]
gcc44-pr38100.patch
Comment 3 Jakub Jelinek 2008-11-13 14:44:03 UTC
Subject: Bug 38100

Author: jakub
Date: Thu Nov 13 14:42:39 2008
New Revision: 141820

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141820
Log:
	PR bootstrap/38100
	* gimple.h (gimple_range_check_failed): Remove prototype.
	* gimple.c (gimple_check_failed): Don't check GCC_VERSION
	in guarding #if.
	(gimple_range_check_failed): Removed.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple.c
    trunk/gcc/gimple.h

Comment 4 Jakub Jelinek 2008-11-13 15:59:32 UTC
Fixed.