diff options
author | Tobias Burnus <burnus@gcc.gnu.org> | 2014-02-18 23:29:00 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2014-02-18 23:29:00 +0100 |
commit | 4ea4bf9c33f47bc573d31e86ce353cbcc0c37f05 (patch) | |
tree | 9e5141a9f6827df2c2ecea7abdb09feb377600f5 | |
parent | ab1668f602746b9753b7a4f6c334d98b2711af0c (diff) | |
download | gcc-4ea4bf9c33f47bc573d31e86ce353cbcc0c37f05.zip gcc-4ea4bf9c33f47bc573d31e86ce353cbcc0c37f05.tar.gz gcc-4ea4bf9c33f47bc573d31e86ce353cbcc0c37f05.tar.bz2 |
Really add the new testsuite files missing from commit r207854
2014-02-18 Tobias Burnus <burnus@net-b.de>
PR fortran/49397
* gfortran.dg/proc_ptr_45.f90: New.
* gfortran.dg/proc_ptr_46.f90: New.
From-SVN: r207855
-rw-r--r-- | gcc/testsuite/gfortran.dg/proc_ptr_45.f90 | 24 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/proc_ptr_46.f90 | 14 |
2 files changed, 38 insertions, 0 deletions
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 0000000..a506473 --- /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 0000000..2c05f59 --- /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 |