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/87993] New: ICE in gfc_constructor_first, at fortran/constructor.c:234


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

            Bug ID: 87993
           Summary: ICE in gfc_constructor_first, at
                    fortran/constructor.c:234
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Should be valid code, according to F2018 9.4.5 a type-param-inquiry
is scalar even if the designator is an array.


$ cat z1.f90
program p
   integer, parameter :: a(2) = 1
   integer, parameter :: b = a(2)%kind
end


$ cat z2.f90
program p
   integer, parameter :: a(2) = 1
   integer, parameter :: b = a%kind
end


$ gfortran-9-20181111 -c z1.f90
f951: internal compiler error: Segmentation fault
0xb297bf crash_signal
        ../../gcc/toplev.c:325
0x1372630 splay_tree_min
        ../../libiberty/splay-tree.c:487
0x5feb8d gfc_constructor_first(splay_tree_s*)
        ../../gcc/fortran/constructor.c:234
0x61ed48 simplify_constructor
        ../../gcc/fortran/expr.c:1240
0x61ed48 gfc_simplify_expr(gfc_expr*, int)
        ../../gcc/fortran/expr.c:2174
0x61f16c simplify_parameter_variable
        ../../gcc/fortran/expr.c:2016
0x61ef79 gfc_simplify_expr(gfc_expr*, int)
        ../../gcc/fortran/expr.c:2153
0x678059 gfc_match_varspec(gfc_expr*, int, bool, bool)
        ../../gcc/fortran/primary.c:2287
0x679b6e gfc_match_rvalue(gfc_expr**)
        ../../gcc/fortran/primary.c:3429
0x6503ee match_primary
        ../../gcc/fortran/matchexp.c:157
0x6503ee match_level_1
        ../../gcc/fortran/matchexp.c:211
0x6503ee match_mult_operand
        ../../gcc/fortran/matchexp.c:267
0x650638 match_add_operand
        ../../gcc/fortran/matchexp.c:356
0x65088c match_level_2
        ../../gcc/fortran/matchexp.c:480
0x6509e2 match_level_3
        ../../gcc/fortran/matchexp.c:551
0x650ad4 match_level_4
        ../../gcc/fortran/matchexp.c:599
0x650ad4 match_and_operand
        ../../gcc/fortran/matchexp.c:693
0x650cc2 match_or_operand
        ../../gcc/fortran/matchexp.c:722
0x650d92 match_equiv_operand
        ../../gcc/fortran/matchexp.c:765
0x650e64 match_level_5
        ../../gcc/fortran/matchexp.c:811

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