Debian Codegraph @

gcc/testsuite/g++.dg/diagnostic/recur-align.C

raw
1 // ICE with diagnostic recursion
2 // { dg-do compile { target { c++11_only || c++14_only } } }
3 // { dg-options -Waligned-new }
4
5 struct __attribute__ ((aligned(256))) Aligned
6 {
7 int b;
8 };
9
10 template<typename T>
11 auto Foo (const T* x) -> decltype (new T (*x))
12 {
13 return new T (*x); // { dg-warning "with extended alignment" }
14 }
15
16 void Bar () {
17 Aligned y;
18 Foo (&y);
19 }