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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [weak/] [weak-4.c] - Blame information for rev 154

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

powered by: WebSVN 2.1.0

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