re PR debug/53671 (Many guality test failures)
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 28 Jun 2012 07:41:02 +0000 (07:41 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 28 Jun 2012 07:41:02 +0000 (07:41 +0000)
PR debug/53671
PR debug/49888
* gcc.dg/guality/pr49888.c: Account for the possibility that
the variable is optimized out at the first test.

From-SVN: r189038

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/guality/pr49888.c

index 4217e6a6675f240158e8de11b1f67aa071039d06..4b710e28abd2ee183d1d7fb30a646516bc33d271 100644 (file)
@@ -1,3 +1,10 @@
+2012-06-28  Alexandre Oliva  <aoliva@redhat.com>
+
+       PR debug/53671
+       PR debug/49888
+       * gcc.dg/guality/pr49888.c: Account for the possibility that
+       the variable is optimized out at the first test.
+
 2012-06-27  Jason Merrill  <jason@redhat.com>
 
        * g++.dg/cpp0x/override2.C: Adjust.
index 3d1e65321efdb4f9e1c681a998064749ebeb9cc1..a0e26cf8327ff3b3d483c238673c21afa28f9fc7 100644 (file)
@@ -9,12 +9,13 @@ f (int *p)
 {
   int c = *p;
   v = c;
-  *p = 1; /* { dg-final { gdb-test 12 "c" "0" } } */
+  *p = 1; /* { dg-final { gdb-test 12 "!!c" "0" } } */
   /* c may very well be optimized out at this point, so we test !c,
      which will evaluate to the expected value.  We just want to make
      sure it doesn't remain bound to *p as it did before, in which
-     case !c would evaluate to 0.  */
-  v = 0; /* { dg-final { gdb-test 17 "!c" "1" } } */
+     case !c would evaluate to 0.  *p may also be regarded as aliasing
+     register saves, thus the !!c above.  */
+  v = 0; /* { dg-final { gdb-test 18 "!c" "1" } } */
 }
 int
 main ()