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

            Bug ID: 68055
           Summary: ICE on using unsupported kinds in program without
                    program statement
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

Without an explicit program statement :

$ cat z1.f90
!program p
   real*9 :: c
   write (c, '(i3)') 1
end


$ gfortran -g -O0 -Wall -fcheck=all z1.f90
f951: internal compiler error: gfc_validate_kind(): Got bad kind

---

Detected with program statement :

$ cat z2.f90
program p
   real*9 :: c
   write (c, '(i3)') 1
end


$ gfortran -g -O0 -Wall -fcheck=all z2.f90
z2.f90:2:9:

    real*9 :: c
         1
Error: Old-style type declaration REAL*9 not supported at (1)
z2.f90:3:10:

    write (c, '(i3)') 1
          1
Error: UNIT specification at (1) must be an INTEGER expression or a CHARACTER
variable

Reply via email to