program main
  print *, foo()
contains
  function foo()
    integer foo(size(transfer(x, [1])))
    real x
  end function
end program

gives: a.f90:2: internal compiler error: Segmentation fault

gfortran 4.1.2 20070626 (Red Hat 4.1.2-14) says:
 In file a.f90:5

    integer foo(size(transfer(x, [1])))
                             1
Error: Variable 'x' cannot appear in the expression at (1)


-- 
           Summary: [4.3/4.4 regression] ICE on invalid transfer in variable
                    declaration
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org


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

Reply via email to