From 3547d57e35a5c5fe5438f8841e3654e400a99267 Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Sat, 18 Jun 2011 14:36:45 +0200 Subject: [PATCH] re PR fortran/49400 ([F08] Proc-pointer declaration in BLOCK construct) 2011-06-18 Janus Weil PR fortran/49400 * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside BLOCK constructs. 2011-06-18 Janus Weil PR fortran/49400 * gfortran.dg/proc_ptr_31.f90: New. From-SVN: r175177 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/decl.c | 1 + gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/proc_ptr_31.f90 | 10 ++++++++++ 4 files changed, 22 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/proc_ptr_31.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index d7c59819430..08c666ac4a6 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-06-18 Janus Weil + + PR fortran/49400 + * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside + BLOCK constructs. + 2011-06-17 Janus Weil PR fortran/48699 diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 7098368e56e..661bb14486f 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -4970,6 +4970,7 @@ gfc_match_procedure (void) case COMP_MODULE: case COMP_SUBROUTINE: case COMP_FUNCTION: + case COMP_BLOCK: m = match_procedure_decl (); break; case COMP_INTERFACE: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 907b94d74f7..54d035ecbd9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-06-18 Janus Weil + + PR fortran/49400 + * gfortran.dg/proc_ptr_31.f90: New. + 2011-06-18 Eric Botcazou * gnat.dg/volatile6.adb: New test. diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_31.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_31.f90 new file mode 100644 index 00000000000..691c77d1d0b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/proc_ptr_31.f90 @@ -0,0 +1,10 @@ +! { dg-do compile } +! +! PR 49400: [F08] Proc-pointer declaration in BLOCK construct +! +! Contributed by Tobias Burnus + + block + procedure(real),pointer :: p + end block +end -- 2.30.2