OSDN Git Service

2013-04-04 Janus Weil <janus@gcc.gnu.org>
authorjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Apr 2013 19:21:01 +0000 (19:21 +0000)
committerjanus <janus@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Apr 2013 19:21:01 +0000 (19:21 +0000)
PR fortran/40881
* match.c (gfc_match_return): Remove standard notification.
* primary.c (gfc_match_actual_arglist): Add standard notification.

2013-04-04  Janus Weil  <janus@gcc.gnu.org>

PR fortran/40881
* gfortran.dg/altreturn_1.f90: Add -std=gnu.
* gfortran.dg/altreturn_4.f90: Ditto.
* gfortran.dg/altreturn_3.f90: Replace -std=legacy by -std=gnu.
* gfortran.dg/altreturn_5.f90: Ditto.
* gfortran.dg/altreturn_6.f90: Ditto.
* gfortran.dg/altreturn_7.f90: Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197495 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/match.c
gcc/fortran/primary.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/altreturn_1.f90
gcc/testsuite/gfortran.dg/altreturn_3.f90
gcc/testsuite/gfortran.dg/altreturn_4.f90
gcc/testsuite/gfortran.dg/altreturn_5.f90
gcc/testsuite/gfortran.dg/altreturn_6.f90
gcc/testsuite/gfortran.dg/altreturn_7.f90

index c42d02f..6692350 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-04  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/40881
+       * match.c (gfc_match_return): Remove standard notification.
+       * primary.c (gfc_match_actual_arglist): Add standard notification.
+
 2013-04-04  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/50269
index d75cf1c..be8740c 100644 (file)
@@ -4040,10 +4040,6 @@ gfc_match_return (void)
       goto cleanup;
     }
 
-  if (gfc_notify_std (GFC_STD_F95_OBS, "Alternate RETURN "
-                     "at %C") == FAILURE)
-    return MATCH_ERROR;
-
   if (gfc_current_form == FORM_FREE)
     {
       /* The following are valid, so we can't require a blank after the
index d149224..6664dd2 100644 (file)
@@ -1719,6 +1719,10 @@ gfc_match_actual_arglist (int sub_flag, gfc_actual_arglist **argp)
          if (m != MATCH_YES)
            goto cleanup;
 
+         if (gfc_notify_std (GFC_STD_F95_OBS, "Alternate-return argument "
+             "at %C") == FAILURE)
+           goto cleanup;
+
          tail->label = label;
          goto next;
        }
index 56f1044..1759775 100644 (file)
@@ -1,3 +1,13 @@
+2013-04-04  Janus Weil  <janus@gcc.gnu.org>
+
+       PR fortran/40881
+       * gfortran.dg/altreturn_1.f90: Add -std=gnu.
+       * gfortran.dg/altreturn_4.f90: Ditto.
+       * gfortran.dg/altreturn_3.f90: Replace -std=legacy by -std=gnu.
+       * gfortran.dg/altreturn_5.f90: Ditto.
+       * gfortran.dg/altreturn_6.f90: Ditto.
+       * gfortran.dg/altreturn_7.f90: Ditto.
+
 2013-04-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * lib/target-supports.exp (check_effective_target_arm_v8_neon_hw):
index c0ae15f..7ec77c1 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=gnu" }
+
        subroutine foo (a)
        real t, a, baz
        call bar (*10)
index 28fc6a8..c445159 100644 (file)
@@ -1,5 +1,5 @@
 ! { dg-do run }
-! { dg-options "-std=legacy" }
+! { dg-options "-std=gnu" }
 !
 ! Tests the fix for PR30236, which was due to alternate returns
 ! in generic interfaces causing a segfault.  They now work
index 409ea51..7375544 100644 (file)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=gnu" }
+!
 ! Tests the fix for PR28172, in which an ICE would result from
 ! the contained call with an alternate retrun.
 
index a8b6ff8..a552d39 100644 (file)
@@ -1,33 +1,32 @@
-! { dg-do run }
-! { dg-options "-std=legacy" }
-!
-! Tests the fix for PR31483, in which dummy argument procedures
-! produced an ICE if they had an alternate return.
-!
-! Contributed by Mathias Fröhlich <M.Froehlich@science-computing.de>
-
-      SUBROUTINE R (i, *, *)
-      INTEGER i
-      RETURN i
-      END
-
+! { dg-do run }\r
+! { dg-options "-std=gnu" }\r
+!\r
+! Tests the fix for PR31483, in which dummy argument procedures\r
+! produced an ICE if they had an alternate return.\r
+!\r
+! Contributed by Mathias Fröhlich <M.Froehlich@science-computing.de>\r
+\r
+      SUBROUTINE R (i, *, *)\r
+      INTEGER i\r
+      RETURN i\r
+      END\r
+\r
       SUBROUTINE PHLOAD (READER, i, res)\r
       IMPLICIT NONE\r
-      EXTERNAL         READER
-      integer i
+      EXTERNAL         READER\r
+      integer i\r
       character(3) res\r
       CALL READER (i, *1, *2)\r
- 1    res = "one"
+ 1    res = "one"\r
       return\r
- 2    res = "two"
+ 2    res = "two"\r
       return\r
-      END
-
-      EXTERNAL R
-      character(3) res\r
-      call PHLOAD (R, 1, res)
-      if (res .ne. "one") call abort ()
-      CALL PHLOAD (R, 2, res)
-      if (res .ne. "two") call abort ()
       END\r
 \r
+      EXTERNAL R\r
+      character(3) res\r
+      call PHLOAD (R, 1, res)\r
+      if (res .ne. "one") call abort ()\r
+      CALL PHLOAD (R, 2, res)\r
+      if (res .ne. "two") call abort ()\r
+      END\r
index 19c851e..82bb46d 100644 (file)
@@ -1,5 +1,5 @@
 ! { dg-do compile }
-! { dg-options "-std=legacy" }
+! { dg-options "-std=gnu" }
 !
 ! PR 32938
 subroutine r (*)
index e667ff4..522d767 100644 (file)
@@ -1,5 +1,5 @@
 ! { dg-do compile }
-! { dg-options "-std=legacy" }
+! { dg-options "-std=gnu" }
 !
 ! PR 40848: [4.5 Regression] ICE with alternate returns
 !