]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
match.c (match_arithmetic_if): Arithmetic IF is obsolete in Fortran 95.
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>
Sun, 10 Apr 2005 16:01:54 +0000 (18:01 +0200)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Sun, 10 Apr 2005 16:01:54 +0000 (16:01 +0000)
* 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: r97948

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

index 74bfa1a0ec15d34d4d794eeebcbf5d226d809126..af6bc8a703e000ad307d7e05c61c00121a8e2e8c 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
+       * match.c (match_arithmetic_if): Arithmetic IF is obsolete in
+       Fortran 95.
+
 2005-04-09  Steven G. Kargl  <kargls@comcast.net>
 
        * simplify.c (gfc_simplify_anint): Use mpfr_round()
index 0a173b86ea0d29e379487349fd845b301df0b973..d81686bb134ee3066412c4cc8cad730de46e965a 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 a55aec878465bbfdfa777820fb92ecb80df029bf..9d3c99f80b200efe34263a24a993484156bcf132 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
+       * gfortran.dg/pr17229.f: Take care of the new obsolescence
+       warning for arithmetic IF statements.
+
 2005-04-10  Thomas Koenig  <Thomas.Koenig@online.de>
 
        * eor_handling_1.f90: New test case.
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