summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/guality/pr43593.c
blob: d8cc41359be9ac50cba335a105c99c3533aacac6 (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
/* PR debug/43593 */
/* { dg-do run } */
/* { dg-options "-g" } */

void __attribute__((noinline))
bar (int *p)
{
  asm volatile ("" : : "r" (p) : "memory");
}

int __attribute__((noinline))
foo (void)
{
  int i, *j = &i;
  bar (j);
  return 6 + i;	/* { dg-final { gdb-test 16 "j" "&i" } } */
}

int
main (void)
{
  foo ();
  return 0;
}