On Wed, Apr 04, 2018 at 06:51:00PM +0200, Andreas Krebbel wrote: > > On targets enforcing a function alignment bigger than 4 bytes this triggers > > an error instead: > > > > +inline int ATTR ((aligned (4))) > > +finline_hot_noret_align (int); /* { dg-warning "ignoring attribute > > .aligned \\(4\\). because it > > conflicts with attribute .aligned \\(8\\)." } */ > > > > gcc/gcc/testsuite/c-c++-common/Wattributes.c:404:1: error: alignment for > > 'finline_hot_noret_align' > > must be at least 8^M > > > > diff --git a/gcc/testsuite/c-c++-common/Wattributes.c > b/gcc/testsuite/c-c++-common/Wattributes.c > index 902bcb61c30..a260d018dcf 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); > > OK?
Wouldn't it be better to just use aligned (8) and aligned (16) instead of aligned (4) and aligned (8)? Jakub