Wattributes.c testcase: Disable warning check for IBM Z.
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Fri, 6 Apr 2018 07:43:53 +0000 (07:43 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Fri, 6 Apr 2018 07:43:53 +0000 (07:43 +0000)
On IBM Z we enforce function alignment to 8 bytes.  Hence we get an
error instead of a warning when trying to specify smaller alignments.

gcc/testsuite/ChangeLog:

2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* c-c++-common/Wattributes.c: Disable warning for s390* target and
check for an error instead.
* gcc.dg/Wattributes-6.c: Likewise.

From-SVN: r259163

gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Wattributes.c
gcc/testsuite/gcc.dg/Wattributes-6.c

index a000873..7e47998 100644 (file)
@@ -1,3 +1,9 @@
+2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * c-c++-common/Wattributes.c: Disable warning for s390* target and
+       check for an error instead.
+       * gcc.dg/Wattributes-6.c: Likewise.
+
 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/85209
index 902bcb6..40a2985 100644 (file)
@@ -401,7 +401,8 @@ inline int ATTR ((warn_unused_result))
 finline_hot_noret_align (int);  /* { dg-warning "ignoring attribute .warn_unused_result. because it conflicts with attribute .noreturn." } */
 
 inline int ATTR ((aligned (4)))
-finline_hot_noret_align (int);  /* { dg-warning "ignoring attribute .aligned \\(4\\). because it conflicts with attribute .aligned \\(8\\)." } */
+  finline_hot_noret_align (int);  /* { dg-warning "ignoring attribute .aligned \\(4\\). because it conflicts with attribute .aligned \\(8\\)." "" { target { ! s390*-*-* } } } */
+/* { dg-error "alignment for '.*finline_hot_noret_align.*' must be at least 8" "" { target s390*-*-* } .-1 } */
 
 inline int ATTR ((aligned (8)))
 finline_hot_noret_align (int);
index 902bcb6..a260d01 100644 (file)
@@ -401,7 +401,8 @@ inline int ATTR ((warn_unused_result))
 finline_hot_noret_align (int);  /* { dg-warning "ignoring attribute .warn_unused_result. because it conflicts with attribute .noreturn." } */
 
 inline int ATTR ((aligned (4)))
-finline_hot_noret_align (int);  /* { dg-warning "ignoring attribute .aligned \\(4\\). because it conflicts with attribute .aligned \\(8\\)." } */
+  finline_hot_noret_align (int);  /* { dg-warning "ignoring attribute .aligned \\(4\\). because it conflicts with attribute .aligned \\(8\\)." "" { target { ! s390*-*-* } } } */
+/* { dg-error "alignment for 'finline_hot_noret_align' must be at least 8" "" { target s390*-*-* } .-1 } */
 
 inline int ATTR ((aligned (8)))
 finline_hot_noret_align (int);