egcs-2.92.21 19981109 : ICE 'Could not split insn' on i686-pc-linux-gnu
Laurent Bonnaud
bonnaud@irisa.fr
Thu Nov 12 09:17:00 GMT 1998
Hi,
the following program does not compile with the latest snapshot :
$ g++ -march=pentiumpro -O2 -c bm.cc
bm.cc: In function `void Tab_copie_prolonge<unsigned char>(class Tab<unsigned char> &, const class Tab<unsigned char> &)':
bm.cc:55: instantiated from here
bm.cc:49: Could not split insn
(insn 169 204 84 (set (reg/v:SI 3 %ebx)
(if_then_else:SI (le:SI (reg:SI 1 %edx)
(mem/s:SI (plus:SI (reg:SI 0 %eax)
(const_int 24)) 0))
(reg/v:SI 4 %esi)
(mem/s:SI (plus:SI (mem:SI (plus:SI (reg:SI 6 %ebp)
(const_int 12)) 0)
(const_int 24)) 0))) 357 {movsicc+2} (insn_list 204 (insn_list 201 (nil)))
(expr_list:REG_DEAD (reg:SI 1 %edx)
(expr_list:REG_DEAD (reg:SI 0 %eax)
(nil))))
/home/lima/d02/temics/bonnaud/poubelle2/egcs-19981109/gcc/toplev.c:1390: Internal compiler error in function fatal_insn
$ g++ -v
Reading specs from /udd/bonnaud/poubelle2/linux-egcs2/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.92.21/specs
gcc version egcs-2.92.21 19981109 (gcc2 ss-980609 experimental)
--
Laurent.
// compile with g++ -march=pentiumpro -O2 -c bm.cc
template <class Type>
class Tab
{
public:
int debut_i;
int debut_j;
int fin_i;
int fin_j;
int debut_im_i;
int debut_im_j;
int fin_im_i;
int fin_im_j;
Type** vp;
Type& operator()(int i, int j)
{
return vp[i][j];
}
const Type& operator()(int i, int j) const
{
return vp[i][j];
}
const Type& prolonge_ext(int i, int j) const
{
if(i<debut_im_i)
i=debut_im_i;
else if(i>fin_im_i)
i=fin_im_i;
if(j<debut_im_j)
j=debut_im_j;
else if(j>fin_im_j)
j=fin_im_j;
return vp[i][j];
}
};
template<class Type>
void Tab_copie_prolonge(Tab<unsigned char>& tab_dest, const Tab<Type>& tab_source)
{
for(int i=tab_dest.debut_i;i<=tab_dest.fin_i;i++)
for(int j=tab_dest.debut_j;j<=tab_dest.fin_j;j++)
tab_dest(i,j)=tab_source.prolonge_ext(i,j);
}
void crash()
{
Tab<unsigned char> image1, image1p;
Tab_copie_prolonge(image1p,image1);
}
More information about the Gcc-bugs
mailing list