3 We ICEd in verify_local_live_at_start because we incorrectly forced
4 the PIC register live between BAR and BAZ. We did this because the
5 definition of PIC_OFFSET_TABLE_REGNUM was incorrectly not INVALID_REGNUM
6 when !flag_pic for most targets. */
9 /* { dg-options "-O -fno-pic" } */
10 /* { dg-require-effective-target nonlocal_goto } */
12 extern void abort (void);
14 #if defined(__alpha__)
15 /* PIC register is $29, but is used even without -fpic. */
16 #elif defined(__arc__)
18 #elif defined(__arm__)
21 /* No pic register. */
22 #elif defined(__cris__)
24 #elif defined(__epiphany__)
26 #elif defined(__fr30__)
27 /* No pic register. */
28 #elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__)
29 /* No pic register. */
31 /* No pic register. */
32 #elif defined(__i386__)
33 # define PIC_REG "ebx"
34 #elif defined(__ia64__)
35 /* PIC register is r1, but is used even without -fpic. */
36 #elif defined(__lm32__)
37 /* No pic register. */
38 #elif defined(__M32R__)
39 /* No pic register. */
40 #elif defined(__m68k__)
42 #elif defined(__mc68hc1x__)
43 /* No pic register. */
44 #elif defined(__mcore__)
45 /* No pic register. */
46 #elif defined(__MICROBLAZE__)
47 # define PIC_REG "r20"
48 #elif defined(__mips__)
49 /* PIC register is $28, but is used even without -fpic. */
50 #elif defined(__MMIX__)
51 /* No pic register. */
52 #elif defined(__mn10300__)
53 /* No pic register. */
54 #elif defined(__moxie__)
55 /* No pic register. */
56 #elif defined(__nds32__)
57 /* No pic register. */
58 #elif defined(__nios2__)
59 /* No pic register. */
60 #elif defined(__hppa__)
61 /* PIC register is %r27 or %r19, but is used even without -fpic. */
62 #elif defined(__pdp11__)
63 /* No pic register. */
64 #elif defined(__powerpc__) || defined(__PPC__) || defined(__POWERPC__) || defined (__ppc)
70 #elif defined(__riscv)
71 /* No pic register. */
73 /* No pic register. */
74 #elif defined(__s390__)
76 #elif defined(__sparc__)
78 #elif defined(__tile__)
79 # define PIC_REG "r51"
80 #elif defined(__TMS320C6X__)
81 # define PIC_REG "B14"
83 /* No pic register. */
84 #elif defined(__vax__)
85 /* No pic register. */
86 #elif defined(__VISIUM__)
87 /* No pic register. */
88 #elif defined(__xstormy16__)
89 /* No pic register. */
90 #elif defined(__XTENSA__)
91 /* No pic register. */
93 # define PIC_REG "r12"
94 #elif defined(__x86_64__)
95 /* No pic register. */
96 #elif defined(__m32c__)
97 /* No pic register. */
98 #elif defined(__SPU__)
99 # define PIC_REG "126"
100 #elif defined (__frv__)
101 # ifdef __FRV_FDPIC__
102 # define PIC_REG "gr15"
104 # define PIC_REG "gr17"
106 #elif defined (__aarch64__)
107 /* No pic register -- yet. */
108 #elif defined(__RL78__)
109 /* No pic register. */
110 #elif defined(__MSP430__)
111 /* No pic register. */
112 #elif defined (__nvptx__)
113 /* No pic register. */
115 # error "Modify the test for your target."
118 #if defined PIC_REG && !defined __PIC__ && !defined __pic__
119 register void *reg
__asm__(PIC_REG
);
121 /* We really need a global register variable set to the PIC register
122 to expose the bug. Oh well, let the test case not fail. */
126 void * __attribute__((noinline
))
158 /* Additionally test that the prologue/epilogue properly does *not*
159 save and restore global registers. Not possible when the PIC
160 register is in a register window, of course. On Darwin, you can't
161 call library routines from non-PIC code. */
162 #if !defined (__sparc__) && !defined(__MACH__)