Hi!

Richard fixed this PR recently by adding a fixup_cfg pass again
right after IPA passes, I'm just including a testcase from this PR,
verified on x86_64-linux and verified it fails again if I comment
out the fixup_cfg pass from passes.def.

Committed as obvious to trunk.

2013-12-17  Jakub Jelinek  <ja...@redhat.com>

        PR ipa/58290
        * gfortran.dg/pr58290.f90: New test.

--- gcc/testsuite/gfortran.dg/pr58290.f90.jj    2013-12-17 18:31:32.710677694 
+0100
+++ gcc/testsuite/gfortran.dg/pr58290.f90       2013-12-17 18:32:03.048508980 
+0100
@@ -0,0 +1,33 @@
+! PR ipa/58290
+! { dg-do compile }
+! { dg-options "-O1 -fipa-pta" }
+
+MODULE pr58290
+  TYPE b
+    CHARACTER(10) :: s = ''
+  END TYPE b
+  TYPE c
+    TYPE(b) :: d
+  END TYPE c
+  TYPE h
+    INTEGER, DIMENSION(:), POINTER :: b
+  END TYPE h
+CONTAINS
+  SUBROUTINE foo(x, y)
+    LOGICAL, INTENT(IN) :: x
+    TYPE(c), INTENT(INOUT) :: y
+  END SUBROUTINE 
+  FUNCTION bar (g) RESULT (z)
+    TYPE(h), INTENT(IN) :: g
+    TYPE(c) :: y
+    CALL foo (.TRUE., y)
+    z = SIZE (g%b)
+  END FUNCTION bar
+  SUBROUTINE baz (g)
+    TYPE(h), INTENT(INOUT) :: g
+    INTEGER :: i, j
+    j = bar(g)
+    DO i = 1, j
+    ENDDO
+  END SUBROUTINE baz
+END MODULE

        Jakub

Reply via email to