Bug 35716

Summary: [4.4 Regression]: gfortran.dg/assign_6.f and gfortran.dg/g77/dnrm2.f
Product: gcc Reporter: H.J. Lu <hjl.tools>
Component: tree-optimizationAssignee: Richard Biener <rguenth>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, hp, rguenth
Priority: P3    
Version: 4.4.0   
Target Milestone: 4.4.0   
Host: Target: i686-pc-linux-gnu
Build: Known to work:
Known to fail: Last reconfirmed: 2008-03-27 16:22:10

Description H.J. Lu 2008-03-27 14:19:38 UTC
Gcc 4.4 revision 133635 has

http://gcc.gnu.org/ml/gcc-testresults/2008-03/msg02105.html

FAIL: gfortran.dg/assign_6.f  -O1  execution test
FAIL: gfortran.dg/assign_6.f  -O2  execution test
FAIL: gfortran.dg/assign_6.f  -O3 -fomit-frame-pointer  execution test
FAIL: gfortran.dg/assign_6.f  -O3 -fomit-frame-pointer -funroll-loops  execution test
FAIL: gfortran.dg/assign_6.f  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
FAIL: gfortran.dg/assign_6.f  -O3 -g  execution test
FAIL: gfortran.dg/assign_6.f  -Os  execution test
FAIL: gfortran.dg/g77/dnrm2.f  -O1  execution test
FAIL: gfortran.dg/g77/dnrm2.f  -O2  execution test
FAIL: gfortran.dg/g77/dnrm2.f  -O3 -fomit-frame-pointer  execution test
FAIL: gfortran.dg/g77/dnrm2.f  -O3 -fomit-frame-pointer -funroll-loops  execution test
FAIL: gfortran.dg/g77/dnrm2.f  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  execution test
FAIL: gfortran.dg/g77/dnrm2.f  -O3 -g  execution test
FAIL: gfortran.dg/g77/dnrm2.f  -Os  execution test

Revision 133631 is OK

http://gcc.gnu.org/ml/gcc-testresults/2008-03/msg02101.html
Comment 1 Paolo Bonzini 2008-03-27 14:27:02 UTC
my build patches are innocent :-)
Comment 2 Dominique d'Humieres 2008-03-27 14:41:04 UTC
Confirmed on i686-apple-darwin9 at revision 133638. The error is:

Fortran runtime error: Assigned label is not in the list

Comment 3 Hans-Peter Nilsson 2008-03-27 15:11:34 UTC
Seen for cris-elf too; worked with 133631, failed with 133638.
Comment 4 H.J. Lu 2008-03-27 15:44:47 UTC
I have verified that revision 133632:

http://gcc.gnu.org/ml/gcc-cvs/2008-03/msg00852.html

is the cause.
Comment 5 Richard Biener 2008-03-27 16:22:09 UTC
Mine.
Comment 6 Richard Biener 2008-03-27 17:10:07 UTC
Fixed.
Comment 7 Richard Biener 2008-03-27 17:10:43 UTC
Subject: Bug 35716

Author: rguenth
Date: Thu Mar 27 17:09:54 2008
New Revision: 133647

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133647
Log:
2008-03-27  Richard Guenther  <rguenther@suse.de>

	PR middle-end/35716
	* fold-const.c (fold_comparison): Restrict distinct decl
	comparison folding to VAR_DECLs and PARM_DECLs.  Do not
	solely rely on operand_equal_p.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c