[Bug fortran/105167] ICE in gfc_set_default_type, at fortran/symbol.cc:298

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Tue Apr 5 16:22:58 GMT 2022


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid,
                   |                            |ice-on-invalid-code

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


Interestingly, this type-spec "character(n)" with undefined "n"
is simply ignored in following test case :


$ cat z7.f90
program p
   print *, len([character(n) :: ''])
   print *, len([character(n) :: '1'])
   print *, len([character(n) :: '12'])
   print *, len([character(n) :: '123'])
   print *, len([character(n) :: '123456789'])
   print *, len([character(n) :: '1234567890123456789'])
end


$ gfortran-12-20220403 z7.f90 && ./a.out
           0
           1
           2
           3
           9
          19


More information about the Gcc-bugs mailing list