Bug 12313 - [tree-ssa] Bootstrap failure due to missing label
Summary: [tree-ssa] Bootstrap failure due to missing label
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: tree-ssa
: P2 critical
Target Milestone: tree-ssa
Assignee: Jason Merrill
URL:
Keywords: wrong-code
Depends on:
Blocks: 12347
  Show dependency treegraph
 
Reported: 2003-09-17 08:32 UTC by Andreas Schwab
Modified: 2003-10-13 10:46 UTC (History)
1 user (show)

See Also:
Host: ia64-suse-linux
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-09-18 14:30:09


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schwab 2003-09-17 08:32:41 UTC
Bootstrap fails on ia64 because there is no definition of dummy from 
uw_update_reg_address in the assembler output. 
 
/tmp/cvs/gcc-20030917/Build/gcc/xgcc -B/tmp/cvs/gcc-20030917/Build/gcc/ -B/usr/
local/ia64-suse-linux/bin/ -B/usr/local/ia64-suse-linux/lib/ -isystem /usr/
local/ia64-suse-linux/include -isystem /usr/local/ia64-suse-linux/sys-include 
-O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes 
-Wmissing-prototypes -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT 
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -shared -nodefaultlibs 
-Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o 
libgcc_s.so.1   libgcc/./__divtf3.o libgcc/./__divdf3.o libgcc/./__divsf3.o 
libgcc/./__divdi3.o libgcc/./__moddi3.o libgcc/./__udivdi3.o libgcc/./
__umoddi3.o libgcc/./__divsi3.o libgcc/./__modsi3.o libgcc/./__udivsi3.o 
libgcc/./__umodsi3.o libgcc/./__save_stack_nonlocal.o libgcc/./
__nonlocal_goto.o libgcc/./__restore_stack_nonlocal.o libgcc/./__trampoline.o 
libgcc/./_muldi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o 
libgcc/./_ashrdi3.o libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o libgcc/./
_floatdidf.o libgcc/./_floatdisf.o libgcc/./_fixunsdfsi.o libgcc/./
_fixunssfsi.o libgcc/./_fixunsdfdi.o libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o 
libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o libgcc/./
_floatdixf.o libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o libgcc/./_fixunstfdi.o 
libgcc/./_floatditf.o libgcc/./_clear_cache.o libgcc/./_trampoline.o libgcc/./
__main.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o libgcc/./
_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o libgcc/./_mulvsi3.o 
libgcc/./_mulvdi3.o libgcc/./_negvsi2.o libgcc/./_negvdi2.o libgcc/./_ctors.o 
libgcc/./_ffssi2.o libgcc/./_ffsdi2.o libgcc/./_clz.o libgcc/./_clzsi2.o 
libgcc/./_clzdi2.o libgcc/./_ctzsi2.o libgcc/./_ctzdi2.o libgcc/./
_popcount_tab.o libgcc/./_popcountsi2.o libgcc/./_popcountdi2.o libgcc/./
_paritysi2.o libgcc/./_paritydi2.o libgcc/./_divdi3.o libgcc/./_moddi3.o 
libgcc/./_udivdi3.o libgcc/./_umoddi3.o libgcc/./_udiv_w_sdiv.o libgcc/./
_udivmoddi4.o  libgcc/./unwind-ia64.o libgcc/./unwind-sjlj.o libgcc/./
unwind-c.o libgcc/./fde-glibc.o -lc && rm -f libgcc_s.so && ln -s libgcc_s.so.1 
libgcc_s.so 
/usr/bin/ld: libgcc/./unwind-ia64.o: @gprel relocation against dynamic symbol 
dummy.1 
collect2: ld returned 1 exit status 
make[3]: *** [libgcc_s.so] Error 1 
make[3]: Leaving directory `/tmp/cvs/gcc-20030917/Build/gcc'
Comment 1 Diego Novillo 2003-09-17 14:54:22 UTC
Subject: Re:  New: [tree-ssa] Bootstrap failure due to
	missing label

On Wed, 2003-09-17 at 04:32, schwab at suse dot de wrote:

> /usr/bin/ld: libgcc/./unwind-ia64.o: @gprel relocation against dynamic symbol 
> dummy.1 
> collect2: ld returned 1 exit status 
> make[3]: *** [libgcc_s.so] Error 1 
> make[3]: Leaving directory `/tmp/cvs/gcc-20030917/Build/gcc'
>
Hmm, my tester also got this but I can't reproduce it in my local tree. 
Do you get this with --enable-checking?  I also have a couple of local
fixes that I'm working on.  I'll check later with checking disabled.


Diego.

Comment 2 Andreas Schwab 2003-09-17 15:24:45 UTC
--enable-checking is default in tree-ssa. 
Comment 3 Andreas Schwab 2003-09-18 09:19:42 UTC
This is how I configured the compiler: 
 
../configure --host=ia64-suse-linux --enable-shared --enable-threads 
--with-system-zlib 
Comment 4 Andreas Schwab 2003-09-18 14:30:08 UTC
This is the change that triggers the failure: 
 
2003-09-15  Jason Merrill  <jason@redhat.com> 
 
	* tree-simple.c (is_gimple_val): Allow addresses of all decls. 
	(is_gimple_const): Allow addresses of all non-weak statics. 
	* tree-ssa-ccp.c (fold_stmt): Return bool. 
	* tree-flow.h: Adjust prototype. 
	* tree-ssa-dom.c (optimize_stmt): If folding changed stuff, we 
	need to recalculate the vops. 
 
Comment 5 Andrew Pinski 2003-09-28 06:44:20 UTC
There was recently a merge with the mainline, can you try this again?
Comment 6 Andreas Schwab 2003-09-28 16:02:32 UTC
Still exactly the same. 
Comment 7 Andreas Schwab 2003-10-12 17:20:03 UTC
Applying this patch to revert only one part of the change will also fix the 
bug: 
 
ndex: tree-simple.c 
=================================================================== 
RCS file: /backup/gcc-cvs/gcc/gcc/Attic/tree-simple.c,v 
retrieving revision 1.1.4.57 
diff -u -p -a -u -p -a -r1.1.4.57 tree-simple.c 
--- tree-simple.c	18 Sep 2003 00:19:27 -0000	1.1.4.57 
+++ tree-simple.c	12 Oct 2003 17:15:30 -0000 
@@ -285,7 +285,7 @@ 
     return 1; 
  
   if (TREE_CODE (t) == ADDR_EXPR 
-      && DECL_P (TREE_OPERAND (t, 0)) 
+      && TREE_CODE (TREE_OPERAND (t, 0)) == FUNCTION_DECL 
       && (TREE_STATIC (TREE_OPERAND (t, 0)) 
 	  || (DECL_EXTERNAL (TREE_OPERAND (t, 0)) 
 	      && !DECL_WEAK (TREE_OPERAND (t, 0))))) 
@@ -449,7 +449,8 @@ 
     return 1; 
  
   /* Allow the address of a decl.  */ 
-  if (TREE_CODE (t) == ADDR_EXPR && DECL_P (TREE_OPERAND (t, 0))) 
+  if (TREE_CODE (t) == ADDR_EXPR 
+      && TREE_CODE (TREE_OPERAND (t, 0)) == FUNCTION_DECL) 
     return 1; 
  
   /* Allow address of vla, so that we do not replace it in the call_expr of 
 
Comment 8 Andreas Schwab 2003-10-13 10:46:21 UTC
Not reproducable any more.