Bug 37223 - [4.4 regression] internal compiler error: in referenced_var_lookup, at tree-dfa.c:563
Summary: [4.4 regression] internal compiler error: in referenced_var_lookup, at tree-d...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: 4.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks: 29975
  Show dependency treegraph
 
Reported: 2008-08-24 18:02 UTC by Joost VandeVondele
Modified: 2008-08-25 06:10 UTC (History)
2 users (show)

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


Attachments
testcase (903.27 KB, application/octet-stream)
2008-08-24 18:05 UTC, Joost VandeVondele
Details
Fortran only testcase (812.77 KB, application/octet-stream)
2008-08-24 20:00 UTC, Joost VandeVondele
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joost VandeVondele 2008-08-24 18:02:53 UTC
This nights trunk fails (gcc of Aug 19th was still fine) with:

gfortran -c -O3 -ffast-math -funroll-loops -ftree-vectorize -march=native -ffree-form -D__GFORTRAN -D__FFTSG -g -v pw_spline_utils.F
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /data/vondele/gcc_bench/gcc_trunk/gcc/configure --prefix=/data/vondele/gcc_bench/gcc_trunk/build --enable-languages=c,fortran
Thread model: posix
gcc version 4.4.0 20080823 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-c' '-O3' '-ffast-math' '-funroll-loops' '-ftree-vectorize'  '-ffree-form' '-D__GFORTRAN' '-D__FFTSG' '-g' '-v'
 /data/vondele/gcc_bench/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.4.0/f951 pw_spline_utils.F -cpp /tmp/ccfcaaIN.f90 -quiet -v -D__GFORTRAN -D__FFTSG pw_spline_utils.F -march=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=core2 -ffast-math -funroll-loops -ftree-vectorize -ffree-form -g -fworking-directory -O3 -march=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=core2 -quiet -dumpbase pw_spline_utils.F -auxbase pw_spline_utils -g -O3 -version -ffast-math -funroll-loops -ftree-vectorize -ffree-form -fintrinsic-modules-path /data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/finclude -o /tmp/cc2IAzfr.s
ignoring nonexistent directory "/data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
 /data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/finclude
 .
#include <...> search starts here:
 /usr/local/include
 /data/vondele/gcc_bench/gcc_trunk/build/include
 /data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include
 /data/vondele/gcc_bench/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include-fixed
 /usr/include
End of search list.
GNU Fortran (GCC) version 4.4.0 20080823 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.4.0 20080823 (experimental), GMP version 4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
pw_spline_utils.F: In function ‘T.974’:
pw_spline_utils.F:1482: internal compiler error: in referenced_var_lookup, at tree-dfa.c:563
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

testcase to be attached
Comment 1 Joost VandeVondele 2008-08-24 18:05:57 UTC
Created attachment 16137 [details]
testcase

untar and compile with 

gfortran -c -O3 -ffast-math -funroll-loops -ftree-vectorize -march=native  -ffree-form -D__GFORTRAN -D__FFTSG -g -v pw_spline_utils.F
Comment 2 Thomas Koenig 2008-08-24 18:42:32 UTC
(In reply to comment #1)
> Created an attachment (id=16137) [edit]
> testcase
> 
> untar and compile with 
> 
> gfortran -c -O3 -ffast-math -funroll-loops -ftree-vectorize -march=native 
> -ffree-form -D__GFORTRAN -D__FFTSG -g -v pw_spline_utils

I can't reproduce this.

What I get if I compile this using your command line is

NU Fortran (GCC) version 4.4.0 20080823 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.4.0 20080823 (experimental), GMP version 4.2.1, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Fatal Error: Reading module cell_types at line 35 column 30: Expected integer


Comment 3 Joost VandeVondele 2008-08-24 19:13:44 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Created an attachment (id=16137) [edit]
> > testcase
> > 
> > untar and compile with 
> > 
> > gfortran -c -O3 -ffast-math -funroll-loops -ftree-vectorize -march=native 
> > -ffree-form -D__GFORTRAN -D__FFTSG -g -v pw_spline_utils
> 

strange, I downloaded the tarbal, and it reproduced 'just fine'. Why would module files be non-compatible between different installation of gcc?

The full CP2K sources are the ones used for the CP2K gfortran benchmark:
ftp://ftp.berlios.de/pub/cp2k/gfortran/gcc_bench.tgz
Comment 4 Joost VandeVondele 2008-08-24 20:00:26 UTC
Created attachment 16138 [details]
Fortran only testcase

compile as:

gfortran -c -O3 -ffast-math -funroll-loops -ftree-vectorize -march=native -ffree-line-length-none PR37223.f90
Comment 5 Andrew Pinski 2008-08-24 20:34:06 UTC
I think this was fixed by reverting the patch which turned on IPA-CP by default.  Also I think this was really fixed by http://gcc.gnu.org/ml/gcc-cvs/2008-08/msg01104.html.
Comment 6 Joost VandeVondele 2008-08-25 06:10:53 UTC
today's trunk gets this right.