diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/class_51.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/class_51.f90 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/class_51.f90 b/gcc/testsuite/gfortran.dg/class_51.f90 new file mode 100644 index 00000000000..1fdad92dd04 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_51.f90 @@ -0,0 +1,25 @@ +! { dg-do compile } +! { dg-options "-fdump-tree-original" } +! +! PR fortran/52270 +! +! From IR F08/0073 by Malcolm Cohen +! + + Program m013 + Type t + Real c + End Type + Type(t),Target :: x + Call sub(x) + Print *,x%c + if (x%c /= 3) call abort () + Contains + Subroutine sub(p) + Class(t),Pointer,Intent(In) :: p + p%c = 3 + End Subroutine + End Program + +! { dg-final { scan-tree-dump-times "sub \\(&class" 1 "original" } } +! { dg-final { cleanup-tree-dump "original" } } |