Do not enable -mpcrel by default at the current time
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / notoc-direct-1.c
blob8603ff7706b8c4a31b4ecd0c2f12c18995bb259a
1 /* { dg-do compile } */
2 /* { dg-options "-mdejagnu-cpu=future -O2 -mpcrel" } */
3 /* { dg-require-effective-target powerpc_elfv2 } */
4 /* { dg-require-effective-target powerpc_future_ok } */
6 /* Test that calls generated from PC-relative code are annotated with @notoc.
7 At present, -mcpu=future does not enable pc-relative mode. Enable it here
8 explicitly until it is turned on by default. */
10 extern int yy0 (int);
11 extern void yy1 (int);
13 int zz0 (void) __attribute__((noinline));
14 void zz1 (int) __attribute__((noinline));
16 int xx (void)
18 yy1 (7);
19 return yy0 (5);
22 int zz0 ()
24 asm ("");
25 return 16;
28 void zz1 (int a __attribute__((__unused__)))
30 asm ("");
33 int ww (void)
35 zz1 (zz0 ());
36 return 4;
39 /* { dg-final { scan-assembler {yy1@notoc} } } */
40 /* { dg-final { scan-assembler {yy0@notoc} } } */
41 /* { dg-final { scan-assembler {zz1@notoc} } } */
42 /* { dg-final { scan-assembler {zz0@notoc} } } */