PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / nested-func-3.c
blob19e8a6155b90f1439d405695eab697727235dfb8
1 /* Undefined nested function should be a error, whether or not the
2 function is called. Bug 17807. */
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */
4 /* { dg-do compile } */
5 /* { dg-options "" } */
7 void
8 f (void)
10 auto int fn (int); /* { dg-error "nested function 'fn' declared but never defined" } */
11 auto int fn2 (int); /* { dg-error "nested function 'fn2' declared but never defined" } */
12 sizeof(fn(1));
15 void
16 h (void)
18 auto int hn (int); /* { dg-error "nested function 'hn' declared but never defined" } */
19 hn (1);