2 // { dg-options "-O2 -g" }
3 // (Should preferrably cycle through options.)
4 // Origin: Hans-Peter Nilsson <hp@axis.com>
5 // See <URL:http://gcc.gnu.org/ml/gcc-patches/2000-06/msg00310.html>
7 typedef unsigned int udword;
9 void __assert (const char *, int, const char *);
17 inline Sh(const char* theName,
20 inline const char* name() const;
21 inline bool shXy(const Xy& theXy);
22 virtual void setParent(Sh* theParent);
28 Xy& operator = (const Xy&);
29 bool sh(const Xy& theXy);
38 Sh& operator = (const Sh&);
42 class ShZzy : public Sh
45 inline ShZzy(const char* theName);
46 inline ShZzy(const char* theName,
49 void addShTo(char* theParent);
51 void addSh(Sh* theSh);
52 virtual void setParent(Sh* theParent);
57 ShZzy& operator = (const ShZzy&);
63 inline ShBop(const ShBe* theBe);
68 const char* a4 = "foo");
74 inline int numberOfVs();
75 inline void closeBop();
78 ShBop& operator = (const ShBop&);
88 Sh::Sh(const char* theName,
100 Sh::shXy(const Xy& theXy)
102 return myXys.sh(theXy);
104 ShZzy::ShZzy(const char* theName)
108 ShZzy::ShZzy(const char* theName,
110 :Sh(theName, theXys),
113 ShBop::ShBop(const ShBe* theBe)
126 ((!my2 || myBop == shFailed) ? (void)0 : __assert("foo", 91,"foo"));
137 if (myBop == invalidBop)
143 template <class ShCc>
144 class ShAp : public ShZzy
147 ShAp(const char* theName);
148 ShAp(const char* theName,
151 typedef void (ShCc::*ShMethod)();
158 ShAp& operator = (const ShAp&);
162 class ShBe : public Sh
165 inline ShBe(const char* theName);
166 inline ShBe(const char* theName,
168 inline virtual ~ShBe();
169 virtual void run() = 0;
176 ShBe& operator = (const ShBe&);
179 template <class ShCc>
180 ShAp<ShCc>::ShAp(const char* theName)
185 template <class ShCc>
186 ShAp<ShCc>::ShAp(const char* theName,
187 const Sh::Xy& theXys)
188 : ShZzy(theName, theXys),
192 template <class ShCc>
196 ((myBop) ? (void)0 : __assert("foo", 96,"foo"));
199 class xSh : public ShAp<xSh>
213 xUff& operator = (const xUff&);
215 operator udword() const;
216 xUff& operator = (udword);
217 bool operator < (const xUff) const;
218 bool operator <= (const xUff) const;
219 bool operator > (const xUff) const;
220 bool operator >= (const xUff) const;
221 bool operator == (const xUff) const;
223 xUff(unsigned char* theUff);
233 xUff::xUff(udword theUff)
240 : myUff(theUff.myUff)
244 xUff::operator = (const xUff& theUff)
246 myUff = theUff.myUff;
250 xUff::operator = (udword theUff)
256 xUff::operator udword() const
261 xUff::operator < (const xUff ding) const
263 return (((int) (myUff - ding.myUff)) < 0);
266 xUff::operator <= (const xUff ding) const
268 return (((int) (myUff - ding.myUff)) <= 0);
271 xUff::operator > (const xUff ding) const
273 return (((int) (myUff - ding.myUff)) > 0);
276 xUff::operator >= (const xUff ding) const
278 return (((int) (myUff - ding.myUff)) >= 0);
281 xUff::operator == (const xUff ding) const
283 return (myUff == ding.myUff);
286 xUff::xUff(unsigned char* theUff)
288 myUff = *(udword *)theUff;
293 static const udword halfudword = 0x80000000;
294 xUff aGah((udword)0);
295 udword diagonal = halfudword + (udword) aGah;
296 xUff aGeh(diagonal - 1);
297 xUff aGoh(diagonal + 1);
298 (bop()->shWw ((aGah.operator <=(aGah)), ("foo"), ( ""), 118, "foo"));
299 (bop()->shWw ((aGah.operator >=(aGah)), ("foo"), ( ""), 119, "foo"));
300 (bop()->shWw ((!(aGah.operator <(aGah))), ("foo"), ( ""), 120, "foo"));
301 (bop()->shWw ((!(aGah.operator >(aGah))), ("foo"), ( ""), 121, "foo"));
302 (bop()->shWw ((aGah.operator <(aGeh)), ("foo"), ( ""), 124, "foo"));
303 (bop()->shWw ((aGah.operator <=(aGeh)), ("foo"), ( ""), 125, "foo"));
304 (bop()->shWw ((!(aGah.operator >(aGeh))), ("foo"), ( ""), 126, "foo"));
305 (bop()->shWw ((!(aGah.operator >=(aGeh))), ("foo"), ( ""), 127, "foo"));
306 (bop()->shWw ((aGeh.operator >(aGah)), ("foo"), ( ""), 130, "foo"));
307 (bop()->shWw ((aGeh.operator >=(aGah)), ("foo"), ( ""), 131, "foo"));
308 (bop()->shWw ((!(aGeh.operator <(aGah))), ("foo"), ( ""), 132, "foo"));
309 (bop()->shWw ((!(aGeh.operator <=(aGah))), ("foo"), ( ""), 133, "foo"));
310 (bop()->shWw ((aGeh.operator <(aGoh)), ("foo"), ( ""), 136, "foo"));
311 (bop()->shWw ((aGeh.operator <=(aGoh)), ("foo"), ( ""), 137, "foo"));
312 (bop()->shWw ((!(aGeh.operator >(aGoh))), ("foo"), ( ""), 138, "foo"));
313 (bop()->shWw ((!(aGeh.operator >=(aGoh))), ("foo"), ( ""), 139, "foo"));
314 (bop()->shWw ((aGoh.operator >(aGeh)), ("foo"), ( ""), 142, "foo"));
315 (bop()->shWw ((aGoh.operator >=(aGeh)), ("foo"), ( ""), 143, "foo"));
316 (bop()->shWw ((!(aGoh.operator <(aGeh))), ("foo"), ( ""), 144, "foo"));
317 (bop()->shWw ((!(aGoh.operator <=(aGeh))), ("foo"), ( ""), 145, "foo"));
318 (bop()->shWw ((aGah.operator >(aGoh)), ("foo"), ( ""), 152, "foo"));
319 (bop()->shWw ((aGah.operator >=(aGoh)), ("foo"), ( ""), 153, "foo"));
320 (bop()->shWw ((!(aGah.operator <(aGoh))), ("foo"), ( ""), 154, "foo"));
321 (bop()->shWw ((!(aGah.operator <=(aGoh))), ("foo"), ( ""), 155, "foo"));
322 (bop()->shWw ((aGoh.operator <(aGah)), ("foo"), ( ""), 158, "foo"));
323 (bop()->shWw ((aGoh.operator <=(aGah)), ("foo"), ( ""), 159, "foo"));
324 (bop()->shWw ((!(aGoh.operator >(aGah))), ("foo"), ( ""), 160, "foo"));
325 (bop()->shWw ((!(aGoh.operator >=(aGah))), ("foo"), ( ""), 161, "foo"));