re PR fortran/49400 ([F08] Proc-pointer declaration in BLOCK construct)
authorJanus Weil <janus@gcc.gnu.org>
Sat, 18 Jun 2011 12:36:45 +0000 (14:36 +0200)
committerJanus Weil <janus@gcc.gnu.org>
Sat, 18 Jun 2011 12:36:45 +0000 (14:36 +0200)
2011-06-18  Janus Weil  <janus@gcc.gnu.org>

PR fortran/49400
* decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside
BLOCK constructs.

2011-06-18  Janus Weil  <janus@gcc.gnu.org>

PR fortran/49400
* gfortran.dg/proc_ptr_31.f90: New.

From-SVN: r175177

gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/proc_ptr_31.f90 [new file with mode: 0644]

index d7c598194301f275c3c9e6de2ff7dfe23c86a6ce..08c666ac4a649aebad23da6d54de54c1b95e7efd 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-18  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/49400
+       * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside
+       BLOCK constructs.
+
 2011-06-17  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/48699
index 7098368e56efab9511f13de86055fb46926885a2..661bb14486fcdd05265c4d44963b1b574df9522a 100644 (file)
@@ -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:
index 907b94d74f7ba7b4b84bd0f5f40af16bd8436794..54d035ecbd9451ca0076c499e271c2d6e0ecb03a 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-18  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/49400
+       * gfortran.dg/proc_ptr_31.f90: New.
+
 2011-06-18  Eric Botcazou  <ebotcazou@adacore.com>
 
        * 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 (file)
index 0000000..691c77d
--- /dev/null
@@ -0,0 +1,10 @@
+! { dg-do compile }
+!
+! PR 49400: [F08] Proc-pointer declaration in BLOCK construct
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+  block
+    procedure(real),pointer :: p
+  end block
+end