PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / pr16194.c
blob8b4492240192e2da699448ca578eb8b6e34ffc7e
1 /* { dg-do compile } */
2 /* { dg-options "-O" } */
3 /* { dg-bogus "internal compiler error" "ICE" { target *-*-* } 0 } */
5 #undef SKIP
6 #define ASMDECL __asm (REG);
7 #define CLOBBER_LIST : REG
8 #define INP_CLOBBER_LIST : CLOBBER_LIST
9 #if defined (__alpha__)
10 # define REG "$1"
11 #elif defined (__CRIS__) || defined (__sh__)
12 # define REG "r10"
13 #elif defined (__hppa__)
14 # define REG "%r10"
15 #elif defined (__i386__)
16 # define REG "%eax"
17 #elif defined (__MMIX__)
18 # define REG "$8"
19 #elif defined (__powerpc__) || defined (__PPC__) || defined (__ppc__) \
20 || defined (__POWERPC__) || defined (PPC) || defined (_IBMR2)
21 # define REG "6"
22 #elif defined (__x86_64__)
23 # define REG "rax"
24 #elif defined (__m68k__)
25 # define REG "%d0"
26 #else
27 /* Make this test harmless for any target not recognized above. */
28 # define SKIP 1
29 #endif
31 #ifndef SKIP
33 struct A
35 int a;
38 struct B
40 struct A b[3];
43 struct C
45 struct B c;
48 void bug (void)
50 register char* dst ASMDECL;
51 __asm__ ("":"=g"(*dst): : REG);
54 /* The tree optimizers currently prevent us from finding an overlap -
55 we end up using a copy of dst rather than dst.
56 But at least make sure we don't get an ICE. */
57 void bug2 (void)
59 register char* dst ASMDECL;
60 __asm__ ("": :"g"(*dst) CLOBBER_LIST);
63 void
64 foo (void)
66 register struct C *dst ASMDECL;
67 __asm__ ("" : "=g"(dst->c.b[1].a) INP_CLOBBER_LIST);
70 #else
72 int main ()
74 return 0;
77 #endif