diff --git a/gcc/testsuite/gcc.c-torture/compile/builtin_constant_p.c b/gcc/testsuite/gcc.c-torture/compile/builtin_constant_p.c new file mode 100644 index 000000000000..fdfe3e0da6d0 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/builtin_constant_p.c @@ -0,0 +1,8 @@ +/* { dg-options "-O2" } */ + +int main (int argc, char *argv[]) +{ + static int a[] = { __builtin_constant_p (argc) ? 1 : 0 }; + return a[0]; +} +