summaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-02-10 16:31:18 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2012-02-10 16:31:18 +0100
commit58d38fd2d686869ed3be3956614ed0c0cb20982d (patch)
treeff011893005758a4dd76471a465ba744ffbcc5d7 /gcc/testsuite/c-c++-common
parente6c5817dca87ebafda02ea2cb7abaf7e00db74a5 (diff)
downloadgcc-58d38fd2d686869ed3be3956614ed0c0cb20982d.tar.gz
re PR middle-end/52177 (ICE: verify_gimple failed: non-trivial conversion at assignment with __atomic_is_lock_free())
PR middle-end/52177 * builtins.c (fold_builtin_atomic_always_lock_free, expand_builtin_atomic_always_lock_free, fold_builtin_atomic_is_lock_free, expand_builtin_atomic_is_lock_free): Return and/or test boolean_true_node/boolean_false_node instead of integer_one_node/integer_zero_node. * c-c++-common/pr52177.c: New test. From-SVN: r184096
Diffstat (limited to 'gcc/testsuite/c-c++-common')
-rw-r--r--gcc/testsuite/c-c++-common/pr52177.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/pr52177.c b/gcc/testsuite/c-c++-common/pr52177.c
new file mode 100644
index 00000000000..165acdef29c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr52177.c
@@ -0,0 +1,23 @@
+/* PR middle-end/52177 */
+/* { dg-do compile } */
+/* { dg-options "-O -fno-tree-ccp" } */
+
+int *s;
+
+static inline int
+foo ()
+{
+ return sizeof (int);
+}
+
+int
+bar ()
+{
+ return __atomic_always_lock_free (foo (), s);
+}
+
+int
+baz ()
+{
+ return __atomic_is_lock_free (foo (), s);
+}