------- Additional Comments From belyshev at depni dot sinp dot msu dot ru
2005-04-15 19:57 -------
// reduced testcase, compile with -O2 -mthumb
extern void foo (void);
struct bitset
{
int a[4];
void set(int pos, bool val = true)
{
if (val)
a[pos/32] = 1;
}
bitset& flip()
{
return *this;
}
bitset operator~()
{
return bitset(*this).flip();
}
bool operator != (const bitset& x)
{
for (int i = 0; i < 4; ++i)
if (a[i] != x.a[i])
return false;
return true;
}
bool test(int position)
{
if (position >= 64)
foo ();
return a[position / 32] != 0;
}
};
int main( int argc, char *argv[] )
{
unsigned int i, j;
bitset b1, b2;
b2 = ~b1;
if (b2 != ~b1);
for (i = j = 0; i < 65; i++)
{
b2.set (j);
if (i != b1.test(j))
foo ();
j++;
}
b2 = ~b2;
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC build triplet|i686-pc-linux-gnu |
GCC host triplet|i686-pc-linux-gnu |
Keywords| |ice-on-valid-code
Known to fail| |3.4.4
Last reconfirmed|0000-00-00 00:00:00 |2005-04-15 19:57:02
date| |
Summary|[ARM thumb] ICE with C++ |ICE in
|bitsets in thumb mode |reload_cse_simplify_operands
| |, at postreload.c:391
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20810