Commit 7fefe030 by Alexandre Oliva Committed by Alexandre Oliva

re PR debug/53671 (Many guality test failures)

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
parent a992a6d1
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> 2012-06-27 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/override2.C: Adjust. * g++.dg/cpp0x/override2.C: Adjust.
......
...@@ -9,12 +9,13 @@ f (int *p) ...@@ -9,12 +9,13 @@ f (int *p)
{ {
int c = *p; int c = *p;
v = c; 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, /* 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 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 sure it doesn't remain bound to *p as it did before, in which
case !c would evaluate to 0. */ case !c would evaluate to 0. *p may also be regarded as aliasing
v = 0; /* { dg-final { gdb-test 17 "!c" "1" } } */ register saves, thus the !!c above. */
v = 0; /* { dg-final { gdb-test 18 "!c" "1" } } */
} }
int int
main () main ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment