DJGPP fails to compile the following source with optimizations -O2
and higher (all is OK with less optimization). Compiler aborts with
message:
GNU C++ version 2.7.2.1 (80386, BSD syntax) compiled by GNU C version 2.7.2.1.
foo.cc: In method `int foo::fooFunct(long double &)':
foo.cc:13: internal error--unrecognizable insn:
(insn:QI 49 46 94 (parallel[
(set (cc0)
(compare (float_extend:XF (reg:DF 8 %st(0)))
(reg:XF 10 %st(2))))
(clobber (reg:HI 0 %ax))
] ) -1 (insn_list 45 (nil))
(insn_list:REG_CC_USER 50 (expr_list:REG_DEAD (reg:DF 8 %st(0))
(expr_list:REG_UNUSED (reg:HI 0 %ax)
(nil)))))
Abort!
System P90, 24MB (Tested under Win95 and MS-DOS)
Andris Pavenis
PS. Looks that problem is 386+ specific because I was able to reproduce
it on LINUX in the same computer but not in AIX 4 on RS6000 which both
have GCC 2.7.2.1
//------------------------ cut here -----------------------
class foo
{
public:
double startArg, stopArg;
int fooFunct ( long double & arg );
};
int foo::fooFunct ( long double & t )
{
if (t<startArg-10.0) { t=startArg; return -1; }
else if (t>stopArg+1.1) { t=stopArg; return -1; }
else return 0;
}