blob: 3df2c792193a89342d6b147a60641fbc27722e93 [file] [log] [blame]
/* { dg-do run } */
/* { dg-options "-g" } */
struct s { int a, b, c, d; };
struct s gs1 = { 1, 2, 3, 4 };
struct s gs2 = { 5, 6, 7, 8 };
struct s *__attribute__((noipa)) consume (struct s *ptr) { return ptr; }
int
main (void)
{
struct s x;
struct s *volatile ptr = consume (&x);
x = gs1;
x = gs2; /* { dg-final { gdb-test . "ptr->a" "1" } } */
return 0; /* { dg-final { gdb-test . "ptr->a" "5" } } */
}