OSDN Git Service

Merge from transactional-memory branch.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / c99-bool-1.c
index 8a45988..7ec99a7 100644 (file)
@@ -32,8 +32,6 @@ int c = __bool_true_false_are_defined;
 struct foo
 {
   _Bool a : 1;
-  _Bool b : 2;
-  _Bool c : 7;
 } sf;
 
 #define str(x) xstr(x)
@@ -54,7 +52,7 @@ main (void)
     abort ();
   if (a != 1 || b != 0 || c != 1)
     abort ();
-  /* Casts to _Bool have a specified behaviour.  */
+  /* Casts to _Bool have a specified behavior.  */
   if ((int)(_Bool)2 != 1)
     abort ();
   if ((int)(_Bool)0.2 != 1)
@@ -228,9 +226,7 @@ main (void)
     abort ();
   if ((u |= 2) != 1)
     abort ();
-  /* ??? A bit queer, since this gets optimized to ((u = (u != 3)) != 1)
-     early in semantic analysis, which then yields the warning below.  */
-  if ((u ^= 3) != 1)   /* { dg-warning "always true due to limited range" } */
+  if ((u ^= 3) != 1)
     abort ();
   /* Test comma expressions.  */
   u = 1;
@@ -244,21 +240,9 @@ main (void)
     sf.a = 1;
     if (sf.a != 1)
       abort ();
-    sf.b = 1;
-    if (sf.b != 1)
-      abort ();
-    sf.c = 1;
-    if (sf.c != 1)
-      abort ();
     sf.a = 0;
     if (sf.a != 0)
       abort ();
-    sf.b = 0;
-    if (sf.b != 0)
-      abort ();
-    sf.c = 0;
-    if (sf.c != 0)
-      abort ();
   }
   exit (0);
 }