Do not emit the -Wpsabi note for PR target/77728 16/136916/1 accepted/tizen/base/20170707.183909 submit/tizen_base/20170705.085733
authorSangmin Seo <sangmin7.seo@samsung.com>
Thu, 29 Jun 2017 07:56:39 +0000 (16:56 +0900)
committerSangmin Seo <sangmin7.seo@samsung.com>
Mon, 3 Jul 2017 12:17:32 +0000 (21:17 +0900)
Since PR target/77728 issue did not exist in Tizen/Linaro GCC 4.9.2
and has been resolved with the upstream patches, it does not make
sense to print the -Wpsabi note, which is "parameter passing for
argument of type ... changed in GCC 7.1." This patch removes the
-Wpsabi note generated by the commit
6da83d4adc857ba1c4370b2b8f32825d5cb13ebe
and dg-message comments from the test code.

gcc/config/
    * arm/arm.c (aapcs_layout_arg): Remove code emitting -Wpsabi note.
    (arm_function_arg): Likewise.
    (arm_function_arg_boundary): Likewise.
    (arm_setup_incoming_varargs): Likewise.

gcc/testsuite/
    * g++.dg/abi/pr77728-1.C: Remove dg-message comments.

Change-Id: I5432536052bf9d534e21157ddfd2ac57d25da59f
Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
gcc/config/arm/arm.c
gcc/testsuite/g++.dg/abi/pr77728-1.C

index 5ab94d9..f48fe56 100644 (file)
@@ -6208,15 +6208,7 @@ aapcs_layout_arg (CUMULATIVE_ARGS *pcum, machine_mode mode,
   if (ncrn & 1)
     {
       int res = arm_needs_doubleword_align (mode, type);
-      /* Only warn during RTL expansion of call stmts, otherwise we would
-        warn e.g. during gimplification even on functions that will be
-        always inlined, and we'd warn multiple times.  Don't warn when
-        called in expand_function_start either, as we warn instead in
-        arm_function_arg_boundary in that case.  */
-      if (res < 0 && warn_psabi && currently_expanding_gimple_stmt)
-       inform (input_location, "parameter passing for argument of type "
-               "%qT changed in GCC 7.1", type);
-      else if (res > 0)
+      if (res > 0)
        ncrn++;
     }
 
@@ -6416,10 +6408,7 @@ arm_function_arg (cumulative_args_t pcum_v, machine_mode mode,
   if ((pcum->nregs & 1) && ARM_DOUBLEWORD_ALIGN)
     {
       int res = arm_needs_doubleword_align (mode, type);
-      if (res < 0 && warn_psabi)
-       inform (input_location, "parameter passing for argument of type "
-               "%qT changed in GCC 7.1", type);
-      else if (res > 0)
+      if (res > 0)
        pcum->nregs++;
     }
 
@@ -6444,9 +6433,6 @@ arm_function_arg_boundary (machine_mode mode, const_tree type)
     return PARM_BOUNDARY;
 
   int res = arm_needs_doubleword_align (mode, type);
-  if (res < 0 && warn_psabi)
-    inform (input_location, "parameter passing for argument of type %qT "
-           "changed in GCC 7.1", type);
 
   return res > 0 ? DOUBLEWORD_ALIGNMENT : PARM_BOUNDARY;
 }
@@ -26342,10 +26328,7 @@ arm_setup_incoming_varargs (cumulative_args_t pcum_v,
       if (nregs & 1)
        {
          int res = arm_needs_doubleword_align (mode, type);
-         if (res < 0 && warn_psabi)
-           inform (input_location, "parameter passing for argument of "
-                   "type %qT changed in GCC 7.1", type);
-         else if (res > 0)
+         if (res > 0)
            nregs++;
        }
     }
index 05f08c9..15ccbfb 100644 (file)
@@ -30,7 +30,7 @@ struct K : public D { typedef A<N> T; int i, j; };
 struct L { static double h; int i, j; };
 
 int
-fn1 (int a, B<0> b)    // { dg-message "note: parameter passing for argument of type \[^\n\r]* changed in GCC 7\.1" }
+fn1 (int a, B<0> b)
 {
   return a + b.i;
 }
@@ -42,14 +42,13 @@ fn2 (int a, B<1> b)
 }
 
 int
-fn3 (int a, L b)       // { dg-message "note: parameter passing for argument of type \[^\n\r]* changed in GCC 7\.1" }
+fn3 (int a, L b)
 {
   return a + b.i;
 }
 
 int
 fn4 (int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l, int m, B<0> n, ...)
-// { dg-message "note: parameter passing for argument of type \[^\n\r]* changed in GCC 7\.1" "" { target *-*-* } .-1 }
 {
   va_list ap;
   va_start (ap, n);
@@ -110,7 +109,6 @@ fn9 (int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k
 
 int
 fn10 (int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l, int m, J n, ...)
-// { dg-message "note: parameter passing for argument of type \[^\n\r]* changed in GCC 7\.1" "" { target *-*-* } .-1 }
 {
   va_list ap;
   va_start (ap, n);
@@ -121,7 +119,6 @@ fn10 (int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int
 
 int
 fn11 (int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l, int m, K<0> n, ...)
-// { dg-message "note: parameter passing for argument of type \[^\n\r]* changed in GCC 7\.1" "" { target *-*-* } .-1 }
 {
   va_list ap;
   va_start (ap, n);
@@ -153,19 +150,16 @@ test ()
   static J j;
   static K<0> k0;
   static K<2> k2;
-  fn1 (1, b0); // { dg-message "note: parameter passing for argument of type \[^\n\r]* changed in GCC 7\.1" }
+  fn1 (1, b0);
   fn2 (1, b1);
-  fn3 (1, l);  // { dg-message "note: parameter passing for argument of type \[^\n\r]* changed in GCC 7\.1" }
+  fn3 (1, l);
   fn4 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, b0, 1, 2, 3, 4);
-  // { dg-message "note: parameter passing for argument of type \[^\n\r]* changed in GCC 7\.1" "" { target *-*-* } .-1 }
   fn5 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, b1, 1, 2, 3, 4);
   fn6 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, c, 1, 2, 3, 4);
   fn7 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, e, 1, 2, 3, 4);
   fn8 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, h, 1, 2, 3, 4);
   fn9 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, i, 1, 2, 3, 4);
   fn10 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, j, 1, 2, 3, 4);
-  // { dg-message "note: parameter passing for argument of type \[^\n\r]* changed in GCC 7\.1" "" { target *-*-* } .-1 }
   fn11 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, k0, 1, 2, 3, 4);
-  // { dg-message "note: parameter passing for argument of type \[^\n\r]* changed in GCC 7\.1" "" { target *-*-* } .-1 }
   fn12 (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, k2, 1, 2, 3, 4);
 }