This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/43747] New: [4.6 Regression] ICE in find_array_section, at fortran/expr.c:1551


After the merge from fortran-exp to trunk the following tests

[macbook] f90/bug% cat pr19925_1.f90
INTEGER, PARAMETER :: N=100000
INTEGER, PARAMETER :: I(N)=(/(MOD(K,2),K=1,N)/)
INTEGER, PARAMETER :: M(N)=I(N:1:-1)
END

[macbook] f90/bug% cat pr19925_1_db.f90
INTEGER, PARAMETER :: N=100000
INTEGER, PARAMETER :: I(N)=(/(MOD(K,2),K=1,N)/)
INTEGER, PARAMETER :: M(N)=I(N:1:-1)
print *, I(1), M(1), I(N), M(N)
END

give the same ICE:

f951: internal compiler error: in find_array_section, at fortran/expr.c:1551

The backtrace is

(gdb) bt
#0  fancy_abort (file=0x10097b308 "../../work/gcc/fortran/expr.c", line=1551,
function=0x1009fc790 "find_array_section") at ../../work/gcc/diagnostic.c:780
#1  0x0000000100028728 in find_array_section (expr=0x142ed3160,
ref=0x142ed3ae0) at ../../work/gcc/fortran/expr.c:1551
#2  0x000000010002ae5b in simplify_const_ref (p=<value temporarily unavailable,
due to optimizations>) at ../../work/gcc/fortran/expr.c:1642
#3  0x000000010002b81d in gfc_simplify_expr (p=0x142ed3160, type=0) at
../../work/gcc/fortran/expr.c:1917
#4  0x000000010002bb4b in simplify_parameter_variable (p=0x142ed2c20, type=0)
at ../../work/gcc/fortran/expr.c:1785
#5  0x000000010002abd8 in gfc_reduce_init_expr (expr=0x142ed2c20) at
../../work/gcc/fortran/expr.c:2620
#6  0x000000010002ac39 in gfc_match_init_expr (result=0x7fff5fbfd340) at
../../work/gcc/fortran/expr.c:2663
#7  0x000000010001d96c in gfc_match_data_decl () at
../../work/gcc/fortran/decl.c:1858
#8  0x0000000100063ea2 in match_word (str=<value temporarily unavailable, due
to optimizations>, subr=0x10001cae0 <gfc_match_data_decl>,
old_locus=0x7fff5fbfd3d0) at ../../work/gcc/fortran/parse.c:65
#9  0x000000010006472d in decode_statement () at
../../work/gcc/fortran/parse.c:284
#10 0x0000000100065e65 in next_statement () at
../../work/gcc/fortran/parse.c:722
#11 0x00000001000672d0 in parse_spec (st=<value temporarily unavailable, due to
optimizations>) at ../../work/gcc/fortran/parse.c:2578
#12 0x00000001000698cd in parse_progunit (st=ST_ARITHMETIC_IF) at
../../work/gcc/fortran/parse.c:3849
#13 0x000000010006a97c in gfc_parse_file () at
../../work/gcc/fortran/parse.c:4283
#14 0x00000001000a4bcc in gfc_be_parse_file (set_yydebug=<value temporarily
unavailable, due to optimizations>) at ../../work/gcc/fortran/f95-lang.c:239
#15 0x00000001006da71b in toplev_main (argc=2, argv=0x7fff5fbfd958) at
../../work/gcc/toplev.c:1053
#16 0x0000000100001014 in start ()

Note that before the merge trunk gave

[macbook] f90/bug% time gfcp pr19925_1.f90
384.017u 1.170s 6:29.56 98.8%   0+0k 1+26io 0pf+0w
[macbook] f90/bug% time gfcp pr19925_1_db.f90
pr19925_1_db.f90:2.27:

INTEGER, PARAMETER :: I(N)=(/(MOD(K,2),K=1,N)/)
                           1
Fatal Error: The number of elements in the array constructor at (1) requires an
increase of the allowed 65535 upper limit.   See -fmax-array-constructor option
383.576u 1.089s 6:29.27 98.8%   0+0k 0+8io 0pf+0w

while branch fortran-exp revision 157955 gave

[macbook] f90/bug% time /opt/gcc/gcc4.5f/bin/gfortran pr19925_1.f90
2.845u 0.193s 0:03.72 81.4%     0+0k 2+26io 0pf+0w
[macbook] f90/bug% a.out 
[macbook] f90/bug% time /opt/gcc/gcc4.5f/bin/gfortran pr19925_1_db.f90
2.938u 0.198s 0:03.23 96.5%     0+0k 0+8io 0pf+0w
[macbook] f90/bug% a.out
           1           0           0           1

The regression is probably due to the last patch to fix the compilation of
pr34554.


-- 
           Summary: [4.6 Regression] ICE in find_array_section, at
                    fortran/expr.c:1551
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr
 GCC build triplet: x86_64-apple-darwin10
  GCC host triplet: x86_64-apple-darwin10
GCC target triplet: x86_64-apple-darwin10


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43747


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]