]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/20777 ([4.0 only] Arithmetic IF not flagged obsolete)
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>
Sat, 18 Jun 2005 21:22:08 +0000 (23:22 +0200)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sat, 18 Jun 2005 21:22:08 +0000 (21:22 +0000)
PR fortran/20777
* match.c (match_arithmetic_if): Arithmetic IF is obsolete in
Fortran 95.
* gfortran.dg/pr17229.f: Take care of the new obsolescence
warning for arithmetic IF statements.

From-SVN: r101166

gcc/fortran/ChangeLog
gcc/fortran/match.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr17229.f

index 21d6e2199bffd0ad2134352f3e03ec9814822433..d67d044aabc2fa0eee6a2669501a14dc1fb77b89 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
+       * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
+       Fortran 95.
+
 2005-06-13  Jakub Jelinek  <jakub@redhat.com>
 
        PR fortran/22038
index 84cc9c69c2c41fcdeabafe5865099f8b1fbd10b8..2e116580eec14b571851f2741547772d92ac89c3 100644 (file)
@@ -922,6 +922,10 @@ match_arithmetic_if (void)
       return MATCH_ERROR;
     }
 
+  if (gfc_notify_std (GFC_STD_F95_DEL,
+                     "Obsolete: arithmetic IF statement at %C") == FAILURE)
+    return MATCH_ERROR;
+
   new_st.op = EXEC_ARITHMETIC_IF;
   new_st.expr = expr;
   new_st.label = l1;
@@ -993,6 +997,11 @@ gfc_match_if (gfc_statement * if_type)
          gfc_free_expr (expr);
          return MATCH_ERROR;
        }
+      
+      if (gfc_notify_std (GFC_STD_F95_DEL,
+                         "Obsolete: arithmetic IF statement at %C")
+         == FAILURE)
+        return MATCH_ERROR;
 
       new_st.op = EXEC_ARITHMETIC_IF;
       new_st.expr = expr;
index eaaf133168d234e03750cbe97292cd9507ceefed..64a73c1664adbe3caae2a22ea87e3dafcd473cd6 100644 (file)
@@ -1,3 +1,8 @@
+2005-06-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
+       * gfortran.dg/pr17229.f: Take care of the new obsolescence
+       warning for arithmetic IF statements.
+
 2005-06-17  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/21850
index b1a4471e410ac1df7c77bbb39bb92a11bc1b7372..4e96d29921a4ec5a00c08eec82197385f05618c7 100644 (file)
@@ -5,18 +5,18 @@
 
       l = .false.
       i = -1
-      if (l) if (i) 999,999,999
+      if (l) if (i) 999,999,999 ! { dg-warning "Obsolete: arithmetic IF statement" }
 
       l = .true.
-      if (l) if (i) 10,999,999
+      if (l) if (i) 10,999,999 ! { dg-warning "Obsolete: arithmetic IF statement" }
       go to 999
 
    10 i = 0
-      if (l) if (i) 999,20,999
+      if (l) if (i) 999,20,999 ! { dg-warning "Obsolete: arithmetic IF statement" }
       go to 999
 
    20 i = 1
-      if (l) if (i) 999,999,30
+      if (l) if (i) 999,999,30 ! { dg-warning "Obsolete: arithmetic IF statement" }
       go to 999
 
   999 call abort