Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / c-c++-common / pr51712.c
blob69e316d24521834a5f31aad89b68969b7ec9fe6b
1 /* PR c/51712 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wtype-limits" } */
4 /* { dg-additional-options "-fno-short-enums" { target short_enums } } */
6 enum test_enum {
7 FOO,
8 BAR
9 };
11 int valid(enum test_enum arg)
13 return arg >= 0 && arg <= BAR;
16 int valid2(unsigned int arg2)
18 return arg2 >= FOO && arg2 <= BAR; /* { dg-bogus "comparison of unsigned expression" "" { xfail *-*-* } } */