view gcc/testsuite/gcc.dg/guality/pr69947.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* 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;
}