Bug 41225 - [4.5 Regression] VTA: internal compiler error: in vect_stmt_relevant_p, at tree-vect-stmts.c:150
Summary: [4.5 Regression] VTA: internal compiler error: in vect_stmt_relevant_p, at tr...
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: Alexandre Oliva
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2009-09-02 13:33 UTC by Joost VandeVondele
Modified: 2009-09-04 19:05 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 4.4.2
Known to fail: 4.5.0
Last reconfirmed: 2009-09-03 18:31:57


Attachments
testcase (20.83 KB, application/x-tar)
2009-09-02 13:40 UTC, Joost VandeVondele
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joost VandeVondele 2009-09-02 13:33:43 UTC
trying '-fvar-tracking-assignments' with current trunk on CP2K, I get the following ICE:

gfortran -c -fvar-tracking-assignments -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native -ffree-form -D__GFORTRAN -D__FFTSG -D__FFTW3 -D__LIBINT -I/ext/software/64/gfortran-suite/include -D__COMPILE_ARCH="\"Linux-x86-64-gfortran\"" -D__COMPILE_DATE="\"Wed Sep  2 15:32:16 CEST 2009\"" -D__COMPILE_HOST="\"pcihopt3\"" -D__COMPILE_LASTCVS="\"/wfn_fitting_methods.F/1.12/Tue Sep  1 16:19:34 2009//\"" /data03/vondele/clean/cp2k/src/../src/hfx_contract_block.F
/data03/vondele/clean/cp2k/src/../src/hfx_contract_block.F: In function ‘block_15_1_1_1’:
/data03/vondele/clean/cp2k/src/../src/hfx_contract_block.F:18231:0: internal compiler error: in vect_stmt_relevant_p, at tree-vect-stmts.c:150
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

looking for a testcase
Comment 1 Joost VandeVondele 2009-09-02 13:40:14 UTC
Created attachment 18465 [details]
testcase

compile with:

gfortran -c -fvar-tracking-assignments -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native PR41225.f90

-v reports:

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/
Thread model: posix
gcc version 4.5.0 20090902 (experimental) [trunk revision 151319] (GCC)
COLLECT_GCC_OPTIONS='-c' '-fvar-tracking-assignments' '-O2' '-ffast-math' '-funroll-loops' '-ftree-vectorize'  '-v'
 /data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/f951 PR41225.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 PR41225.f90 -auxbase PR41225 -O2 -version -fvar-tracking-assignments -ffast-math -funroll-loops -ftree-vectorize -fintrinsic-modules-path /data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/finclude -o /tmp/ccvJZHDG.s
Comment 2 Joost VandeVondele 2009-09-02 13:43:35 UTC
reduced testcase:

  SUBROUTINE block_15_1_1_1(kbd,kbc,kad,kac,pbd,pbc,pad,pac,prim,scale)
    INTEGER, PARAMETER :: dp=8
    REAL(KIND=dp) :: kbd(1*1), kbc(1*1), kad(15*1), kac(15*1), pbd(1*1), &
      pbc(1*1), pad(15*1), pac(15*1), prim(15*1*1*1), scale
    INTEGER                                  :: ma, mb, mc, md, p_index
      DO md = 1,1
        DO mc = 1,1
          DO mb = 1,1
            DO ma = 1,15
              p_index=p_index+1
              tmp = scale*prim(p_index)
              ks_bd = ks_bd + tmp* pac((mc-1)*15+ma)
            END DO
            kbd((md-1)*1+mb) = kbd((md-1)*1+mb) - ks_bd
          END DO
        END DO
      END DO
  END SUBROUTINE block_15_1_1_1
Comment 3 Joost VandeVondele 2009-09-03 06:48:22 UTC
gfortran -c  -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native -g bug.f90

now fails.
Comment 4 Alexandre Oliva 2009-09-04 19:04:07 UTC
Subject: Bug 41225

Author: aoliva
Date: Fri Sep  4 19:03:49 2009
New Revision: 151438

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151438
Log:
gcc/ChangeLog:
PR debug/41225
* tree-vect-stmts.c (vect_stmt_relevant_p): Skip debug uses.
gcc/testsuite/ChangeLog:
PR debug/41225
* gfortran.dg/pr41225.f90: New.

Added:
    trunk/gcc/testsuite/gfortran.dg/pr41225.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-stmts.c

Comment 5 Alexandre Oliva 2009-09-04 19:05:20 UTC
Fixed
Comment 6 hjl@gcc.gnu.org 2009-09-10 18:59:00 UTC
Subject: Bug 41225

Author: hjl
Date: Thu Sep 10 18:57:46 2009
New Revision: 151611

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151611
Log:
2009-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	Backport from mainline:
	2009-09-10  Richard Guenther  <rguenther@suse.de>

	PR middle-end/41257
	* g++.dg/torture/pr41257-2.C: New testcase.

	2009-09-08  Alexandre Oliva  <aoliva@redhat.com>

	PR debug/41229
	PR debug/41291
	PR debug/41300
	* gfortran.dg/pr41229.f90: New.

	2009-09-08  Alexandre Oliva  <aoliva@redhat.com>

	PR debug/41232
	* gcc.dg/pr41232.c: New.

	2009-09-07  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/41282
	* gcc.c-torture/compile/pr41282.c: New test.

	2009-09-06  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/41241
	* gcc.dg/pr41241.c: New test.

	2009-09-06  Richard Guenther  <rguenther@suse.de>

	PR middle-end/41144
	* g++.dg/torture/pr41144.C: New testcase.

	2009-09-06  Richard Guenther  <rguenther@suse.de>

	PR middle-end/41261
	* gcc.dg/torture/pr41261.c: New testcase.

	2009-09-05  Richard Guenther  <rguenther@suse.de>

	PR middle-end/41181
	* gcc.c-torture/compile/pr41181.c: New testcase.

	2009-09-05  Richard Guenther  <rguenther@suse.de>

	PR debug/41273
	* g++.dg/torture/pr41273.C: New testcase.

	2009-09-04  Alexandre Oliva  <aoliva@redhat.com>

	PR debug/41225
	* gfortran.dg/pr41225.f90: New.

	2009-09-04  Richard Guenther  <rguenther@suse.de>

	PR middle-end/41257
	* g++.dg/torture/pr41257.C: New testcase.

	2009-09-04  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/41112
	* gnat.dg/array8.adb: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr41144.C
      - copied unchanged from r151610, trunk/gcc/testsuite/g++.dg/torture/pr41144.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr41257-2.C
      - copied unchanged from r151609, trunk/gcc/testsuite/g++.dg/torture/pr41257-2.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr41257.C
      - copied unchanged from r151610, trunk/gcc/testsuite/g++.dg/torture/pr41257.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/torture/pr41273.C
      - copied unchanged from r151610, trunk/gcc/testsuite/g++.dg/torture/pr41273.C
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr41181.c
      - copied unchanged from r151610, trunk/gcc/testsuite/gcc.c-torture/compile/pr41181.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr41282.c
      - copied unchanged from r151609, trunk/gcc/testsuite/gcc.c-torture/compile/pr41282.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr41232.c
      - copied unchanged from r151609, trunk/gcc/testsuite/gcc.dg/pr41232.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr41241.c
      - copied unchanged from r151610, trunk/gcc/testsuite/gcc.dg/pr41241.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/torture/pr41261.c
      - copied unchanged from r151610, trunk/gcc/testsuite/gcc.dg/torture/pr41261.c
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/pr41225.f90
      - copied unchanged from r151610, trunk/gcc/testsuite/gfortran.dg/pr41225.f90
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/pr41229.f90
      - copied unchanged from r151609, trunk/gcc/testsuite/gfortran.dg/pr41229.f90
    branches/gcc-4_4-branch/gcc/testsuite/gnat.dg/array8.adb
      - copied unchanged from r151610, trunk/gcc/testsuite/gnat.dg/array8.adb
Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog