OSDN Git Service

PR c/20187
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Jul 2005 16:27:22 +0000 (16:27 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 28 Jul 2005 16:27:22 +0000 (16:27 +0000)
* gcc.c-torture/execute/pr20187-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102490 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr20187-1.c [new file with mode: 0644]

index d2382f3..b52b92e 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-28  Richard Sandiford  <richard@codesourcery.com>
+
+       PR c/20187
+       * gcc.c-torture/execute/pr20187-1.c: New test.
+
 2005-07-28  Jeff Law  <law@redhat.com>
 
        * gcc.dg/tree-ssa/vrp17.c: Update expected output.
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr20187-1.c b/gcc/testsuite/gcc.c-torture/execute/pr20187-1.c
new file mode 100644 (file)
index 0000000..a1f0a09
--- /dev/null
@@ -0,0 +1,15 @@
+int a = 0x101;
+int b = 0x100;
+
+int
+test (void)
+{
+  return (((unsigned char) (unsigned long long) ((a ? a : 1) & (a * b)))
+         ? 0 : 1);
+}
+
+int
+main (void)
+{
+  return 1 - test ();
+}