]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/62270 (-Wlogical-not-parentheses warnings)
authorMarek Polacek <polacek@redhat.com>
Wed, 3 Sep 2014 17:25:45 +0000 (17:25 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 3 Sep 2014 17:25:45 +0000 (17:25 +0000)
PR fortran/62270
* interface.c (compare_parameter): Fix condition.

* gfortran.dg/pointer_intent_7.f90: Adjust dg-error.

From-SVN: r214887

gcc/fortran/ChangeLog
gcc/fortran/interface.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pointer_intent_7.f90

index 2ac8fb3797cdc96c02a8fd23150658c8cca2bb29..c7001ca627c848280305f2be07f747c907391eae 100644 (file)
@@ -1,3 +1,9 @@
+2014-09-03  Marek Polacek  <polacek@redhat.com>
+
+       Backport from trunk
+       PR fortran/62270
+       * interface.c (compare_parameter): Fix condition.
+
 2014-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        Backport from trunk
index 725cd8a4b766529c044615db2cc5406674256cd7..e38bb1f5d0bbe0a42570436655eafcde0d92e516 100644 (file)
@@ -1923,7 +1923,7 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual,
   /* F2008, 12.5.2.5; IR F08/0073.  */
   if (formal->ts.type == BT_CLASS && actual->expr_type != EXPR_NULL
       && ((CLASS_DATA (formal)->attr.class_pointer
-          && !formal->attr.intent == INTENT_IN)
+          && formal->attr.intent != INTENT_IN)
           || CLASS_DATA (formal)->attr.allocatable))
     {
       if (actual->ts.type != BT_CLASS)
index cdc118d83d221b7643ad1bc105c779f67f5dbfae..d8f884af4303721fa4b6c79ab40f3dacb86c8dc6 100644 (file)
@@ -1,3 +1,11 @@
+2014-09-03  Marek Polacek  <polacek@redhat.com>
+
+       Backport from mainline
+       2014-09-02  Marek Polacek  <polacek@redhat.com>
+
+       PR fortran/62270
+       * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
+
 2014-09-03  Martin Jambor  <mjambor@suse.cz>
 
        PR ipa/62015
index c09eb2b5ffa057c67354a099101c08c8c5fc7333..5387ace8c1977e8da7b50abfe5bc6b8edaa4b4ca 100644 (file)
@@ -23,7 +23,7 @@ contains
     call bar2 (c)
     call bar3 (c)
     call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
-    call bar3p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
+    call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
     call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
     call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
   end subroutine