public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/105167] New: ICE in gfc_set_default_type, at fortran/symbol.cc:298
@ 2022-04-05 16:22 gscfq@t-online.de
  2022-04-05 16:22 ` [Bug fortran/105167] " gscfq@t-online.de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gscfq@t-online.de @ 2022-04-05 16:22 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105167
           Summary: ICE in gfc_set_default_type, at fortran/symbol.cc:298
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Gives an ICE with undefined "n" (also sporadically before 20210926) :


$ cat z1.f90
program p
   if ( len([character(n) :: '']) /= 0 ) stop
end


$ gfortran-12-20210905 -c z1.f90
z1.f90:2:23:

    2 |    if ( len([character(n) :: '']) /= 0 ) stop
      |                       1
Error: Scalar INTEGER expression expected at (1)
z1.f90:2:23:

    2 |    if ( len([character(n) :: '']) /= 0 ) stop
      |                       1
Error: Scalar INTEGER expression expected at (1)


$ gfortran-12-20220403 -c z1.f90
f951: internal compiler error: Segmentation fault
0xcce34f crash_signal
        ../../gcc/toplev.cc:322
0x7919da gfc_get_default_type(char const*, gfc_namespace*)
        ../../gcc/fortran/symbol.cc:231
0x795734 gfc_set_default_type(gfc_symbol*, int, gfc_namespace*)
        ../../gcc/fortran/symbol.cc:298
0x765671 resolve_variable
        ../../gcc/fortran/resolve.cc:5886
0x765671 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7189
0x767024 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:12657
0x767024 resolve_charlen
        ../../gcc/fortran/resolve.cc:12607
0x773809 resolve_charlen
        ../../gcc/fortran/resolve.cc:12598
0x773809 resolve_types
        ../../gcc/fortran/resolve.cc:17482
0x76ecbc gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.cc:17599
0x756c44 resolve_all_program_units
        ../../gcc/fortran/parse.cc:6604
0x756c44 gfc_parse_file()
        ../../gcc/fortran/parse.cc:6860
0x7a47df gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:216

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

end of thread, other threads:[~2024-05-21  9:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 16:22 [Bug fortran/105167] New: ICE in gfc_set_default_type, at fortran/symbol.cc:298 gscfq@t-online.de
2022-04-05 16:22 ` [Bug fortran/105167] " gscfq@t-online.de
2022-04-05 18:19 ` kargl at gcc dot gnu.org
2022-04-05 18:20 ` kargl at gcc dot gnu.org
2023-02-13 21:39 ` anlauf at gcc dot gnu.org
2023-04-26  6:55 ` rguenth at gcc dot gnu.org
2023-07-27  9:22 ` rguenth at gcc dot gnu.org
2024-05-21  9:11 ` jakub at gcc dot gnu.org

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).