www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000166

When Created: 07/11/1997 08:48:28
Against DJGPP version: 2.01
By whom: pavenis@acad.latnet.lv
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
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;
  }

Note added: 11/18/1997 13:58:00
By whom: demmer@lstm.ruhr-uni-bochum.de
The reason seems to be the long double argument.
Changing it to double makes the bug go away. (Better:
hide).

Note added: 11/26/1997 03:14:38
By whom: pavenis@acad.latnet.lv
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 2.7.2.1 - 2.7.2.3

Closed on 04/12/1999 11:00:45: A genuine GCC bug.
By whom: eliz@is.elta.co.il



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