Bug 000166

When Created: 07/11/1997 08:48:28
Against DJGPP version: 2.01
By whom:
Abstract: DJGPP generates "internal error--unrecognizable insn" on a simle source with -O2
DJGPP fails to compile the following source with optimizations -O2
and higher (all is OK with less optimization). Compiler aborts with

GNU C++ version (80386, BSD syntax) compiled by GNU C version In method `int foo::fooFunct(long double &)': 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)

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

//------------------------  cut here -----------------------
class  foo
      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;

Note added: 11/18/1997 13:58:00
By whom:
The reason seems to be the long double argument.
Changing it to double makes the bug go away. (Better:

Note added: 11/26/1997 03:14:38
By whom:
Yes I have found another workaround for this problem with keeping 
long double (As I remember I added explicit cast from double to long double).

Anyway each error of such type (internal error) should be considered 
as a bug. Maybe better place for this error report would be 
bug reports for gcc as the same error is generated under Linux by 
gcc versions -

Closed on 04/12/1999 11:00:45: A genuine GCC bug.
By whom:

  webmaster     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010