PR c++/82069 - ICE with lambda in template
[official-gcc.git] / gcc / testsuite / gcc.dg / 20020103-1.c
blob4209486b8148282fb81828c0064bd78f60c5930e
1 /* Verify that constant equivalences get reloaded properly, either by being
2 spilled to the stack, or regenerated, but not dropped to memory. */
3 /* { dg-do compile { target { { i?86-*-* rs6000-*-* alpha*-*-* x86_64-*-* } || { powerpc*-*-* && ilp32 } } } } */
4 /* { dg-require-effective-target fpic } */
5 /* { dg-options "-O2 -fpic -fno-omit-frame-pointer -fno-asynchronous-unwind-tables" } */
6 /* { dg-final { scan-assembler-not "LC\[0-9\]" } } */
8 /* Clobber all call-saved registers that can hold a pointer value. */
9 #if defined(__i386__)
10 #define clobber \
11 asm volatile("#asm" : : : "si", "di")
12 #elif defined(__powerpc__) || defined(__PPC__) || defined(__ppc__) || defined(__POWERPC__) || defined(PPC) || defined (_IBMR2) || defined (__ppc)
13 #define clobber \
14 asm volatile("#asm" : : : "14", "15", "16", "17", "18", "19", "20", \
15 "21", "22", "23", "24", "25", "26", "27", "28", "29")
16 #elif defined(__alpha__)
17 #define clobber \
18 asm volatile("#asm" : : : "$9", "$10", "$11", "$12", "$13", "$14", \
19 "$f2", "$f3", "$f4", "$f5", "$f6", "$f7", "$f8", "$f9")
20 #elif defined(__x86_64__)
21 #define clobber \
22 asm volatile("#asm" : : : "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10", "r11")
23 #else
24 #error no clobber macro defined
25 #endif
27 extern void f1(int, int, int);
28 extern void f2(int*, int*, int*);
30 extern int ext;
31 static int loc_small;
32 static int loc_big[100];
34 void bar(void)
36 f1(ext, loc_small, loc_big[0]);
37 clobber;
38 f2(&ext, &loc_small, &loc_big[0]);