1*c85f09ccSJohn Levon int a, c, d; 2*c85f09ccSJohn Levon foo_ptr(void)3*c85f09ccSJohn Levonint foo_ptr(void) 4*c85f09ccSJohn Levon { 5*c85f09ccSJohn Levon int b, *bp = &b; 6*c85f09ccSJohn Levon int e, *ep = &e; 7*c85f09ccSJohn Levon 8*c85f09ccSJohn Levon if (a) 9*c85f09ccSJohn Levon *bp = c; 10*c85f09ccSJohn Levon else 11*c85f09ccSJohn Levon *bp = d; 12*c85f09ccSJohn Levon if (c) 13*c85f09ccSJohn Levon a = *bp; 14*c85f09ccSJohn Levon if (b) 15*c85f09ccSJohn Levon e = a; 16*c85f09ccSJohn Levon return e; 17*c85f09ccSJohn Levon } 18*c85f09ccSJohn Levon 19*c85f09ccSJohn Levon /* 20*c85f09ccSJohn Levon * check-name: global pointer 21*c85f09ccSJohn Levon * check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file 22*c85f09ccSJohn Levon * check-known-to-fail 23*c85f09ccSJohn Levon * check-output-ignore 24*c85f09ccSJohn Levon * check-output-pattern(4,5): load\\. 25*c85f09ccSJohn Levon * check-output-pattern(3): store\\. 26*c85f09ccSJohn Levon */ 27