public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/107996] New: ICE in gfc_walk_array_ref, at fortran/trans-array.cc:11429
@ 2022-12-06 18:07 gscfq@t-online.de
  2022-12-06 18:08 ` [Bug fortran/107996] " gscfq@t-online.de
  0 siblings, 1 reply; 2+ messages in thread
From: gscfq@t-online.de @ 2022-12-06 18:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107996
           Summary: ICE in gfc_walk_array_ref, at
                    fortran/trans-array.cc:11429
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to at least r5 :


$ cat z1.f90
program p
   associate (a => 1)
      print *, [character(size(a(:))) :: 'a']
   end associate
end


$ gfortran-13-20221204 -c z1.f90
z1.f90:3:45:

    3 |       print *, [character(size(a(:))) :: 'a']
      |                                             1
internal compiler error: in gfc_walk_array_ref, at fortran/trans-array.cc:11429
0x8dfa84 gfc_walk_array_ref(gfc_ss*, gfc_expr*, gfc_ref*)
        ../../gcc/fortran/trans-array.cc:11429
0x8eba60 gfc_walk_expr(gfc_expr*)
        ../../gcc/fortran/trans-array.cc:11791
0x910cf3 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
        ../../gcc/fortran/trans-expr.cc:6325
0x917a9a gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.cc:9461
0x91aba3 gfc_conv_expr_val(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.cc:9514
0x91bc00 gfc_conv_expr_type(gfc_se*, gfc_expr*, tree_node*)
        ../../gcc/fortran/trans-expr.cc:9528
0x8e1ec2 trans_array_constructor
        ../../gcc/fortran/trans-array.cc:2783
0x8e1ec2 gfc_add_loop_ss_code
        ../../gcc/fortran/trans-array.cc:3181
0x8e2225 gfc_conv_loop_setup(gfc_loopinfo*, locus*)
        ../../gcc/fortran/trans-array.cc:5478
0x950df5 gfc_trans_transfer(gfc_code*)
        ../../gcc/fortran/trans-io.cc:2671
0x8cedc7 trans_code
        ../../gcc/fortran/trans.cc:2170
0x94e542 build_dt
        ../../gcc/fortran/trans-io.cc:2051
0x8cede7 trans_code
        ../../gcc/fortran/trans.cc:2142
0x97980f gfc_trans_block_construct(gfc_code*)
        ../../gcc/fortran/trans-stmt.cc:2315
0x8ceee7 trans_code
        ../../gcc/fortran/trans.cc:2046
0x905e19 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.cc:7674
0x87817e translate_all_program_units
        ../../gcc/fortran/parse.cc:6721
0x87817e gfc_parse_file()
        ../../gcc/fortran/parse.cc:7027
0x8c653f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:229

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/107996] ICE in gfc_walk_array_ref, at fortran/trans-array.cc:11429
  2022-12-06 18:07 [Bug fortran/107996] New: ICE in gfc_walk_array_ref, at fortran/trans-array.cc:11429 gscfq@t-online.de
@ 2022-12-06 18:08 ` gscfq@t-online.de
  0 siblings, 0 replies; 2+ messages in thread
From: gscfq@t-online.de @ 2022-12-06 18:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code,
                   |                            |rejects-valid

--- Comment #1 from G. Steinmetz <gscfq@t-online.de> ---

Moreover, this valid code should print 'a' :


$ cat z2.f90
program p
   associate (a => [1])
      print *, [character(size(a(:))) :: 'a']
   end associate
end

$ cat z3.f90
program p
   associate (a => [1])
      print *, [character(size(a)) :: 'a']
   end associate
end


$ gfortran-13-20221204 -c z3.f90
z3.f90:3:42:

    3 |       print *, [character(size(a)) :: 'a']
      |                                          ^
Error: size of variable 'A.1' is too large

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-06 18:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06 18:07 [Bug fortran/107996] New: ICE in gfc_walk_array_ref, at fortran/trans-array.cc:11429 gscfq@t-online.de
2022-12-06 18:08 ` [Bug fortran/107996] " gscfq@t-online.de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).