Add a testcase for PR target/65217
authorH.J. Lu <hongjiu.lu@intel.com>
Thu, 26 Feb 2015 14:17:06 +0000 (14:17 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Thu, 26 Feb 2015 14:17:06 +0000 (06:17 -0800)
PR target/65217
* gcc.target/i386/pr65217.c: New.

From-SVN: r221010

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr65217.c [new file with mode: 0644]

index b95443fcd5b47bd736bc6a4b57f3baf4e4ee98bd..9fc8c4cadbe0340a6e2f7eda79650572397e9d32 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/65217
+       * gcc.target/i386/pr65217.c: New.
+
 2015-02-26  Tom de Vries  <tom@codesourcery.com>
 
        * lib/dg-pch.exp (pch-init): Add missing cleanup of pchtest<n>.o.
diff --git a/gcc/testsuite/gcc.target/i386/pr65217.c b/gcc/testsuite/gcc.target/i386/pr65217.c
new file mode 100644 (file)
index 0000000..d5c9be5
--- /dev/null
@@ -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;
+}