| 1 |
// { dg-do assemble } |
| 2 |
// From: [email protected] (Jean-Francois Panisset) |
| 3 |
// Subject: 2.6.0 pre-rel, internal error, regression, mips-sgi-irix4 |
| 4 |
// Date: Thu, 14 Jul 94 23:34:21 EDT |
| 5 |
|
| 6 |
class Char |
| 7 |
{ |
| 8 |
protected: |
| 9 |
char rep; |
| 10 |
public: |
| 11 |
Char (const char ) {} |
| 12 |
operator char() const; |
| 13 |
void operator -= (const Char ); |
| 14 |
}; |
| 15 |
|
| 16 |
inline Char operator - (const Char a, const Char b) { return Char(0); } |
| 17 |
inline char operator == (const Char a, const char b) { return 0; } |
| 18 |
|
| 19 |
char mystrcmp(Char s[31], Char t[31]) |
| 20 |
{ |
| 21 |
for (; *s == *t; ++s, ++t) if (*s == '\0') return 0; // { dg-error "reversed" "" { target c++20 } } |
| 22 |
return char(*s - *t); |
| 23 |
} |