OSDN Git Service

PR tree-optimization/52019
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 20030612-1.c
index f9f212c..f087512 100644 (file)
@@ -1,20 +1,24 @@
-/* Derived from PR middle-end/168.  */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
 
-/* { dg-do compile } */
-/* { dg-options "-W" } */
+extern void abort (void);
 
-extern void foo ();
+int A, B;
 
-unsigned char uc;
-unsigned short int usi;
-unsigned int ui;
-
-
-void bar()
+void foo()
 {
-  if (uc + usi >= ui)  /* { dg-bogus "between signed and unsigned" } */
-    foo ();
-  if (uc * usi >= ui)  /* { dg-bogus "between signed and unsigned" } */
-    foo ();
+  long x = 3;
+  (void)({
+    A = B + x + ((1) - 1);
+    return;    /* { dg-warning "statement-expressions should end with a non-void expression" "" { xfail *-*-* } } */
+  });
 }
 
+main()
+{
+  B = 5;
+  foo();
+  if (A != 8)
+    abort ();
+  return 0;
+}