Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/pr96866-1.c

raw
1 /* The "%a" modifier can't get the address of extern symbol directly from TOC
2 with -fPIC, even the symbol is propagated for "X" constraint under -O2. */
3 /* { dg-options "-fPIC -O2 -mno-pcrel" } */
4
5 /* It's to verify no ICE here, ignore error messages about invalid 'asm'. */
6 /* { dg-excess-errors "pr96866-1.c" } */
7
8 int x[2];
9
10 int __attribute__ ((noipa))
11 f1 (void)
12 {
13 int n;
14 int *p = x;
15 *p++;
16 __asm__ volatile("ld %0, %a1" : "=r"(n) : "X"(p));
17 return n;
18 }