Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.dg / pr34457-1.c
blobccd937c6b528857378bcf47fee27bf17e4402bf3
1 /* PR c/34457 */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target trampolines } */
4 /* { dg-options "--combine -O2" } */
5 /* { dg-additional-sources "pr34457-2.c" } */
8 typedef __SIZE_TYPE__ size_t;
9 extern int printf (const char *, ...);
10 extern void *memset (void *, int, size_t);
12 int bar (int (*)(), int, void *);
14 int
15 main(int argc, char **argv)
17 struct s { int a; char b[argc]; };
18 int nested (struct s x) { return x.a + sizeof(x); }
19 struct s t;
20 memset (&t, 0, sizeof(t));
21 t.a = 123;
22 printf("%d\n", bar (nested, argc, &t));
23 return 0;