From bf7b869abb0818a7f9eada5c16afe31294e6fa9f Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 7 Apr 2017 08:47:43 +0000 Subject: [PATCH] re PR tree-optimization/80334 (Segfault when taking address of copy of unaligned struct) 2017-04-07 Richard Biener PR tree-optimization/80334 * g++.dg/torture/pr80334.C: Use __BIGGEST_ALIGNMENT__ for alignas on stack. From-SVN: r246757 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/g++.dg/torture/pr80334.C | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fc772c46723..d22a9a9538a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-04-07 Richard Biener + + PR tree-optimization/80334 + * g++.dg/torture/pr80334.C: Use __BIGGEST_ALIGNMENT__ for + alignas on stack. + 2017-04-07 Richard Biener PR middle-end/80341 diff --git a/gcc/testsuite/g++.dg/torture/pr80334.C b/gcc/testsuite/g++.dg/torture/pr80334.C index de50c463535..aee15487636 100644 --- a/gcc/testsuite/g++.dg/torture/pr80334.C +++ b/gcc/testsuite/g++.dg/torture/pr80334.C @@ -8,7 +8,7 @@ char x; int main() { - alignas(16) B b[3]; + alignas(__BIGGEST_ALIGNMENT__) B b[3]; for (int i = 0; i < 3; i++) b[i].unpacked.c = 'a' + i; for (int i = 0; i < 3; i++) { -- 2.30.2