Bug 43229 - [4.5 Regression] ice expand_debug_expr, at cfgexpand.c:2957
Summary: [4.5 Regression] ice expand_debug_expr, at cfgexpand.c:2957
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.5.0
Assignee: Jakub Jelinek
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2010-03-02 13:23 UTC by Joost VandeVondele
Modified: 2010-03-03 10:02 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
gcc45-pr43229.patch (1.03 KB, patch)
2010-03-02 16:34 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joost VandeVondele 2010-03-02 13:23:53 UTC
For:

MODULE ai_geminals_debug
  REAL(8)                      :: kab
  CONTAINS
  SUBROUTINE init_grs(ya,yb,rA,rB)
    REAL(8), DIMENSION(6)                   :: C, D
    eab = SUM(C*D)
    kab = EXP(-eab)
  END SUBROUTINE init_grs
END MODULE ai_geminals_debug

leads to an ice (march=native so might be target dependent):

> gfortran   -g -O3  -ffast-math -march=native  -v bug.f90 

Driving: gfortran -g -O3 -ffast-math -march=native -v bug.f90 -lgfortran -lm -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /data03/vondele/gcc_trunk/gcc/configure --disable-bootstrap --prefix=/data03/vondele/gcc_trunk/build --enable-languages=c,c++,fortran --disable-multilib --with-ppl=/data03/vondele/gcc_trunk/build/ --with-cloog=/data03/vondele/gcc_trunk/build/ --with-libelf=/data03/vondele/libelf-0.8.12/build/ --enable-gold --enable-lto --enable-plugins
Thread model: posix
gcc version 4.5.0 20100302 (experimental) [trunk revision 157164] (GCC) 
COLLECT_GCC_OPTIONS='-g' '-O3' '-ffast-math'  '-v' '-shared-libgcc'
 /data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/f951 bug.f90 -march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=k8 -quiet -dumpbase bug.f90 -auxbase bug -g -O3 -version -ffast-math -fintrinsic-modules-path /data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/finclude -o /tmp/ccBhxqrU.s
GNU Fortran (GCC) version 4.5.0 20100302 (experimental) [trunk revision 157164] (x86_64-unknown-linux-gnu)
	compiled by GNU C version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036], GMP version 4.2.4, MPFR version 2.4.1, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Fortran (GCC) version 4.5.0 20100302 (experimental) [trunk revision 157164] (x86_64-unknown-linux-gnu)
	compiled by GNU C version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036], GMP version 4.2.4, MPFR version 2.4.1, MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
 <reduc_plus_expr 0x7f0b90414390
    type <vector_type 0x7f0b90574d20
        type <real_type 0x7f0b905230a8 real(kind=8) DF
            size <integer_cst 0x7f0b90507a50 constant 64>
            unit size <integer_cst 0x7f0b90507a78 constant 8>
            align 64 symtab 0 alias set 2 canonical type 0x7f0b905230a8 precision 64
            pointer_to_this <pointer_type 0x7f0b905232a0>>
        V2DF
        size <integer_cst 0x7f0b90507c58 constant 128>
        unit size <integer_cst 0x7f0b90507c80 constant 16>
        align 128 symtab 0 alias set 2 canonical type 0x7f0b90574d20 nunits 2
        pointer_to_this <pointer_type 0x7f0b9057ee70>>
   
    arg 0 <ssa_name 0x7f0b9040c6e0 type <vector_type 0x7f0b90574d20>
        visited var <var_decl 0x7f0b9040b8c0 vect_var_.28>def_stmt vect_var_.28_51 = vect_var_.27_49 + vect_var_.28_65;

        version 51>>
bug.f90: In function ‘init_grs’:
bug.f90:4:0: internal compiler error: in expand_debug_expr, at cfgexpand.c:2957
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Dominique d'Humieres 2010-03-02 13:41:24 UTC
Confirmed on  x86_64-apple-darwin10 with '-O3 -g -ffast-math'. It seems to appear between revisions 157098 and 157143.
Comment 2 Jakub Jelinek 2010-03-02 16:34:31 UTC
Created attachment 20003 [details]
gcc45-pr43229.patch

Untested fix.
Comment 3 H.J. Lu 2010-03-02 16:36:28 UTC
It is caused by revision 157009:

http://gcc.gnu.org/ml/gcc-cvs/2010-02/msg00592.html
Comment 4 Jakub Jelinek 2010-03-03 09:58:27 UTC
Subject: Bug 43229

Author: jakub
Date: Wed Mar  3 09:58:11 2010
New Revision: 157191

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157191
Log:
	PR debug/43229
	* cfgexpand.c (expand_debug_expr): Handle DOT_PROD_EXPR,
	WIDEN_MULT_EXPR and WIDEN_SUM_EXPR.  Return NULL without
	ICE for vector expressions, ADDR_SPACE_CONVERT_EXPR,
	FIXED_CONVERT_EXPR, OBJ_TYPE_REF and WITH_SIZE_EXPR.

	* gfortran.dg/pr43229.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/pr43229.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgexpand.c
    trunk/gcc/testsuite/ChangeLog

Comment 5 Jakub Jelinek 2010-03-03 10:02:10 UTC
Fixed.
Comment 6 hjl@gcc.gnu.org 2010-03-13 16:59:41 UTC
Subject: Bug 43229

Author: hjl
Date: Sat Mar 13 16:58:19 2010
New Revision: 157426

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157426
Log:
Backport testcases from mainline.

2010-03-13  H.J. Lu  <hongjiu.lu@intel.com>

	Backport from mainline:
	2010-03-11  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/43257
	* g++.dg/torture/pr43257.C: New test.

	2010-03-11  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/43255
	* gcc.c-torture/compile/pr43255.c: New testcase.

	2010-03-11  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* gcc.dg/pr43280.c: New testcase.

	2010-03-10  Jan Hubicka   <jh@suse.cz>

	* gcc.c-torture/compile/pr43288.c: New test.

	2010-03-10  Andrey Belevantsev  <abel@ispras.ru>

	PR middle-end/42859
	* g++.dg/eh/pr42859.C: New test.

	2010-03-09  Jakub Jelinek  <jakub@redhat.com>

	PR debug/43299
	* gcc.dg/pr43299.c: New test.

	2010-03-08  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/43269
	* gcc.c-torture/execute/pr43269.c: New testcase.

	2010-03-04  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/43164
	PR tree-optimization/43191
	* gcc.c-torture/compile/pr43164.c: New test.
	* gcc.c-torture/compile/pr43191.c: Likewise.

	2010-03-04  Changpeng Fang  <changpeng.fang@amd.com>

	PR middle-end/43209
	* gcc.dg/tree-ssa/ivopts-4.c: New.

	2010-03-03  Jakub Jelinek  <jakub@redhat.com>

	PR debug/43229
	* gfortran.dg/pr43229.f90: New test.

	PR debug/43237
	* gcc.dg/debug/dwarf2/pr43237.c: New test.

	2010-03-02  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/43180
	* gfortran.dg/internal_pack_10.f90: New test.

	2010-02-26  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/43188
	* gcc.c-torture/compile/pr43188.c: New testcase.

	2010-02-25  Jakub Jelinek  <jakub@redhat.com>

	PR debug/43166
	* gfortran.dg/debug/pr43166.f: New test.

	PR debug/43165
	* gcc.dg/torture/pr43165.c: New test.

	2010-02-23  Jakub Jelinek  <jakub@redhat.com>

	PR target/43107
	* gcc.target/i386/pr43107.c: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/eh/pr42859.C
      - copied unchanged from r157425, trunk/gcc/testsuite/g++.dg/eh/pr42859.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr43257.C
      - copied unchanged from r157425, trunk/gcc/testsuite/g++.dg/torture/pr43257.C
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr43164.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.c-torture/compile/pr43164.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr43188.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.c-torture/compile/pr43188.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr43191.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.c-torture/compile/pr43191.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr43255.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.c-torture/compile/pr43255.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr43288.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.c-torture/compile/pr43288.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr43269.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.c-torture/execute/pr43269.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr43280.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.dg/pr43280.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr43299.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.dg/pr43299.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/torture/pr43165.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.dg/torture/pr43165.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/tree-ssa/ivopts-4.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.dg/tree-ssa/ivopts-4.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/pr43107.c
      - copied unchanged from r157425, trunk/gcc/testsuite/gcc.target/i386/pr43107.c
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/debug/pr43166.f
      - copied unchanged from r157425, trunk/gcc/testsuite/gfortran.dg/debug/pr43166.f
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/internal_pack_10.f90
      - copied unchanged from r157425, trunk/gcc/testsuite/gfortran.dg/internal_pack_10.f90
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/pr43229.f90
      - copied unchanged from r157425, trunk/gcc/testsuite/gfortran.dg/pr43229.f90
Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog