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

            Bug ID: 68054
           Summary: ICE on using protected attribute 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, protected :: x
end


$ gfortran -g -O0 -Wall -fcheck=all z1.f90
f951: internal compiler error: Segmentation fault

---

Detected with program statement :

$ cat z1p.f90
program p
   real, protected :: x
end


$ gfortran -g -O0 -Wall -fcheck=all z1p.f90
z1p.f90:2:21:

    real, protected :: x
                     1
Error: PROTECTED at (1) only allowed in specification part of a module

Reply via email to