I receive an ICE for the attached Fortran source code. I use $ /home/eschnett/gcc/bin/gfortran --version GNU Fortran 95 (GCC 3.5.0 20040724 (experimental)) with the options $ /home/eschnett/gcc/bin/gfortran -march=pentium4 -malign-double -g3 -O3 -funroll-loops -Wall -Wshadow -c ih_interpolate.f90 ih_interpolate.f90: In function `ih_interpolate': ih_interpolate.f90:0: error: Non-addressable variable inside an alias set. .GLOBAL_VAR, UID 3370, is an alias tag, is static, call clobbered, default def: .GLOBAL_VAR_5147 TMT.3890, UID 3154, is an alias tag, is global, call clobbered, default def: TMT.3890_5164, may aliases: { .GLOBAL_VAR } ih_interpolate.f90:0: internal compiler error: verify_flow_insensitive_alias_info failed.
Created attachment 6825 [details] failing source code
This is most likely the same as Ada bootstrap failure too.
I see this with a fortran to C compiler for SPEC CPU 2000FP code. Can you please look into this bug, Diego?
Subject: Re: ICE in verify_flow_insensitive_alias_info On Tue, 2004-07-27 at 02:20, pinskia at gcc dot gnu dot org wrote: > I see this with a fortran to C compiler for SPEC CPU 2000FP code. > Can you please look into this bug, Diego? > This patches fixes this problem. Essentially, we should always consider .GLOBAL_VAR as potentially aliased. This may have been related to the Ada bootstrap problems. Kenner, could you check? Thanks. I'm not quite sure whether this test can be added as-is to the fortran testsuite. Could anyone confirm if I can just drop it in gfortran.dg? How should I change the compile flags used? Bootstrapped and tested x86 and ppc. Diego. PR tree-optimization/16705 * tree-ssa-alias.c (create_global_var): Set DECL_EXTERNAL on .GLOBAL_VAR. Index: tree-ssa-alias.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/tree-ssa-alias.c,v retrieving revision 2.17 diff -d -c -p -r2.17 tree-ssa-alias.c *** tree-ssa-alias.c 27 Jul 2004 15:32:44 -0000 2.17 --- tree-ssa-alias.c 28 Jul 2004 04:15:26 -0000 *************** create_global_var (void) *** 2202,2208 **** size_type_node); DECL_ARTIFICIAL (global_var) = 1; TREE_READONLY (global_var) = 0; ! DECL_EXTERNAL (global_var) = 0; TREE_STATIC (global_var) = 1; TREE_USED (global_var) = 1; DECL_CONTEXT (global_var) = NULL_TREE; --- 2205,2211 ---- size_type_node); DECL_ARTIFICIAL (global_var) = 1; TREE_READONLY (global_var) = 0; ! DECL_EXTERNAL (global_var) = 1; TREE_STATIC (global_var) = 1; TREE_USED (global_var) = 1; DECL_CONTEXT (global_var) = NULL_TREE;
Subject: Bug 16705 CVSROOT: /cvs/gcc Module name: gcc Changes by: dnovillo@gcc.gnu.org 2004-07-28 04:53:24 Modified files: gcc : ChangeLog tree-ssa-alias.c Log message: PR tree-optimization/16705 * tree-ssa-alias.c (create_global_var): Set DECL_EXTERNAL on .GLOBAL_VAR. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4716&r2=2.4717 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-alias.c.diff?cvsroot=gcc&r1=2.17&r2=2.18
Confirmed, just waiting for the testcase.
Created attachment 6844 [details] shorter testcase Here's a shorter testcase that might be included in the testsuite. Just compile with -O2.
Created attachment 6845 [details] fortran 77 testcase Here's an even simpler testcase that is also valid fortran 77.
Closing as fixed.