builtin_constant_p.c: New test.
authorMark Shinwell <shinwell@gcc.gnu.org>
Sun, 4 Jun 2006 16:30:28 +0000 (16:30 +0000)
committerMark Shinwell <shinwell@gcc.gnu.org>
Sun, 4 Jun 2006 16:30:28 +0000 (16:30 +0000)
* gcc.c-torture/compile/builtin_constant_p.c: New test.
(neglected in previous commit)

From-SVN: r114359

gcc/testsuite/gcc.c-torture/compile/builtin_constant_p.c [new file with mode: 0644]

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 (file)
index 0000000..fdfe3e0
--- /dev/null
@@ -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];
+}
+