From bce89076ce03ff9bcf89362477cff548a585bcdd Mon Sep 17 00:00:00 2001 From: Andreas Krebbel Date: Fri, 6 Apr 2018 07:43:53 +0000 Subject: [PATCH] Wattributes.c testcase: Disable warning check for IBM Z. 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 * 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 | 6 ++++++ gcc/testsuite/c-c++-common/Wattributes.c | 3 ++- gcc/testsuite/gcc.dg/Wattributes-6.c | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a0008734d1b..7e47998d323 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2018-04-06 Andreas Krebbel + + * 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 PR c++/85209 diff --git a/gcc/testsuite/c-c++-common/Wattributes.c b/gcc/testsuite/c-c++-common/Wattributes.c index 902bcb61c30..40a29856ec6 100644 --- a/gcc/testsuite/c-c++-common/Wattributes.c +++ b/gcc/testsuite/c-c++-common/Wattributes.c @@ -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); diff --git a/gcc/testsuite/gcc.dg/Wattributes-6.c b/gcc/testsuite/gcc.dg/Wattributes-6.c index 902bcb61c30..a260d018dcf 100644 --- a/gcc/testsuite/gcc.dg/Wattributes-6.c +++ b/gcc/testsuite/gcc.dg/Wattributes-6.c @@ -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); -- 2.30.2