From e5d0da7fe3b214cd85441db7a40817960de1f0a7 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 26 Feb 2015 14:17:06 +0000 Subject: [PATCH] Add a testcase for PR target/65217 PR target/65217 * gcc.target/i386/pr65217.c: New. From-SVN: r221010 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr65217.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 gcc/testsuite/gcc.target/i386/pr65217.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b95443fcd5b..9fc8c4cadbe 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-02-26 H.J. Lu + + PR target/65217 + * gcc.target/i386/pr65217.c: New. + 2015-02-26 Tom de Vries * lib/dg-pch.exp (pch-init): Add missing cleanup of pchtest.o. diff --git a/gcc/testsuite/gcc.target/i386/pr65217.c b/gcc/testsuite/gcc.target/i386/pr65217.c new file mode 100644 index 00000000000..d5c9be5b9ef --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr65217.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-O" } */ +/* { dg-final { scan-assembler-not "negl" } } */ +/* { dg-final { scan-assembler-not "andl" } } */ + +int +test(int n) +{ + if ((n & -n) != n) + __builtin_unreachable(); + return n; +} -- 2.30.2