aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gfortran.dg/proc_ptr_45.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gfortran.dg/proc_ptr_45.f90')
-rw-r--r--gcc-4.8/gcc/testsuite/gfortran.dg/proc_ptr_45.f9024
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gfortran.dg/proc_ptr_45.f90 b/gcc-4.8/gcc/testsuite/gfortran.dg/proc_ptr_45.f90
new file mode 100644
index 000000000..a506473ad
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gfortran.dg/proc_ptr_45.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+!
+! PR fortran/49397
+!
+! Valid per IR F08/0060 and F2008Corr2, C729
+!
+Program m5
+ Print *,f()
+Contains
+ Subroutine s
+ Procedure(Real),Pointer :: p
+ Print *,g()
+ p => f ! (1)
+ Print *,p()
+ p => g ! (2)
+ Print *,p()
+ End Subroutine
+End Program
+Function f()
+ f = 1
+End Function
+Function g()
+ g = 2
+End Function