Bug 39940 - [4.5 Regression] failure in jc1 on i686-apple-darwin9 host
Summary: [4.5 Regression] failure in jc1 on i686-apple-darwin9 host
Status: VERIFIED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.5.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2009-04-28 07:14 UTC by Dominique d'Humieres
Modified: 2009-05-02 20:51 UTC (History)
3 users (show)

See Also:
Host: i686-apple-darwin9
Target:
Build: i686-apple-darwin9
Known to work:
Known to fail:
Last reconfirmed: 2009-04-30 14:56:00


Attachments
debug output with -fdump-tree-all-details-blocks-vops (190.94 KB, application/x-bzip2)
2009-05-02 14:20 UTC, Paolo Bonzini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique d'Humieres 2009-04-28 07:14:30 UTC
 
Comment 1 Dominique d'Humieres 2009-04-28 07:17:27 UTC
Hit the return key too soon!-(

On  i686-apple-darwin9 bootstrapping revision 146855 fails when building libjava with -m64:

...
libtool: compile:  /opt/gcc/i686-darwin/gcc/gcj -B/opt/gcc/i686-darwin/i686-apple-darwin9/x86_64/libjava/ -B/opt/gcc/i686-darwin/gcc/ -ffloat-store -fomit-frame-pointer -Usun -fclasspath= -fbootclasspath=../../../../gcc-4.5-work/libjava/classpath/lib --encoding=UTF-8 -Wno-deprecated -fbootstrap-classes -g -O2 -m64 -fsource-filename=/opt/gcc/i686-darwin/i686-apple-darwin9/x86_64/libjava/classpath/lib/classes -fjni -findirect-dispatch -fno-indirect-classes -c @gnu-java-awt-peer-gtk.list -o gnu-java-awt-peer-gtk.o >/dev/null 2>&1
../../../../../../gcc-4.5-work/libjava/classpath/gnu/CORBA/Poa/gnuPOA.java: In class 'gnu.CORBA.Poa.gnuPOA$RefTemplate':
../../../../../../gcc-4.5-work/libjava/classpath/gnu/CORBA/Poa/gnuPOA.java: In constructor '(gnu.CORBA.Poa.gnuPOA)':
In file included from <built-in>:137:
../../../../../../gcc-4.5-work/libjava/classpath/gnu/CORBA/Poa/gnuPOA.java:0: error: type mismatch in indirect reference
struct java.lang.String[]

void

# VUSE <.MEM_215>
#slot#8#31_227 = #ref#5#2_71->length;

../../../../../../gcc-4.5-work/libjava/classpath/gnu/CORBA/Poa/gnuPOA.java:0: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[5]: *** [gnu-CORBA.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [all-recursive] Error 1
make[3]: *** [multi-do] Error 1
make[2]: *** [all-multi] Error 2
make[1]: *** [all-target-libjava] Error 2
make: *** [all] Error 2
Comment 2 Dominique d'Humieres 2009-04-28 08:28:20 UTC
Looks like a duplicate of pr38374.

Comment 3 Richard Biener 2009-04-29 15:22:22 UTC
Does http://gcc.gnu.org/ml/gcc-cvs/2009-04/msg01619.html fix this?
Comment 4 Dominique d'Humieres 2009-04-29 15:24:59 UTC
> Does http://gcc.gnu.org/ml/gcc-cvs/2009-04/msg01619.html fix this?

If you think so, I'll try ASAP. Thanks.

Comment 5 Dominique d'Humieres 2009-04-30 11:25:52 UTC
> Does http://gcc.gnu.org/ml/gcc-cvs/2009-04/msg01619.html fix this?

No! Still fails at revision 146999.

Comment 6 Paolo Bonzini 2009-04-30 14:56:00 UTC
Fails after PRE.

Reduced testcase requiring just a jc1 executable (assuming gcc is built in a subdirectory of the toplevel, i.e. ../configure):

./jc1 "../../libjava/classpath/lib/gnu/CORBA/Poa/gnuPOA\$RefTemplate.class" "-fhash-synchronization" "-fuse-divide-subroutine" "-fcheck-references" "-fuse-boehm-gc" "-fkeep-inline-functions" "-fPIC" "-feliminate-unused-debug-symbols" "-quiet" "-mmacosx-version-min=10.5.6" "-m64" "-mtune=generic" "-g" "-O2" "-Wno-deprecated" "-ffloat-store" "-fomit-frame-pointer" "-fencoding=UTF-8" "-fbootstrap-classes" "-fjni" "-findirect-dispatch" "-fno-indirect-classes" "-fno-common" "-fbootclasspath=../../libjava/classpath/lib/" -o /dev/null 
Comment 7 Paolo Bonzini 2009-04-30 14:56:20 UTC
Ah, I didn't bootstrap so jc1 cannot be miscompiled.
Comment 8 Dominique d'Humieres 2009-04-30 21:07:50 UTC
I successfully bootstrapped libjava on powerpc-apple-darwin9 at revision 146999.
Comment 9 Paolo Bonzini 2009-04-30 21:10:57 UTC
Subject: Re:  [4.5 Regression] Bootstrap failure in libjava on 
	i686-apple-darwin9

> I successfully bootstrapped libjava on powerpc-apple-darwin9 at revision
> 146999.

Interesting, can you try the command-line I posted on both ppc and
i386, plus -fdump-tree-all-details, and see what the differences are
in the tree dumps?

Thanks!
Comment 10 Dominique d'Humieres 2009-04-30 21:58:01 UTC
> can you try the command-line I posted

I guess it is from comment #6. Using a stupid copy and paste, I get

RefTemplate: Undefined variable.

After some trial and error, I ran

/opt/gcc/gcc4.5w/libexec/gcc/i686-apple-darwin9/4.5.0/jc1 /opt/gcc/_gcc_clean/libjava/classpath/lib/gnu/CORBA/Poa/gnuPOA.class -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fkeep-inline-functions -fPIC -feliminate-unused-debug-symbols -quiet -mmacosx-version-min=10.5.6 -m64 -mtune=generic -g -O2 -Wno-deprecated -ffloat-store -fomit-frame-pointer -fencoding=UTF-8 -fbootstrap-classes -fjni -findirect-dispatch -fno-indirect-classes -fno-common -fbootclasspath=/opt/gcc/_gcc_clean/libjava/classpath/lib/ -fdump-tree-all-details

and the same variant on ppc, and got no errors but a bunch of files in /opt/gcc/_gcc_clean/libjava/classpath/lib/gnu/CORBA/Poa/
I have moved them to another directory, but don't know what to do with them .

On Intel jc1 comes from revision 146795. For my last bootstrap I have only (successfully) build c, c++, and fortran, so if I need a matching jc1, I'll have to do a full (failing) bootstrap and won't have anything before tomorrow morning.

Note, I really don't know anything about Java except the name.
Comment 11 Paolo Bonzini 2009-05-01 05:40:35 UTC
Subject: Re:  [4.5 Regression] Bootstrap failure in libjava on 
	i686-apple-darwin9

The file name is really gnuPOA$RefTemplate.class
Comment 12 Paolo Bonzini 2009-05-01 05:42:10 UTC
Subject: Re:  [4.5 Regression] Bootstrap failure in libjava on 
	i686-apple-darwin9

-mtune=generic should be eliminated from the ppc build, too (but intel
fails also without it)
Comment 13 Dominique d'Humieres 2009-05-01 09:39:09 UTC
On i686-apple-darwin9:

[ibook-dhum] bug/java_test% /opt/gcc/gcc4.5w/bin/gcj -v
Using built-in specs.
Reading specs from /Volumes/MacBook/opt/gcc/gcc4.5w/bin/../lib/gcc/i686-apple-darwin9/4.5.0/../../../libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
Target: i686-apple-darwin9
Configured with: ../gcc-4.5-work/configure --prefix=/opt/gcc/gcc4.5w --mandir=/opt/gcc/gcc4.5w/share/man --infodir=/opt/gcc/gcc4.5w/share/info --build=i686-apple-darwin9 --enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/sw --with-libiconv-prefix=/usr --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --with-cloog=/sw --with-ppl=/sw
Thread model: posix
gcc version 4.5.0 20090426 (experimental) [trunk revision 146795p6] (GCC) 

but also (from the last bootstrap without java)

[ibook-dhum] bug/java_test% /opt/gcc/gcc4.5w/bin/gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: ../gcc-4.5-work/configure --prefix=/opt/gcc/gcc4.5w --mandir=/opt/gcc/gcc4.5w/share/man --infodir=/opt/gcc/gcc4.5w/share/info --build=i686-apple-darwin9 --enable-languages=c,c++,fortran --with-gmp=/sw --with-libiconv-prefix=/usr --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --with-cloog=/sw --with-ppl=/sw
Thread model: posix
gcc version 4.5.0 20090430 (experimental) [trunk revision 147015p6] (GCC) 

[ibook-dhum] bug/java_test% /opt/gcc/gcc4.5w/libexec/gcc/i686-apple-darwin9/4.5.0/jc1 /opt/gcc/_gcc_clean/libjava/classpath/lib/gnu/CORBA/Poa/gnuPOA\$RefTemplate.class -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fkeep-inline-functions -fPIC -feliminate-unused-debug-symbols -quiet -mmacosx-version-min=10.5.6 -m64 -mtune=generic -g -O2 -Wno-deprecated -ffloat-store -fomit-frame-pointer -fencoding=UTF-8 -fbootstrap-classes -fjni -findirect-dispatch -fno-indirect-classes -fno-common -fbootclasspath=/opt/gcc/_gcc_clean/libjava/classpath/lib/ -fdump-tree-all-details

No error and I get 94 files from

gnuPOA$RefTemplate.class.003t.original
...
gnuPOA$RefTemplate.class.126t.optimized
gnuPOA$RefTemplate.class.127t.nrv
gnuPOA$RefTemplate.class.128t.blocks
gnuPOA$RefTemplate.class.129t.final_cleanup
gnuPOA$RefTemplate.class.206t.statistics
gnuPOA$RefTemplate.class.s

On powerpc-apple-darwin9, bootstrapped without fatal error:

[karma] bug/java_test% /opt/gcc/gcc4.5w/bin/gcj -v
Using built-in specs.
Reading specs from /opt/gcc/gcc4.5w/lib/gcc/powerpc-apple-darwin9/4.5.0/../../../libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
Target: powerpc-apple-darwin9
Configured with: ../gcc-4.5-work/configure --prefix=/opt/gcc/gcc4.5w --mandir=/opt/gcc/gcc4.5w/share/man --infodir=/opt/gcc/gcc4.5w/share/info --build=powerpc-apple-darwin9 --enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/sw --with-libiconv-prefix=/usr --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --with-cloog=/sw --with-ppl=/sw
Thread model: posix
gcc version 4.5.0 20090430 (experimental) [trunk revision 146999p3] (GCC) 
[karma] bug/java_test% /opt/gcc/gcc4.5w/bin/gcc -v
Using built-in specs.
Target: powerpc-apple-darwin9
Configured with: ../gcc-4.5-work/configure --prefix=/opt/gcc/gcc4.5w --mandir=/opt/gcc/gcc4.5w/share/man --infodir=/opt/gcc/gcc4.5w/share/info --build=powerpc-apple-darwin9 --enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/sw --with-libiconv-prefix=/usr --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --with-cloog=/sw --with-ppl=/sw
Thread model: posix
gcc version 4.5.0 20090430 (experimental) [trunk revision 146999p3] (GCC) 

[karma] bug/java_test% /opt/gcc/gcc4.5w/libexec/gcc/powerpc-apple-darwin9/4.5.0/jc1 /opt/gcc/_gcc_clean/libjava/classpath/lib/gnu/CORBA/Poa/gnuPOA\$RefTemplate.class -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fkeep-inline-functions -fPIC -feliminate-unused-debug-symbols -quiet -mmacosx-version-min=10.5.6 -m64 -g -O2 -Wno-deprecated -ffloat-store -fomit-frame-pointer -fencoding=UTF-8 -fbootstrap-classes -fjni -findirect-dispatch -fno-indirect-classes -fno-common -fbootclasspath=/opt/gcc/_gcc_clean/libjava/classpath/lib/ -fdump-tree-all-details
gnu/CORBA/Poa/gnuPOA.java: In class 'gnu.CORBA.Poa.gnuPOA$RefTemplate':
gnu/CORBA/Poa/gnuPOA.java: In constructor '(gnu.CORBA.Poa.gnuPOA)':
In file included from <built-in>:0:
gnu/CORBA/Poa/gnuPOA.java:0: error: type mismatch in indirect reference
struct java.lang.String[]

void

# VUSE <.MEM_215>
#slot#8#31_227 = #ref#5#2_71->length;

gnu/CORBA/Poa/gnuPOA.java:0: internal compiler error: verify_stmts failed

and I get 92 files

gnuPOA$RefTemplate.class.003t.original
...
gnuPOA$RefTemplate.class.126t.nrv
gnuPOA$RefTemplate.class.128t.optimized
gnuPOA$RefTemplate.class.209t.statistics
gnuPOA$RefTemplate.class.s

where the files

gnuPOA$RefTemplate.class.127t.nrv
gnuPOA$RefTemplate.class.129t.final_cleanup

are missing.
Comment 14 Dominique d'Humieres 2009-05-01 11:13:35 UTC
Note 1: java is broken on ppc-darwin with -m64.

Note 2: the error does not appear at -O1 and -m32 (default).

Note 3: removing the -quiet and some other options, I get:

[karma] bug/java_test% /opt/gcc/gcc4.5w/libexec/gcc/powerpc-apple-darwin9/4.5.0/jc1 /opt/gcc/_gcc_clean/libjava/classpath/lib/gnu/CORBA/Poa/gnuPOA\$RefTemplate.class -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fkeep-inline-functions -O2 -fencoding=UTF-8 -fbootstrap-classes -fjni -findirect-dispatch -fno-indirect-classes -fno-common -fbootclasspath=/opt/gcc/_gcc_clean/libjava/classpath/lib/ -fdump-tree-all 

class gnu.CORBA.Poa.gnuPOA$RefTemplate class java.lang.ObjectIn file included from <built-in>:0:
gnu/CORBA/Poa/gnuPOA.java:0: warning: cannot find file for class org.omg.PortableInterceptor.ObjectReferenceTemplate
 (gnu.CORBA.Poa.gnuPOA)gnu/CORBA/Poa/gnuPOA.java: In class 'gnu.CORBA.Poa.gnuPOA$RefTemplate':
gnu/CORBA/Poa/gnuPOA.java: In constructor '(gnu.CORBA.Poa.gnuPOA)':

In file included from <built-in>:2:
gnu/CORBA/Poa/gnuPOA.java:126: warning: cannot find file for class java.util.ArrayList
gnu/CORBA/Poa/gnuPOA.java:127: warning: cannot find file for class gnu.CORBA.Poa.gnuPOA
gnu/CORBA/Poa/gnuPOA.java:132: warning: cannot find file for class org.omg.PortableServer.POA
In file included from <built-in>:2:
gnu/CORBA/Poa/gnuPOA.java:138: warning: cannot find file for class java.lang.String
 gnu.CORBA.Poa.gnuPOA$RefTemplate.adapter_name() gnu.CORBA.Poa.gnuPOA$RefTemplate.orb_id()gnu/CORBA/Poa/gnuPOA.java: In method 'gnu.CORBA.Poa.gnuPOA$RefTemplate.orb_id()':

In file included from <built-in>:2:
gnu/CORBA/Poa/gnuPOA.java:162: warning: cannot find file for class gnu.CORBA.Poa.ORB_1_4
 gnu.CORBA.Poa.gnuPOA$RefTemplate.server_id()gnu/CORBA/Poa/gnuPOA.java: In method 'gnu.CORBA.Poa.gnuPOA$RefTemplate.server_id()':

gnu/CORBA/Poa/gnuPOA.java:170: warning: cannot find file for class gnu.CORBA.OrbFunctional
 gnu.CORBA.Poa.gnuPOA$RefTemplate.make_object(java.lang.String,byte[]) gnu.CORBA.Poa.gnuPOA$RefTemplate._truncatable_ids()gnu/CORBA/Poa/gnuPOA.java: At top level:

gnu/CORBA/Poa/gnuPOA.java:186: warning: cannot find file for class java.lang.Class

Analyzing compilation unit
Performing interprocedural optimizations
 <visibility> <early_local_cleanups> <summary generate> <cp> <inline> <static-var> <pure-const>Assembling functions:
 gnu.CORBA.Poa.gnuPOA$RefTemplate._truncatable_ids() gnu.CORBA.Poa.gnuPOA$RefTemplate.server_id() gnu.CORBA.Poa.gnuPOA$RefTemplate.make_object(java.lang.String,byte[]) gnu.CORBA.Poa.gnuPOA$RefTemplate.orb_id() gnu.CORBA.Poa.gnuPOA$RefTemplate.adapter_name() (gnu.CORBA.Poa.gnuPOA)gnu/CORBA/Poa/gnuPOA.java: In constructor '(gnu.CORBA.Poa.gnuPOA)':

In file included from <built-in>:0:
gnu/CORBA/Poa/gnuPOA.java:0: error: type mismatch in indirect reference
struct java.lang.String[]

void

# VUSE <.MEM_11>
#slot#8#31_225 = #ref#5#2_129->length;

gnu/CORBA/Poa/gnuPOA.java:0: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 15 Jack Howarth 2009-05-01 14:06:01 UTC
Java has always been broken at -m64 on ppc-darwin since no one has ever ported ffi to work on ppc64 for darwin.
Comment 16 Dominique d'Humieres 2009-05-01 14:08:55 UTC
> Java has always been broken at -m64 on ppc-darwin since no one has ever ported
> ffi to work on ppc64 for darwin.

This is precisely why I have tried the test without -m64.
Comment 17 Dominique d'Humieres 2009-05-01 14:50:22 UTC
At revision 147032 on i686-apple-darwin9 the bootstrap still fails. Using the built jc1 I get:

[ibook-dhum] bug/java_test% /opt/gcc/i686-darwin/gcc/jc1 /opt/gcc/_gcc_clean/libjava/classpath/lib/gnu/CORBA/Poa/gnuPOA\$RefTemplate.class -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fkeep-inline-functions -quiet -mmacosx-version-min=10.5.6 -mtune=generic -O2 -Wno-deprecated -fencoding=UTF-8 -fbootstrap-classes -fjni -findirect-dispatch -fno-indirect-classes -fno-common -fbootclasspath=/opt/gcc/_gcc_clean/libjava/classpath/lib/ -fdump-tree-all-details
gnu/CORBA/Poa/gnuPOA.java: In class 'gnu.CORBA.Poa.gnuPOA$RefTemplate':
gnu/CORBA/Poa/gnuPOA.java: In constructor '(gnu.CORBA.Poa.gnuPOA)':
In file included from <built-in>:0:
gnu/CORBA/Poa/gnuPOA.java:0: error: type mismatch in indirect reference
struct java.lang.String[]

void

# VUSE <.MEM_11>
#slot#8#31_225 = #ref#5#2_135->length;

gnu/CORBA/Poa/gnuPOA.java:0: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 18 Richard Biener 2009-05-01 19:54:19 UTC
Hm, with a cross configured like

configure --disable-nls --enable-languages=java --target=i686-apple-darwin9

and make all-gcc I just get

gcc$ ./jc1 -quiet ~/src/trunk/libjava/classpath/lib/gnu/CORBA/Poa/gnuPOA\$RefTemplate.class -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fkeep-inline-functions -quiet -mmacosx-version-min=10.5.6 -mtune=generic -O2 -Wno-deprecated -fencoding=UTF-8 -fbootstrap-classes -fjni -findirect-dispatch -fno-indirect-classes -fno-common -fbootclasspath=~/src/trunk/libjava/classpath/lib 
Segmentation fault

:/

So I still cannot reproduce this.  The segfault happens because the FE
endlessly recurses in

#295 0x080ddae8 in layout_class_methods (this_class=0xb7761a8c)
    at /home/richard/src/trunk/gcc/java/class.c:2559
2559		layout_class_methods (super_class);
(gdb) 
#296 0x080ddae8 in layout_class_methods (this_class=0xb7761a8c)
    at /home/richard/src/trunk/gcc/java/class.c:2559
2559		layout_class_methods (super_class);
...
Comment 19 Dominique d'Humieres 2009-05-01 23:09:10 UTC
The ICE is also produced by prev-gcc/jc1

[ibook-dhum] bug/java_test% /opt/gcc/i686-darwin/prev-gcc/jc1 /opt/gcc/_gcc_clean/libjava/classpath/lib/gnu/CORBA/Poa/gnuPOA\$RefTemplate.class -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fkeep-inline-functions -quiet -mmacosx-version-min=10.5.6 -mtune=generic -O2 -Wno-deprecated -fencoding=UTF-8 -fbootstrap-classes -fjni -findirect-dispatch -fno-indirect-classes -fno-common -fbootclasspath=/opt/gcc/_gcc_clean/libjava/classpath/lib/ -fdump-tree-all-details
gnu/CORBA/Poa/gnuPOA.java: In class 'gnu.CORBA.Poa.gnuPOA$RefTemplate':
gnu/CORBA/Poa/gnuPOA.java: In constructor '(gnu.CORBA.Poa.gnuPOA)':
In file included from <built-in>:0:
gnu/CORBA/Poa/gnuPOA.java:0: error: type mismatch in indirect reference
struct java.lang.String[]

void

# VUSE <.MEM_11>
#slot#8#31_225 = #ref#5#2_135->length;

gnu/CORBA/Poa/gnuPOA.java:0: internal compiler error: verify_stmts failed

Comment 20 Paolo Bonzini 2009-05-02 13:51:44 UTC
Also reproducible with compiler to powerpc-apple-darwin, same error message.
Comment 21 Paolo Bonzini 2009-05-02 13:53:47 UTC
> Java has always been broken at -m64 on ppc-darwin since no one has ever ported
> ffi to work on ppc64 for darwin.

But jc1 builds if you just "make jc1", and it exhibits the same bug.
Comment 22 Dominique d'Humieres 2009-05-02 14:12:42 UTC
> But jc1 builds if you just "make jc1", and it exhibits the same bug.

The difference between ppc and intel, is that for the former it does not break bootstrap. Any idea why?
Comment 23 Paolo Bonzini 2009-05-02 14:16:28 UTC
Now this is funny.  I get the same error even with a cross from i686-darwin to i686-pc-linux-gnu!
Comment 24 Paolo Bonzini 2009-05-02 14:20:21 UTC
Created attachment 17792 [details]
debug output with -fdump-tree-all-details-blocks-vops
Comment 25 Richard Biener 2009-05-02 15:35:07 UTC
Ha, that helped.  From looking at the dumps, can you check

Index: gcc/tree-ssa-pre.c
===================================================================
--- gcc/tree-ssa-pre.c	(revision 147054)
+++ gcc/tree-ssa-pre.c	(working copy)
@@ -4215,7 +4215,9 @@ eliminate (void)
       /* If there is a single use only, propagate the equivalency
 	 instead of keeping the copy.  */
       if (TREE_CODE (lhs) == SSA_NAME
-	  && single_imm_use (lhs, &use_p, &use_stmt))
+	  && single_imm_use (lhs, &use_p, &use_stmt)
+	  && may_propagate_copy (USE_FROM_PTR (use_p),
+				 gimple_assign_rhs1 (stmt)))
 	{
 	  SET_USE (use_p, gimple_assign_rhs1 (stmt));
 	  update_stmt (use_stmt);

?
Comment 26 Richard Biener 2009-05-02 17:50:33 UTC
Subject: Bug 39940

Author: rguenth
Date: Sat May  2 17:50:21 2009
New Revision: 147065

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147065
Log:
2009-05-02  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/39940
	* tree-ssa-pre.c (eliminate): Make sure we may propagate before
	doing so.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-pre.c

Comment 27 Richard Biener 2009-05-02 17:51:16 UTC
Supposedly fixed.
Comment 28 Paolo Bonzini 2009-05-02 20:34:55 UTC
Yes, fixed.
Comment 29 Paolo Bonzini 2009-05-02 20:35:23 UTC
what about 4.4?
Comment 30 Richard Biener 2009-05-02 20:51:53 UTC
The specific code path doesn't exist in 4.4.