]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
g++.dg/cpp1y/vla11.C: Avoid using attribute aligned to increase type
authormsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Apr 2016 15:25:40 +0000 (15:25 +0000)
committermsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 14 Apr 2016 15:25:40 +0000 (15:25 +0000)
  size to prevent failures on targets with very low maximum alignment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234976 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/vla11.C

index c2a4c93209200c6c41dc9fff032b024972032849..b7c5d3c632ce9c69356cd24303c75ccafcf088b9 100644 (file)
@@ -1,3 +1,9 @@
+2016-04-14  Martin Sebor  <msebor@redhat.com>
+
+       * g++.dg/cpp1y/vla11.C: Avoid using attribute aligned to increase
+       type size to prevent failures on targets with very low maximum
+       alignment.
+
 2016-04-14  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/70623
index af9624a404b9fa93a878c640ae0a44800b13aec2..36609abe53bc5564a848b341f26736568666056d 100644 (file)
@@ -86,9 +86,10 @@ sink (void *p, int line, bool expect, const char *expr)
 // that the checking code can deal with templates (i.e., completes
 // the element type of the VLA when necessary).
 template <unsigned TypeSize>
-struct alignas (TypeSize) TestType
+union TestType
 {
   char data;
+  char padding [TypeSize];
 };
 
 // Test function invoked with a pointer to each test case.  Must