import.f90:9:

    subroutine foo(x)
                 1
Error: PROGRAM attribute conflicts with PROCEDURE attribute at (1)
import.f90:0: internal compiler error: Segmentation fault

---------
program foo
  type myType
    integer :: i
  end type myType
  interface
    subroutine foo(x)
      type(myType) :: i
    end subroutine foo
  end interface
  call foo()
end program foo
---------

The crash occurs in decl.c in the line:
if (current_ts.type == BT_DERIVED
    && gfc_current_ns->proc_name->attr.if_source == IFSRC_IFBODY
since gfc_current_ns->proc_name == NULL

I have a patch for this.


-- 
           Summary: ICE on same name in subroutine and program
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to