OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [pr16194.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O" } */
3
/* { dg-bogus "internal compiler error" "ICE" { target *-*-* } 0 } */
4
 
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 (__i386__)
14
# define REG "%eax"
15
#elif defined (__MMIX__)
16
# define REG "$8"
17
#elif defined (__powerpc__) || defined (__PPC__) || defined (__ppc__) \
18
        || defined (__POWERPC__) || defined (PPC) || defined (_IBMR2)
19
# define REG "6"
20
#elif defined (__x86_64__)
21
# define REG "rax"
22
#elif defined (__m68k__)
23
# define REG "%d0"
24
#else
25
/* Make this test harmless for any target not recognized above.  */
26
# define SKIP 1
27
#endif
28
 
29
#ifndef SKIP
30
 
31
struct A
32
{
33
  int a;
34
};
35
 
36
struct B
37
{
38
  struct A b[3];
39
};
40
 
41
struct C
42
{
43
  struct B c;
44
};
45
 
46
void bug (void)
47
{
48
  register char* dst ASMDECL;
49
  __asm__ ("":"=g"(*dst): : REG);
50
}
51
 
52
/* The tree optimizers currently prevent us from finding an overlap -
53
   we end up using a copy of dst rather than dst.
54
   But at least make sure we don't get an ICE.  */
55
void bug2 (void)
56
{
57
  register char* dst ASMDECL;
58
  __asm__ ("": :"g"(*dst) CLOBBER_LIST);
59
}
60
 
61
void
62
foo (void)
63
{
64
  register struct C *dst ASMDECL;
65
  __asm__ ("" : "=g"(dst->c.b[1].a) INP_CLOBBER_LIST);
66
}
67
 
68
#else
69
 
70
int main ()
71
{
72
  return 0;
73
}
74
 
75
#endif
76
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.