From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2100) id D9781388187C; Sat, 22 Aug 2020 21:22:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D9781388187C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1598131324; bh=8PdTtvPOhlyCshTT4JDGqtDWLmL58JvJ6UN+4PMOOo4=; h=From:To:Subject:Date:From; b=EL/iZliMxXG99xOfEgwRXNiijxyvO3u35RJTVV9Nwm7bi6icOnfzuNgSo13MkLG6o DibAvQ7Ovbmll1T2nMBS0tiv/S4CIzDZFk0f72qPVSK+nFmRlFy6NCgtQNdAy22gAM rieqiOeAl64375x8wMrwLNP0XEZ/tdTwLrEUbBIc= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Giuliano Belinassi To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/autopar_devel] PR middle-end/92815 - spurious -Wstringop-overflow writing into a flexible array of an extern struct X-Act-Checkin: gcc X-Git-Author: Martin Sebor X-Git-Refname: refs/heads/devel/autopar_devel X-Git-Oldrev: 8922d61ba6a75432cb16fb6fee1f52d865bc08ac X-Git-Newrev: 1b439da1f681efb98dac16d6d7f0ca709976edaf Message-Id: <20200822212204.D9781388187C@sourceware.org> Date: Sat, 22 Aug 2020 21:22:04 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Aug 2020 21:22:05 -0000 https://gcc.gnu.org/g:1b439da1f681efb98dac16d6d7f0ca709976edaf commit 1b439da1f681efb98dac16d6d7f0ca709976edaf Author: Martin Sebor Date: Mon May 18 16:31:13 2020 -0600 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. Diff: --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/builtin-object-size-20.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 67e9394ed92..40e9d666f00 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2020-05-18 Martin Sebor + + PR middle-end/92815 + * gcc.dg/builtin-object-size-20.c: Adjust to avoid failures in + ILP32 mode. + 2020-05-18 Marek Polacek 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 47821c06d76..bed973c2c77 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 } };