Bug 36071 - [4.4 Regression] segmentation fault
Summary: [4.4 Regression] segmentation fault
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-04-28 12:44 UTC by Joost VandeVondele
Modified: 2008-05-05 05:04 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joost VandeVondele 2008-04-28 12:44:13 UTC
2 days old trunk fails on CVS CP2K [see PR29975] with

gfortran -c -v -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native -ffree-form -D__GFORTRAN -D__FFTSG  -D__COMPILE_ARCH="\"Linux-x86-64-gfortran\"" -D__COMPILE_DATE="\"Mon Apr 28 14:33:23 CEST 2008\"" -D__COMPILE_HOST="\"pcihopt3\"" -D__COMPILE_LASTCVS="\"/termination.F/1.32/Mon Apr 28 07:20:29 2008//\"" /data03/vondele/clean/cp2k/src/../src/hfx_libint_interface.F
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /data03/vondele/gcc_trunk/gcc/configure --prefix=/data03/vondele/gcc_trunk/build --with-gmp=/data03/vondele/ --with-mpfr=/data03/vondele/ --enable-languages=c,fortran
Thread model: posix
gcc version 4.4.0 20080426 (experimental) [trunk revision 134695] (GCC)
COLLECT_GCC_OPTIONS='-c' '-v' '-O2' '-ffast-math' '-funroll-loops' '-ftree-vectorize'  '-ffree-form' '-D__GFORTRAN' '-D__FFTSG' '-D__COMPILE_ARCH="Linux-x86-64-gfortran"' '-D__COMPILE_DATE="Mon Apr 28 14:33:23 CEST 2008"' '-D__COMPILE_HOST="pcihopt3"' '-D__COMPILE_LASTCVS="/termination.F/1.32/Mon Apr 28 07:20:29 2008//"'
 /data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.4.0/cc1 -E -lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN -quiet -v -D__GFORTRAN -D__FFTSG -D__COMPILE_ARCH="Linux-x86-64-gfortran" -D__COMPILE_DATE="Mon Apr 28 14:33:23 CEST 2008" -D__COMPILE_HOST="pcihopt3" -D__COMPILE_LASTCVS="/termination.F/1.32/Mon Apr 28 07:20:29 2008//" /data03/vondele/clean/cp2k/src/../src/hfx_libint_interface.F -march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=k8 -ffast-math -funroll-loops -ftree-vectorize -ffree-form -O2 -o /tmp/ccxHLZQc.f
ignoring nonexistent directory "/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /data03/vondele/gcc_trunk/build/include
 /data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include
 /data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-c' '-v' '-O2' '-ffast-math' '-funroll-loops' '-ftree-vectorize'  '-ffree-form' '-D__GFORTRAN' '-D__FFTSG' '-D__COMPILE_ARCH="Linux-x86-64-gfortran"' '-D__COMPILE_DATE="Mon Apr 28 14:33:23 CEST 2008"' '-D__COMPILE_HOST="pcihopt3"' '-D__COMPILE_LASTCVS="/termination.F/1.32/Mon Apr 28 07:20:29 2008//"'
 /data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.4.0/f951 /tmp/ccxHLZQc.f -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 hfx_libint_interface.F -auxbase hfx_libint_interface -O2 -version -ffast-math -funroll-loops -ftree-vectorize -ffree-form -fpreprocessed -fintrinsic-modules-path /data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/finclude -o /tmp/ccwowsgg.s
GNU Fortran (GCC) version 4.4.0 20080426 (experimental) [trunk revision 134695] (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.4.0 20080426 (experimental) [trunk revision 134695], GMP version 4.2.1, MPFR version 2.2.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
/data03/vondele/clean/cp2k/src/../src/hfx_libint_interface.F: In function ‘evaluate_eri_screen’:
/data03/vondele/clean/cp2k/src/../src/hfx_libint_interface.F:41: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

I'll see if can get more info. gfortran should really have an option to generate a single 'preprocessed' file, without module dependencies. It would simplify test case generation.
Comment 1 Joost VandeVondele 2008-04-28 12:48:20 UTC
trace 

rogram received signal SIGSEGV, Segmentation fault.
0x00000000005b4e18 in operand_equal_p (arg0=0x2b9220d76420, arg1=0x2b9220c5b240, flags=0) at /data03/vondele/gcc_trunk/gcc/gcc/fold-const.c:3037
3037      if (TYPE_UNSIGNED (TREE_TYPE (arg0)) != TYPE_UNSIGNED (TREE_TYPE (arg1)))
(gdb) bt
#0  0x00000000005b4e18 in operand_equal_p (arg0=0x2b9220d76420, arg1=0x2b9220c5b240, flags=0)
    at /data03/vondele/gcc_trunk/gcc/gcc/fold-const.c:3037
#1  0x00000000007f7d70 in simplify_replace_tree (expr=0x2b9220d76420, old=0x2b9220c5b240, new_tree=0x2b922099d960)
    at /data03/vondele/gcc_trunk/gcc/gcc/tree-ssa-loop-niter.c:1347
#2  0x00000000007f7e72 in simplify_replace_tree (expr=0x2b9221320840, old=0x2b9220c5b240, new_tree=0x2b922099d960)
    at /data03/vondele/gcc_trunk/gcc/gcc/tree-ssa-loop-niter.c:1358
#3  0x00000000007f7e72 in simplify_replace_tree (expr=0x2b9221320880, old=0x2b9220c5b240, new_tree=0x2b922099d960)
    at /data03/vondele/gcc_trunk/gcc/gcc/tree-ssa-loop-niter.c:1358
#4  0x00000000007f80ad in substitute_in_loop_info (loop=0x2b9220bac5a0, name=0x90, val=0x0)
    at /data03/vondele/gcc_trunk/gcc/gcc/tree-ssa-loop-niter.c:3070
#5  0x0000000000703be4 in replace_uses_by (name=0x2b9220c5b240, val=0x2b922099d960) at /data03/vondele/gcc_trunk/gcc/gcc/tree-cfg.c:1273
#6  0x00000000007132db in tree_merge_blocks (a=0x2b9220d9d900, b=0x2b9220e0e360) at /data03/vondele/gcc_trunk/gcc/gcc/tree-cfg.c:1337
#7  0x0000000000ac4206 in merge_blocks (a=0x2b9220d9d900, b=0x2b9220e0e360) at /data03/vondele/gcc_trunk/gcc/gcc/cfghooks.c:660
#8  0x000000000071b660 in cleanup_tree_cfg_bb (bb=0x2b9220d9d900) at /data03/vondele/gcc_trunk/gcc/gcc/tree-cfgcleanup.c:568
#9  0x000000000071bca8 in cleanup_tree_cfg () at /data03/vondele/gcc_trunk/gcc/gcc/tree-cfgcleanup.c:616
#10 0x0000000000896715 in execute_vrp () at /data03/vondele/gcc_trunk/gcc/gcc/tree-vrp.c:6758
#11 0x0000000000677c26 in execute_one_pass (pass=0xf86c60) at /data03/vondele/gcc_trunk/gcc/gcc/passes.c:1132
Comment 2 Joost VandeVondele 2008-04-28 12:55:14 UTC
revision 134754 seems to pass.
Comment 3 Joost VandeVondele 2008-04-28 13:56:23 UTC
assuming fixed