libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / c23-unreachable-1.c
blob4cbe7f0d67d76138c4b7673958a485c6e096a6f1
1 /* Test unreachable in <stddef.h> for C23. */
2 /* { dg-do run } */
3 /* { dg-options "-std=c23 -pedantic-errors -O2" } */
5 #include <stddef.h>
7 #ifndef unreachable
8 #error "unreachable not defined"
9 #endif
11 extern void *p;
12 extern __typeof__ (unreachable ()) *p;
14 volatile int x = 1;
16 extern void not_defined (void);
18 extern void exit (int);
20 int
21 main ()
23 if (x == 2)
25 unreachable ();
26 not_defined ();
28 exit (0);