Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / guality / pr49888.c
blob89deca4ac3be2f634704aa781512628c6fd02f00
1 /* PR debug/49888 */
2 /* { dg-do run } */
3 /* { dg-options "-g" } */
5 static int v __attribute__((used));
7 static void __attribute__((noinline, noclone))
8 f (int *p)
10 int c = *p;
11 v = c;
12 *p = 1; /* { dg-final { gdb-test 12 "!!c" "0" } } */
13 /* c may very well be optimized out at this point, so we test !c,
14 which will evaluate to the expected value. We just want to make
15 sure it doesn't remain bound to *p as it did before, in which
16 case !c would evaluate to 0. *p may also be regarded as aliasing
17 register saves, thus the !!c above. */
18 v = 0; /* { dg-final { gdb-test 18 "!c" "1" } } */
20 int
21 main ()
23 int a = 0;
24 f (&a);
25 return 0;