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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [gdb/] [testsuite/] [gdb.base/] [constvars.c] - Blame information for rev 178

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

Line No. Rev Author Line
1 24 jeremybenn
void marker1 (void)
2
{
3
}
4
 
5
/* misc. function params */
6
 
7
int
8
qux1 (const char cc, const char /*&*/ccr, const char *ccp, char *const cpc)
9
{
10
  return 33;
11
}
12
 
13
int
14
qux2 (volatile unsigned char vuc, const volatile int cvi,
15
      volatile short /*&*/vsr, volatile long *vlp, float *volatile fpv,
16
      const volatile signed char *const volatile cvscpcv)
17
{
18
  return 400;
19
}
20
 
21
int
22
main (void)
23
{
24
  char lave = 'B';
25
  unsigned char lavish = 10;
26
  short lax = 20;
27
  unsigned short lecherous = 30;
28
  long lechery = 40;
29
  unsigned long lectern = 50;
30
  float leeway = 60;
31
  double legacy = 70;
32
  signed char lemonade = 35;
33
 
34
  const char            laconic = 'A';
35
  const unsigned char   laggard = 1;
36
  const short           lagoon = 2;
37
  const unsigned short  laity = 3;
38
  const long            lambent = 4;
39
  const unsigned long   laminated = 5;
40
  const float           lampoon = 6;
41
  const double          languid = 7;
42
 
43
  /* pointers to constant variables */
44
 
45
  const char           *legend      = &lave;
46
  const unsigned char  *legerdemain = &lavish;
47
  const short          *leniency    = &lax;
48
  const unsigned short *leonine     = &lecherous;
49
  const long           *lesion      = &lechery;
50
  const unsigned long  *lethal      = &lectern;
51
  const float          *lethargic   = &leeway;
52
  const double         *levity      = &legacy;
53
 
54
  /* constant pointers to constant variables */
55
 
56
  const char           *const lewd          = &laconic;
57
  const unsigned char  *const lexicographer = &laggard;
58
  const short          *const lexicon       = &lagoon;
59
  const unsigned short *const liaison       = &laity;
60
  const long           *const libation      = &lambent;
61
  const unsigned long  *const libelous      = &laminated;
62
  const float          *const libertine     = &lampoon;
63
  const double         *const libidinous    = &languid;
64
 
65
  /* this is the same as const char * legend .... */
66
 
67
  char           const *languish   = &laconic;
68
  unsigned char  const *languor    = &laggard;
69
  short          const *lank       = &lagoon;
70
  unsigned short const *lapidary   = &laity;
71
  long           const *larceny    = &lambent;
72
  unsigned long  const *largess    = &laminated;
73
  float          const *lascivious = &lampoon;
74
  double         const *lassitude  = &languid;
75
 
76
  /* constant pointers to variable */
77
 
78
  char           *const   lamprey   = &lave;
79
  unsigned char  *const   lariat    = &lavish;
80
  short          *const   laudanum  = &lax;
81
  unsigned short *const   lecithin  = &lecherous;
82
  long           *const   leviathan = &lechery;
83
  unsigned long  *const   libretto  = &lectern;
84
  float          *const   lissome   = &leeway;
85
  double         *const   locust    = &legacy;
86
 
87
  /* volatile variables */
88
 
89
  volatile char vox = 'X';
90
  volatile unsigned char victuals = 13;
91
  volatile short vixen = 200;
92
  volatile unsigned short vitriol = 300;
93
  volatile long vellum = 1000;
94
  volatile unsigned long valve = 2000;
95
  volatile float vacuity = 3.0;
96
  volatile double vertigo = 10.3;
97
 
98
  /* pointers to volatile variables */
99
 
100
  volatile char           * vampire = &vox;
101
  volatile unsigned char  * viper  = &victuals;
102
  volatile short          * vigour = &vixen;
103
  volatile unsigned short * vapour = &vitriol;
104
  volatile long           * ventricle = &vellum;
105
  volatile unsigned long  * vigintillion = &valve;
106
  volatile float          * vocation = &vacuity;
107
  volatile double         * veracity = &vertigo;
108
 
109
  /* volatile pointers to volatile variables */
110
 
111
  volatile char           * volatile vapidity = &vox;
112
  volatile unsigned char  * volatile velocity = &victuals;
113
  volatile short          * volatile veneer = &vixen;
114
  volatile unsigned short * volatile video = &vitriol;
115
  volatile long           * volatile vacuum = &vellum;
116
  volatile unsigned long  * volatile veniality = &valve;
117
  volatile float          * volatile vitality = &vacuity;
118
  volatile double         * volatile voracity = &vertigo;
119
 
120
  /* const volatile vars */
121
 
122
  const volatile char           victor = 'Y';
123
  const volatile unsigned char  vicar = 11;
124
 
125
  /* pointers to const volatiles */
126
 
127
  const volatile char              * victory = &victor;
128
  const volatile unsigned char     * vicarage = &vicar;
129
 
130
  /* const pointers to volatile vars */
131
 
132
  volatile char                    * const vein = &vox;
133
  volatile unsigned char           * const vogue = &victuals;
134
 
135
  /* const pointers to const volatile vars */
136
 
137
  const volatile char              * const cavern = &victor;
138
  const volatile unsigned char     * const coverlet = &vicar;
139
 
140
  /* volatile pointers to const vars */
141
 
142
  const char                       * volatile caveat = &laconic;
143
  const unsigned char              * volatile covenant = &laggard;
144
 
145
  /* volatile pointers to const volatile vars */
146
 
147
  const volatile char              * volatile vizier = &victor;
148
  const volatile unsigned char     * volatile vanadium = &vicar;
149
 
150
  /* const volatile pointers */
151
 
152
  char                             * const volatile vane = &lave;
153
  unsigned char                    * const volatile veldt = &lavish;
154
 
155
  /* const volatile pointers to const vars */
156
 
157
  const char                       * const volatile cove = &laconic;
158
  const unsigned char              * const volatile cavity = &laggard;
159
 
160
  /* const volatile pointers to volatile vars */
161
 
162
  volatile char                    * const volatile vagus = &vox;
163
  volatile unsigned char           * const volatile vagrancy = &victuals;
164
 
165
  /* const volatile pointers to const volatile */
166
 
167
  const volatile char              * const volatile vagary = &victor;
168
  const volatile unsigned char     * const volatile vendor = &vicar;
169
 
170
  /* various structs with const members */
171
 
172
  struct crass { char * const ptr; } crass = { lamprey };
173
  struct crisp { char * const *ptr; } crisp = { &lamprey };
174
 
175
  /* misc. references */
176
  /*
177
  const char           & radiation = laconic;
178
  volatile signed char & remuneration = lemonade;
179
  */
180
#ifdef usestubs
181
  set_debug_traps ();
182
  breakpoint ();
183
#endif
184
  marker1 ();
185
 
186
 
187
  return 0;
188
}

powered by: WebSVN 2.1.0

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