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/66193] ICE for initialisation of some non-zero-sized arrays


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193

G. Steinmetz <gscfq@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gscfq@t-online.de

--- Comment #17 from G. Steinmetz <gscfq@t-online.de> ---
(In reply to kargl from comment 16)
> I propose that first 2 testcases be committed to the testsuite ...
Good, sounds reasonable.


I did a new search for test cases without nested array constructors 
and found a few other valid examples :

$ cat za3.f90
program p
   real, parameter :: z(3) = 2.0 * [real :: 1, (2), 3]
   print *, z
end

$ cat za4.f90
program p
   integer, parameter :: z(3) = 2 * [integer :: 1, (2), 3]
   print *, z
end

$ cat za5.f90
program p
   real, parameter :: z(2) = [real :: 1, (2)] + 10.0
   print *, z
end


$ gfortran-9-20180603 -c za3.f90
f951: internal compiler error: Segmentation fault
0xba15af crash_signal
        ../../gcc/toplev.c:325
0x675028 reduce_binary_ca
        ../../gcc/fortran/arith.c:1348
0x674fc2 reduce_binary_ca
        ../../gcc/fortran/arith.c:1335
0x675204 reduce_binary
        ../../gcc/fortran/arith.c:1418
0x675b3b eval_intrinsic
        ../../gcc/fortran/arith.c:1596
0x675d9e eval_intrinsic_f3
        ../../gcc/fortran/arith.c:1733
0x6dd7b4 match_add_operand
        ../../gcc/fortran/matchexp.c:392
0x6dd99c match_level_2
        ../../gcc/fortran/matchexp.c:480
0x6ddaf2 match_level_3
        ../../gcc/fortran/matchexp.c:551
0x6ddc04 match_level_4
        ../../gcc/fortran/matchexp.c:599
0x6ddc04 match_and_operand
        ../../gcc/fortran/matchexp.c:693
0x6dddc2 match_or_operand
        ../../gcc/fortran/matchexp.c:722
0x6ddeb2 match_equiv_operand
        ../../gcc/fortran/matchexp.c:765
0x6ddfa2 match_level_5
        ../../gcc/fortran/matchexp.c:811
0x6dd311 gfc_match_expr(gfc_expr**)
        ../../gcc/fortran/matchexp.c:870
0x6ae3e2 gfc_match_init_expr(gfc_expr**)
        ../../gcc/fortran/expr.c:2807
0x69bfb9 variable_decl
        ../../gcc/fortran/decl.c:2681
0x69bfb9 gfc_match_data_decl()
        ../../gcc/fortran/decl.c:5880
0x6f6fb9 match_word_omp_simd
        ../../gcc/fortran/parse.c:93
0x6fa6ae match_word
        ../../gcc/fortran/parse.c:376

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