tree-optimization/116481 - avoid building function_type[]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / pr77321.C
blob51c5bd9b3946e7a089b6f00de0747999bed57273
1 // PR c++/77321
2 // { dg-do compile { target c++14 } }
3 // { dg-options "-Wall" }
4 // { dg-require-effective-target size24plus }
6 extern "C" void *memset (void *, int, __SIZE_TYPE__);
7 extern "C" void *malloc(__SIZE_TYPE__);
9 struct S {
10     char *a;
13 template <typename T>
14 void Test(T & Obj) {
15     auto && a(Obj.a);
16     a = (char*)::malloc(1024 * 1024);
17     ::memset(a + 28, 'X', 6);
20 int main()
22   S d;
23   Test(d);
24   return 0;