public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/20810] New: [ARM thumb] ICE with C++ bitsets in thumb mode
@ 2005-04-07 13:55 jifl-bugzilla at jifvik dot org
2005-04-07 13:56 ` [Bug target/20810] " jifl-bugzilla at jifvik dot org
2005-04-15 19:57 ` [Bug target/20810] ICE in reload_cse_simplify_operands, at postreload.c:391 belyshev at depni dot sinp dot msu dot ru
0 siblings, 2 replies; 3+ messages in thread
From: jifl-bugzilla at jifvik dot org @ 2005-04-07 13:55 UTC (permalink / raw)
To: gcc-bugs
Compile the following testcase with arm-elf-gcc 3.4.3 as follows:
arm-elf-gcc -c -mcpu=arm7tdmi -O2 -mthumb bitset1.cxx
With bitset1.cxx containing:
#include <bitset>
extern void check(void);
// 64 works, 65 doesn't
//#define N 64
#define N 65
int main( int argc, char *argv[] )
{
typedef std::bitset<N> B;
unsigned int i, j;
B b1, b2;
b2 = ~b1;
if ( b2 != ~b1 )
;
b2.reset();
for ( i = j = 0; i < N; i++ ) {
b2.set( j );
if ( i != b1.test(j) )
check();
j++;
}
b2 = ~b2;
}
The result is:
bitset1.cxx: In function `int main(int, char**)':
bitset1.cxx:27: error: insn does not satisfy its constraints:
(insn:HI 472 471 473 5 (set (reg:SI 3 r3 [169])
(mem/s:SI (plus:SI (reg:SI 1 r1 [304])
(reg/f:SI 13 sp)) [7 <variable>._M_w S4 A32])) 126
{*thumb_movsi_insn} (nil)
(expr_list:REG_EQUIV (mem/s:SI (plus:SI (reg:SI 1 r1 [304])
(reg/f:SI 13 sp)) [7 <variable>._M_w S4 A32])
(nil)))
bitset1.cxx:27: internal compiler error: in reload_cse_simplify_operands, at
postreload.c:391
Please submit a full bug report,
with preprocessed source if appropriate.
The testcase is a pared down fragment of a much larger function so it doesn't
make much sense any more, but it still reproduces the ICE.
I will attach the .ii file separately.
--
Summary: [ARM thumb] ICE with C++ bitsets in thumb mode
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jifl-bugzilla at jifvik dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20810
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/20810] [ARM thumb] ICE with C++ bitsets in thumb mode
2005-04-07 13:55 [Bug target/20810] New: [ARM thumb] ICE with C++ bitsets in thumb mode jifl-bugzilla at jifvik dot org
@ 2005-04-07 13:56 ` jifl-bugzilla at jifvik dot org
2005-04-15 19:57 ` [Bug target/20810] ICE in reload_cse_simplify_operands, at postreload.c:391 belyshev at depni dot sinp dot msu dot ru
1 sibling, 0 replies; 3+ messages in thread
From: jifl-bugzilla at jifvik dot org @ 2005-04-07 13:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jifl-bugzilla at jifvik dot org 2005-04-07 13:56 -------
Created an attachment (id=8555)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8555&action=view)
Preprocessed testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20810
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug target/20810] ICE in reload_cse_simplify_operands, at postreload.c:391
2005-04-07 13:55 [Bug target/20810] New: [ARM thumb] ICE with C++ bitsets in thumb mode jifl-bugzilla at jifvik dot org
2005-04-07 13:56 ` [Bug target/20810] " jifl-bugzilla at jifvik dot org
@ 2005-04-15 19:57 ` belyshev at depni dot sinp dot msu dot ru
1 sibling, 0 replies; 3+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2005-04-15 19:57 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-15 19:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-07 13:55 [Bug target/20810] New: [ARM thumb] ICE with C++ bitsets in thumb mode jifl-bugzilla at jifvik dot org
2005-04-07 13:56 ` [Bug target/20810] " jifl-bugzilla at jifvik dot org
2005-04-15 19:57 ` [Bug target/20810] ICE in reload_cse_simplify_operands, at postreload.c:391 belyshev at depni dot sinp dot msu dot ru
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).