From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14577 invoked by alias); 9 Sep 2003 00:05:22 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 14569 invoked from network); 9 Sep 2003 00:05:21 -0000 Received: from unknown (HELO atrey.karlin.mff.cuni.cz) (195.113.31.123) by sources.redhat.com with SMTP; 9 Sep 2003 00:05:21 -0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 4018) id 36E424C0002; Tue, 9 Sep 2003 02:05:21 +0200 (CEST) Date: Tue, 09 Sep 2003 00:20:00 -0000 From: Jan Hubicka To: Andreas Schwab Cc: Jan Hubicka , "H. J. Lu" , gcc@gcc.gnu.org Subject: Re: Gcc mainline failed to bootstrap on Linux/ia64 Message-ID: <20030909000521.GM12333@atrey.karlin.mff.cuni.cz> References: <20030906230104.GA5623@lucon.org> <20030906231316.GC12333@atrey.karlin.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: User-Agent: Mutt/1.3.28i X-SW-Source: 2003-09/txt/msg00418.txt.bz2 > Jan Hubicka writes: >=20 > >> Gcc mainline on Sat Sep 6 07:08:21 PDT 2003 failed to bootstrap on > >> Linux/ia64. I got > >>=20 > >> In file included from /net/gnu/export/gnu/src/gcc/gcc/libjava/include/= jvm.h:23, > >> from /net/gnu/export/gnu/src/gcc/gcc/libjava/exceptio= n.cc:22: > >> ./include/java-threads.h:228: internal compiler error: Segmentation fa= ult > >> Please submit a full bug report, > >> with preprocessed source if appropriate. > >> See for instructions. > > > > This appears to be related to change of mine to notice_global_symbol. > > I just commited fix to different problem that may fix it. Can you > > please ensure that the following patch is in your tree? > > * cgraph.c (cgraph_mark_reachable_node): Only enqueue finalized = functions. > > (cgraph_varpool_finalize_decl): Notice global symbol when needed. >=20 > This is still not fixed. >=20 > $ gdb --args /tmp/cvs/gcc-20030908/Build/gcc/cc1plus -quiet -nostdinc++ -= v -I. -I../../../libjava -I./include -I./gcj -I../../../libjava -Iinclude -= I../../../libjava/include -I/tmp/cvs/gcc-20030908/boehm-gc/include -I../../= ../libjava/libltdl -I../../../libjava/libltdl -I../../../libjava/.././libja= va/../gcc -I../../../libjava/../libffi/include -I../libffi/include -iprefix= /tmp/cvs/gcc-20030908/Build/gcc/../lib/gcc/ia64-suse-linux/3.4/ -isystem /= tmp/cvs/gcc-20030908/Build/gcc/include -isystem /usr/local/ia64-suse-linux/= bin/include -isystem /usr/local/ia64-suse-linux/lib/include -D_GNU_SOURCE -= DHAVE_CONFIG_H -DGC_LINUX_THREADS=3D1 -D_REENTRANT=3D1 -DTHREAD_LOCAL_ALLOC= =3D1 -DSILENT=3D1 -DNO_SIGNALS=3D1 -DNO_EXECUTE_PERMISSION=3D1 -DALL_INTERI= OR_POINTERS=3D1 -DJAVA_FINALIZATION=3D1 -DGC_GCJ_SUPPORT=3D1 -DATOMIC_UNCOL= LECTABLE=3D1 -D_GNU_SOURCE -DPREFIX=3D"/usr/local" -DLIBDIR=3D"/usr/local/l= ib" -DBOOT_CLASS_PATH=3D"/usr/local/share/java/libgcj-3.4.jar" -D_GNU_SOURC= E -DPIC -isystem /usr/local/ia64-suse-linux > /include -isystem /usr/local/ia64-suse-linux/sys-include -MD .deps/prims= .pp ../../../libjava/prims.cc -quiet -dumpbase prims.cc -auxbase-strip .lib= s/prims.o -g -g -O2 -O2 -O2 -Wswitch-enum -W -Wall -version -fno-rtti -fnon= -call-exceptions -fdollars-in-identifiers -funwind-tables -fPIC -o /tmp/cc7= t0b1y.s > GNU gdb 5.3.90_2003-07-16-cvs > Copyright 2003 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you = are > welcome to change it and/or distribute copies of it under certain conditi= ons. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for detail= s. > This GDB was configured as "ia64-suse-linux"... > (gdb) r > Starting program: /tmp/cvs/gcc-20030908/Build/gcc/cc1plus -quiet -nostdin= c++ -v -I. -I../../../libjava -I./include -I./gcj -I../../../libjava -Iincl= ude -I../../../libjava/include -I/tmp/cvs/gcc-20030908/boehm-gc/include -I.= ./../../libjava/libltdl -I../../../libjava/libltdl -I../../../libjava/.././= libjava/../gcc -I../../../libjava/../libffi/include -I../libffi/include -ip= refix /tmp/cvs/gcc-20030908/Build/gcc/../lib/gcc/ia64-suse-linux/3.4/ -isys= tem /tmp/cvs/gcc-20030908/Build/gcc/include -isystem /usr/local/ia64-suse-l= inux/bin/include -isystem /usr/local/ia64-suse-linux/lib/include -D_GNU_SOU= RCE -DHAVE_CONFIG_H -DGC_LINUX_THREADS=3D1 -D_REENTRANT=3D1 -DTHREAD_LOCAL_= ALLOC=3D1 -DSILENT=3D1 -DNO_SIGNALS=3D1 -DNO_EXECUTE_PERMISSION=3D1 -DALL_I= NTERIOR_POINTERS=3D1 -DJAVA_FINALIZATION=3D1 -DGC_GCJ_SUPPORT=3D1 -DATOMIC_= UNCOLLECTABLE=3D1 -D_GNU_SOURCE -DPREFIX=3D/usr/local -DLIBDIR=3D/usr/local= /lib -DBOOT_CLASS_PATH=3D/usr/local/share/java/libgcj-3.4.jar -D_GNU_SOURCE= -DPIC -isystem /usr/local/ia64-suse-linux/ > include -isystem /usr/local/ia64-suse-linux/sys-include -MD .deps/prims.= pp ../../../libjava/prims.cc -quiet -dumpbase prims.cc -auxbase-strip .libs= /prims.o -g -g -O2 -O2 -O2 -Wswitch-enum -W -Wall -version -fno-rtti -fnon-= call-exceptions -fdollars-in-identifiers -funwind-tables -fPIC -o /tmp/cc7t= 0b1y.s > ignoring nonexistent directory "/usr/local/ia64-suse-linux/bin/include" > ignoring nonexistent directory "/usr/local/ia64-suse-linux/lib/include" > ignoring nonexistent directory "/usr/local/ia64-suse-linux/include" > ignoring nonexistent directory "/usr/local/ia64-suse-linux/sys-include" > ignoring nonexistent directory "/tmp/cvs/gcc-20030908/Build/gcc/../lib/gc= c/ia64-suse-linux/3.4/include" > ignoring nonexistent directory "/tmp/cvs/gcc-20030908/Build/gcc/../lib/gc= c/ia64-suse-linux/3.4/../../../../ia64-suse-linux/include" > ignoring nonexistent directory "NONE/include" > ignoring nonexistent directory "/usr/local/lib/gcc/ia64-suse-linux/3.4/in= clude" > ignoring nonexistent directory "/usr/local/lib/../ia64-suse-linux/include" > ignoring duplicate directory "../../../libjava" > ignoring duplicate directory "include" > ignoring duplicate directory "../../../libjava/libltdl" > #include "..." search starts here: > #include <...> search starts here: > . > ../../../libjava > ./include > ./gcj > ../../../libjava/include > /tmp/cvs/gcc-20030908/boehm-gc/include > ../../../libjava/libltdl > ../../../libjava/.././libjava/../gcc > ../../../libjava/../libffi/include > ../libffi/include > /tmp/cvs/gcc-20030908/Build/gcc/include > /usr/local/include > /usr/include > End of search list. > GNU C++ version 3.4 20030908 (experimental) (ia64-suse-linux) > compiled by GNU C version 3.4 20030908 (experimental). > GGC heuristics: --param ggc-min-expand=3D30 --param ggc-min-heapsize=3D40= 96 >=20 > Program received signal SIGSEGV, Segmentation fault. > notice_global_symbol (decl=3D0x2000000000b7a2f0) at ../../gcc/varasm.c:10= 61 > 1061 p =3D (* targetm.strip_name_encoding) (XSTR (XEXP (decl_rtl= , 0), 0)); > (gdb) bt > #0 notice_global_symbol (decl=3D0x2000000000b7a2f0) at ../../gcc/varasm.= c:1061 > #1 0x4000000000779360 in cgraph_varpool_mark_needed_node ( > node=3D0x2000000000ad9980) at ../../gcc/cgraph.c:475 > #2 0x40000000006e0d60 in rest_of_decl_compilation (decl=3D0x2000000000b7= a2f0,=20 > asmspec=3D0x600000000015c178 "r13", top_level=3D1, at_end=3D0) > at ../../gcc/toplev.c:1912 > #3 0x400000000008e5b0 in cp_finish_decl (decl=3D0x2000000000b7a2f0, init= =3D0x0,=20 > asmspec_tree=3D0x2000000000ad9980, flags=3D9470730) at ../../gcc/cp/d= ecl.c:7805 > #4 0x400000000019b730 in cp_parser_init_declarator ( > parser=3D0x20000000003e37a0, decl_specifiers=3D0x2000000000b85830,=20 > prefix_attributes=3D0x60000fffffffa411, function_definition_allowed_p= =3Dfalse,=20 > member_p=3Dfalse, declares_class_or_enum=3D0,=20 > function_definition_p=3D0x60000fffffffa420) at ../../gcc/cp/parser.c:= 9486 > #5 0x4000000000779360 in cgraph_varpool_mark_needed_node ( > node=3D0x20000000003e37a0) at ../../gcc/cgraph.c:475 > #6 0x2000000000b85830 in ?? () > #7 0x4000000000779360 in cgraph_varpool_mark_needed_node (node=3DCannot = access memory at address 0x60000fff7fffffe0 > ) > at ../../gcc/cgraph.c:475 > Cannot access memory at address 0x60000fff7ffffff0 > (gdb) pt decl > type size > unit size > align 64 symtab 4077552 alias set -1 precision 64 min max > pointer_to_this > > unsigned public static tree_1 regdecl decl_4 DI file ./include/java-t= hreads.h line 228 size unit size > align 64 > (reg/v:DI 13 r13 [ _Jv_self ]) chain > The problem obviously is that we see global variable placed in register. I am quite surprised to see this in java, but the attached patch should help. Can you, please try it out? Sorry for the delay - bit too many problems to deal with at once :( Tue Sep 9 02:03:42 CEST 2003 Jan Hubicka * varasm.c (notice_global_symbol): Fix dealing with registers. Index: varasm.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/gcc/gcc/gcc/varasm.c,v retrieving revision 1.381 diff -c -3 -p -r1.381 varasm.c *** varasm.c 5 Sep 2003 04:24:26 -0000 1.381 --- varasm.c 9 Sep 2003 00:03:31 -0000 *************** notice_global_symbol (tree decl) *** 1058,1063 **** --- 1058,1066 ---- char *name; rtx decl_rtl =3D DECL_RTL (decl); =20=20 + if (GET_CODE (decl_rtl) =3D=3D REG) + return; +=20 p =3D (* targetm.strip_name_encoding) (XSTR (XEXP (decl_rtl, 0), 0)= ); name =3D xstrdup (p); =20=20