aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/guality/pr69947.c
blob: 163214972f526b3ce73e109bb61e1cd70001060f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR debug/69947 */
/* { dg-do run } */
/* { dg-options "-g" } */

#include "../nop.h"

static const char *c = "foobar";

__attribute__((noinline, noclone)) void
foo (void)
{
  static const char a[] = "abcdefg";
  const char *b = a;		/* { dg-final { gdb-test .+1 "c\[2\]" "'o'" } } */
  asm (NOP : : : "memory");	/* { dg-final { gdb-test . "b\[4\]" "'e'" } } */
}

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