public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 2/2] Update expected alignment in pr53037-1.C/pr53037-1.c
@ 2017-08-21 12:48 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2017-08-21 12:48 UTC (permalink / raw)
  To: gcc-patches

Since alignment of int is 2 bytes for m68k, expect either 2 or 4
alignments in warning.

OK for trunk?

H.J.
---
	* g++.dg/pr53037-1.C: Expect either 2 or 4 alignments in
	warning.
	* gcc.dg/pr53037-1.c: Likewise.
---
 gcc/testsuite/g++.dg/pr53037-1.C | 6 +++---
 gcc/testsuite/gcc.dg/pr53037-1.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gcc/testsuite/g++.dg/pr53037-1.C b/gcc/testsuite/g++.dg/pr53037-1.C
index a3d8f99b54e..3ebaf241670 100644
--- a/gcc/testsuite/g++.dg/pr53037-1.C
+++ b/gcc/testsuite/g++.dg/pr53037-1.C
@@ -5,7 +5,7 @@
 typedef unsigned long long __u64
   __attribute__((aligned(4),warn_if_not_aligned(8)));
 
-struct foo1 /* { dg-warning "alignment 4 of 'foo1' is less than 8" } */
+struct foo1 /* { dg-warning "alignment \[24\] of 'foo1' is less than 8" } */
 {
   int i1;
   int i2;
@@ -35,7 +35,7 @@ struct foo4
   __u64 x;
 } __attribute__((aligned(8)));
 
-struct foo5 /* { dg-warning "alignment 4 of 'foo5' is less than 16" } */
+struct foo5 /* { dg-warning "alignment \[24\] of 'foo5' is less than 16" } */
 {
   int i1;
   int x __attribute__((warn_if_not_aligned(16))); /* { dg-warning "'foo5::x' offset 4 in 'foo5' isn't aligned to 16" } */
@@ -68,7 +68,7 @@ union bar2
   __u64 x;
 } __attribute__((aligned(8)));
 
-union bar3 /* { dg-warning "alignment 4 of 'bar3' is less than 16" } */
+union bar3 /* { dg-warning "alignment \[1-4\] of 'bar3' is less than 16" } */
 {
   int i1;
   int x __attribute__((warn_if_not_aligned(16))); 
diff --git a/gcc/testsuite/gcc.dg/pr53037-1.c b/gcc/testsuite/gcc.dg/pr53037-1.c
index 93af0a50cd4..1e4e0cbb204 100644
--- a/gcc/testsuite/gcc.dg/pr53037-1.c
+++ b/gcc/testsuite/gcc.dg/pr53037-1.c
@@ -39,7 +39,7 @@ struct foo5
 {
   int i1;
   int x __attribute__((warn_if_not_aligned(16))); /* { dg-warning "'x' offset 4 in 'struct foo5' isn't aligned to 16" } */
-}; /* { dg-warning "alignment 4 of 'struct foo5' is less than 16" } */
+}; /* { dg-warning "alignment \[24\] of 'struct foo5' is less than 16" } */
 
 struct foo6
 {
@@ -72,7 +72,7 @@ union bar3
 {
   int i1;
   int x __attribute__((warn_if_not_aligned(16))); 
-}; /* { dg-warning "alignment 4 of 'union bar3' is less than 16" } */
+}; /* { dg-warning "alignment \[24\] of 'union bar3' is less than 16" } */
 
 union bar4
 {
-- 
2.13.5

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-21 12:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-21 12:48 [PATCH 2/2] Update expected alignment in pr53037-1.C/pr53037-1.c H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).