------- Comment #3 from burnus at gcc dot gnu dot org  2006-11-08 22:35 -------
Just for completeness, the ICE also occurs with 4.1

! { dg-do compile }
! { dg-shouldfail "same name of program and subroutine" }
! Tests whether ICE occurs when using the same name
! for a subroutine as for the program
! PR fortran/29755
program foo
  type myType
    integer :: i
  end type myType
  interface
    subroutine foo(x)! { dg-error "PROGRAM attribute conflicts with PROCEDURE"
}
      type(myType) :: i! { dg-error "Unexpected data declaration statement" }
    end subroutine foo ! { dg-error "Expecting END INTERFACE statement" }
  end interface
  call foo() ! { dg-error "PROGRAM attribute conflicts with PROCEDURE" }
end program foo


-- 


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

Reply via email to