diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/builtin-unreachable-4.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/builtin-unreachable-4.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/builtin-unreachable-4.c b/gcc/testsuite/gcc.dg/builtin-unreachable-4.c new file mode 100644 index 000000000..90bc99cbe --- /dev/null +++ b/gcc/testsuite/gcc.dg/builtin-unreachable-4.c @@ -0,0 +1,14 @@ +/* Check that this valid code doesn't ICE. */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +void +g (int a, int b, int c, int d) +{ + if (d) + { + ((void) + (!(a && b && c) ? __builtin_unreachable (), 0 : 0)); + } + ((void) + (!(a && b && c) ? __builtin_unreachable (), 0 : 0)); +} |