From: Tobias Burnus Date: Tue, 18 Feb 2014 22:29:00 +0000 (+0100) Subject: Really add the new testsuite files missing from commit r207854 X-Git-Tag: releases/gcc-4.9.0~877 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ea4bf9c33f47bc573d31e86ce353cbcc0c37f05;p=thirdparty%2Fgcc.git Really add the new testsuite files missing from commit r207854 2014-02-18 Tobias Burnus PR fortran/49397 * gfortran.dg/proc_ptr_45.f90: New. * gfortran.dg/proc_ptr_46.f90: New. From-SVN: r207855 --- diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_45.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_45.f90 new file mode 100644 index 000000000000..a506473ad95d --- /dev/null +++ b/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 diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_46.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_46.f90 new file mode 100644 index 000000000000..2c05f59d8a1c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/proc_ptr_46.f90 @@ -0,0 +1,14 @@ +! { dg-do compile } +! +! PR fortran/49397 +! +! Invalid per IR F08/0060 and F2008Corr2, C729 +! + +! Print *,f() ! << Valid when uncommented +Contains + Subroutine s + Procedure(Real),Pointer :: p + p => f ! { dg-error "Procedure pointer target 'f' at .1. must be either an intrinsic, host or use associated, referenced or have the EXTERNAL attribute" } + End Subroutine +End