* g++.dg/cpp1z/aligned-new7.C: Fix for small MAX_STACK_ALIGNMENT targets.
authorJason Merrill <jason@gcc.gnu.org>
Thu, 20 Oct 2016 13:47:25 +0000 (09:47 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 20 Oct 2016 13:47:25 +0000 (09:47 -0400)
From-SVN: r241375

gcc/testsuite/g++.dg/cpp1z/aligned-new7.C

index e12db9b9fad93057ca846eddccd808946b34c7e2..695b77f80b13a0cc66bc81f3d6830c27f9054341 100644 (file)
@@ -8,8 +8,9 @@ struct X
   alignas(2*__STDCPP_DEFAULT_NEW_ALIGNMENT__) int i;
 };
 
+alignas(alignof(X)) char buf[sizeof(X)];
+
 int main()
 {
-  alignas(alignof(X)) char buf[sizeof(X)];
   ::new((void*)buf) X{1};
 }