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

            Bug ID: 91800
           Summary: ICE in gfc_code2string(): Bad code
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Applying an old feature (z0.f90) to a new one (z1.f90) :


$ cat z0.f90
program p
   integer :: n = 4habcd
   print *, n
   print *, transfer('abcd', 1)
end


$ gfortran-10-20190915 z0.f90
z0.f90:2:17:

    2 |    integer :: n = 4habcd
      |                 1
Warning: Extension: Conversion from HOLLERITH to INTEGER(4) at (1)
z0.f90:2:20:

    2 |    integer :: n = 4habcd
      |                    1
Warning: Legacy Extension: Hollerith constant at (1)

$ ./a.out
  1684234849
  1684234849



$ cat z1.f90
module m
   type t(n)
      integer, len :: n = 4habcd
   end type
end


$ gfortran-10-20190915 -c z1.f90
z1.f90:3:28:

    3 |       integer, len :: n = 4habcd
      |                            1
Warning: Legacy Extension: Hollerith constant at (1)
f951: internal compiler error: gfc_code2string(): Bad code
0x61c371 gfc_internal_error(char const*, ...)
        ../../gcc/fortran/error.c:1363
0x655014 gfc_code2string(mstring const*, int)
        ../../gcc/fortran/misc.c:202
0x6569fb mio_name
        ../../gcc/fortran/module.c:1742
0x65a934 mio_name_bt
        ../../gcc/fortran/module.c:2140
0x65a934 mio_typespec
        ../../gcc/fortran/module.c:2641
0x65a130 mio_expr
        ../../gcc/fortran/module.c:3568
0x65addc mio_component
        ../../gcc/fortran/module.c:2918
0x65bd6a mio_component_list
        ../../gcc/fortran/module.c:2939
0x65bd6a mio_symbol
        ../../gcc/fortran/module.c:4398
0x65c1cd write_symbol
        ../../gcc/fortran/module.c:5749
0x65c332 write_symbol0
        ../../gcc/fortran/module.c:5789
0x65c2a8 write_symbol0
        ../../gcc/fortran/module.c:5768
0x65eeb4 write_module
        ../../gcc/fortran/module.c:6131
0x65eeb4 dump_module
        ../../gcc/fortran/module.c:6261
0x65f27d gfc_dump_module(char const*, int)
        ../../gcc/fortran/module.c:6318
0x677b66 gfc_parse_file()
        ../../gcc/fortran/parse.c:6404
0x6c1a0f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:204

Reply via email to