aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2020-05-18 16:31:13 -0600
committerMartin Sebor <msebor@redhat.com>2020-05-18 16:31:13 -0600
commit8edf0adb6616bd717312d9b305c7d7c9a6b7a171 (patch)
treecb67c163e443131b31cb53d7231574a19e3afa36 /gcc
parent5d2246a32c638e9caea109e5dd9f182f5cd43b2a (diff)
downloadgcc-8edf0adb6616bd717312d9b305c7d7c9a6b7a171.zip
gcc-8edf0adb6616bd717312d9b305c7d7c9a6b7a171.tar.gz
gcc-8edf0adb6616bd717312d9b305c7d7c9a6b7a171.tar.bz2
PR middle-end/92815 - spurious -Wstringop-overflow writing into a flexible array of an extern struct
Adjust test to avoid failures in ILP32 mode. gcc/testsuite/ChangeLog: PR middle-end/92815 * gcc.dg/builtin-object-size-20.c: Adjust to avoid failures in ILP32 mode.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-20.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 67e9394..40e9d66 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2020-05-18 Martin Sebor <msebor@redhat.com>
+
+ PR middle-end/92815
+ * gcc.dg/builtin-object-size-20.c: Adjust to avoid failures in
+ ILP32 mode.
+
2020-05-18 Marek Polacek <polacek@redhat.com>
PR c++/90915
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-20.c b/gcc/testsuite/gcc.dg/builtin-object-size-20.c
index 47821c0..bed973c 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-20.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-20.c
@@ -1,7 +1,7 @@
/* PR middle-end/92815 - spurious -Wstringop-overflow writing into
a flexible array of an extern struct
{ dg-do compile }
- { dg-options "-Wall -fdump-tree-optimized" } */
+ { dg-options "-O -Wall -fdump-tree-optimized" } */
#define ASSERT(expr) ((expr) ? (void)0 : fail (__LINE__))
#define bos0(expr) __builtin_object_size (expr, 1)
@@ -213,7 +213,7 @@ void fai32cx (void)
/* Verify sizes of a struct with a flexible array member and 7 bytes
of tail padding. */
-struct AI64CX { int64_t i; char n, a[]; };
+struct AI64CX { int64_t i __attribute__ ((aligned (8))); char n, a[]; };
struct AI64CX ai64c0 = { 0 };
struct AI64CX ai64c1 = { 0, 1, { 1 } };