$ gfortran --version
GNU Fortran 95 (GCC) 4.2.0 20060923 (experimental)

$ cat foo.f90
      MODULE foo
      CONTAINS
        SUBROUTINE sub1(a)
          CHARACTER (LEN=*), OPTIONAL :: a
          WRITE(*,*) 'foo bar'
        END SUBROUTINE sub1

      SUBROUTINE sub2
        CALL sub1()
      END SUBROUTINE sub2

     END MODULE foo
$ gfortran -c foo.f90
foo.f90: In function ‘sub2’:
foo.f90:3: internal compiler error: Segmentation fault


gcc-4.2-20060812 can compile the same code.


-- 
           Summary: ICE for optional subroutine argument
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rakuen_himawari at yahoo dot co dot jp
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29284

Reply via email to