aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/20030907-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/20030907-1.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20030907-1.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030907-1.c b/gcc/testsuite/gcc.c-torture/execute/20030907-1.c
new file mode 100644
index 00000000000..cbdcf0c2f84
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20030907-1.c
@@ -0,0 +1,22 @@
+/* PR optimization/11662 */
+/* Origin: heinrich.brand@fujitsu-siemens.com */
+
+/* This used to fail on SPARC at -O1 because the combiner didn't
+ correctly propagate an error indicator. */
+
+unsigned long long r;
+
+void test(unsigned long a, unsigned long b, unsigned long long c)
+{
+ r = (a^b)&c;
+}
+
+int main()
+{
+ test(1,2,3);
+
+ if (r != 3)
+ abort();
+
+ return 0;
+}