aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/guality/pr54551.c
blob: 4235f78ce7313f5f21807ff0f6163317a6917b32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* PR debug/54551 */
/* { dg-do run } */
/* { dg-options "-g" } */

void  __attribute__((__noinline__))
bar (void)
{
  asm volatile ("");
}

int __attribute__((__noinline__))
foo (int x, int y, int z)
{
  if (x != z)
    {
      int a = z + 1;
      bar (); /* { dg-final { gdb-test 18 "a" "4" } } */
      bar (); /* { dg-final { gdb-test 18 "z" "3" } } */
    }
  return y;
}

int
main ()
{
  foo (1, 2, 3);
  return 0;
}