OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [weak/] [weak-5.c] - Blame information for rev 645

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-require-weak "" } */
3
/* { dg-require-alias "" } */
4
/* { dg-options "-fno-common" } */
5
 
6
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1a" } } */
7
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1b" } } */
8
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1c" } } */
9
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1d" } } */
10
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1e" } } */
11
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1f" } } */
12
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1g" } } */
13
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1h" } } */
14
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1i" } } */
15
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1j" } } */
16
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1k" } } */
17
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1l" } } */
18
 
19
/* test variable addresses with __attribute__ ((weak)) */
20
 
21
extern int vfoo1a __attribute__((weak));
22
extern int vfoo1a;
23
void * foo1a (void)
24
{
25
  return (void *)&vfoo1a;
26
}
27
 
28
 
29
extern int vfoo1b;
30
extern int vfoo1b __attribute__((weak));
31
void * foo1b (void)
32
{
33
  return (void *)&vfoo1b;
34
}
35
 
36
 
37
extern int vfoo1c;
38
void * foo1c (void)
39
{
40
  return (void *)&vfoo1c;
41
}
42
extern int vfoo1c __attribute__((weak)); /* { dg-warning "unspecified behavior" } */
43
 
44
 
45
extern int vfoo1d __attribute__((weak));
46
int vfoo1d;
47
void * foo1d (void)
48
{
49
  return (void *)&vfoo1d;
50
}
51
 
52
 
53
int vfoo1e;
54
extern int vfoo1e __attribute__((weak));
55
void * foo1e (void)
56
{
57
  return (void *)&vfoo1e;
58
}
59
 
60
 
61
int vfoo1f;
62
void * foo1f (void)
63
{
64
  return (void *)&vfoo1f;
65
}
66
extern int vfoo1f __attribute__((weak)); /* { dg-warning "unspecified behavior" } */
67
 
68
 
69
extern int vfoo1g;
70
void * foo1g (void)
71
{
72
  return (void *)&vfoo1g;
73
}
74
int vfoo1g __attribute__((weak)); /* { dg-warning "unspecified behavior" } */
75
 
76
 
77
extern int vfoo1h __attribute__((weak));
78
void * foo1h (void)
79
{
80
  return (void *)&vfoo1h;
81
}
82
extern int vfoo1h __attribute__((weak));
83
int vfoo1h;
84
 
85
 
86
extern int vfoo1i __attribute__((weak));
87
void * foo1i (void)
88
{
89
  return (void *)&vfoo1i;
90
}
91
extern int vfoo1i __attribute__((weak));
92
extern int vfoo1i;
93
 
94
 
95
extern int vfoo1j __attribute__((weak));
96
void * foo1j (void)
97
{
98
  return (void *)&vfoo1j;
99
}
100
extern int vfoo1j;
101
extern int vfoo1j __attribute__((weak));
102
 
103
 
104
extern int vfoo1k __attribute__((weak));
105
int vfoo1k = 1;
106
 
107
 
108
int vfoox1l = 1;
109
extern int vfoo1l __attribute__((weak, alias ("vfoox1l")));

powered by: WebSVN 2.1.0

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