Avoid expicit builtion list in tree-ssa-dce
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / infinite-loop-g_error.c
blob5a267be0770e08eebad6a784004e85d1b2626a7c
1 /* Reduced from glib, which has a g_error macro with this infinite
2 loop in it:
3 for (;;) ;
5 Make sure we provide a readable warning for this case. */
7 extern void g_log_structured_standard (const char *);
9 #define g_error(MSG) \
10 do { \
11 g_log_structured_standard (MSG); \
12 for (;;) ; \
13 } while (0)
14 /* { dg-message "5: infinite loop" "" { target *-*-* } .-2 } */
16 void test_g_error (void)
18 g_error ("something went wrong"); /* { dg-message "in expansion of macro 'g_error'" } */