[Bug fortran/96011] New: ICE in check_function_name, at fortran/decl.c:2429

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Tue Jun 30 20:09:06 GMT 2020


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

            Bug ID: 96011
           Summary: ICE in check_function_name, at fortran/decl.c:2429
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Seems to be an old issue :


$ cat z1.f90
program p
contains
   type(t) function f()
      external f.n
   end
end


$ cat z2.f90
program p
   type t
   end type
contains
   type(t) function f()
      external f.n
   end
end


$ gfortran-6 -c z2.f90 -g
z2.f90:6:16:

       external f.n
                1
Error: Function name 'f' not allowed at (1)


$ gfortran-11-20200628 -std=f2018 -c z1.f90    # or with -g etc.
0x657422 gfc_format_decoder
        ../../gcc/fortran/error.c:970
0x1504fce pp_format(pretty_printer*, text_info*)
        ../../gcc/pretty-print.c:1475
0x14f96df diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        ../../gcc/diagnostic.c:1159
0x657489 gfc_report_diagnostic
        ../../gcc/fortran/error.c:782
0x65759b gfc_error_opt
        ../../gcc/fortran/error.c:1352
0x658aa0 gfc_error(char const*, ...)
        ../../gcc/fortran/error.c:1381
0x63e415 check_function_name
        ../../gcc/fortran/decl.c:2429
0x6402c2 attr_decl1
        ../../gcc/fortran/decl.c:8539
0x6402c2 attr_decl
        ../../gcc/fortran/decl.c:8683
0x6aacb1 match_word
        ../../gcc/fortran/parse.c:65
0x6aecfd decode_statement
        ../../gcc/fortran/parse.c:488
0x6afaea next_free
        ../../gcc/fortran/parse.c:1280
0x6afaea next_statement
        ../../gcc/fortran/parse.c:1512
0x6b121d parse_spec
        ../../gcc/fortran/parse.c:3939
0x6b3f0c parse_progunit
        ../../gcc/fortran/parse.c:5852
0x6b42f1 parse_contained
        ../../gcc/fortran/parse.c:5753
0x6b4196 parse_progunit
        ../../gcc/fortran/parse.c:5924
0x6b55e9 gfc_parse_file()
        ../../gcc/fortran/parse.c:6393
0x7016ff gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212


More information about the Gcc-bugs mailing list