re PR middle-end/58290 (error: virtual definition of statement not up-to-date)

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

From-SVN: r206062
This commit is contained in:
Jakub Jelinek 2013-12-17 18:35:59 +01:00 committed by Jakub Jelinek
parent 7656ee7297
commit 5a2075280a
2 changed files with 38 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2013-12-17 Jakub Jelinek <jakub@redhat.com>
PR ipa/58290
* gfortran.dg/pr58290.f90: New test.
2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
* gcc.dg/dfp/wtr-conversion-1.c (testfunc1): Fix typo.

View file

@ -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