aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMark Shinwell <shinwell@gcc.gnu.org>2006-06-04 16:30:28 +0000
committerMark Shinwell <shinwell@gcc.gnu.org>2006-06-04 16:30:28 +0000
commit89cfff85bf2d0c09f591ab051b18a3a9643330d9 (patch)
treeab4377155ae2ee779d9e73cb1e47d0a998e5a995 /gcc
parent63b4819753c735449a0915e62928fa6374cd70c3 (diff)
downloadgcc-89cfff85bf2d0c09f591ab051b18a3a9643330d9.zip
gcc-89cfff85bf2d0c09f591ab051b18a3a9643330d9.tar.gz
gcc-89cfff85bf2d0c09f591ab051b18a3a9643330d9.tar.bz2
builtin_constant_p.c: New test.
* gcc.c-torture/compile/builtin_constant_p.c: New test. (neglected in previous commit) From-SVN: r114359
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/builtin_constant_p.c8
1 files changed, 8 insertions, 0 deletions
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 0000000..fdfe3e0
--- /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];
+}
+