From 1bc5aee63eb72b341f506ad058502cd0361f0d10 Mon Sep 17 00:00:00 2001 From: Ben Cheng Date: Tue, 25 Mar 2014 22:37:19 -0700 Subject: Initial checkin of GCC 4.9.0 from trunk (r208799). Change-Id: I48a3c08bb98542aa215912a75f03c0890e497dba --- .../gcc/testsuite/gfortran.dg/pointer_init_8.f90 | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 gcc-4.9/gcc/testsuite/gfortran.dg/pointer_init_8.f90 (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/pointer_init_8.f90') diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/pointer_init_8.f90 b/gcc-4.9/gcc/testsuite/gfortran.dg/pointer_init_8.f90 new file mode 100644 index 000000000..aacd9a8e1 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gfortran.dg/pointer_init_8.f90 @@ -0,0 +1,26 @@ +! { dg-do run } +! +! PR 57306: [OOP] ICE on valid with class pointer initialization +! +! Contributed by Andrew Benson + +module m + type :: c + end type c + type, extends(c) :: d + end type d + type(c), target :: x + type(d), target :: y +end module m + + use m + class(c), pointer :: px => x + class(c), pointer :: py => y + + if (.not. associated(px, x)) call abort() + if (.not. same_type_as(px, x)) call abort() + if (.not. associated(py, y)) call abort() + if (.not. same_type_as(py, y)) call abort() +end + +! { dg-final { cleanup-modules "m" } } -- cgit v1.2.3