[C] gcc bails in complex, solaris 2.7

bkoz@purist.soma.redhat.com bkoz@purist.soma.redhat.com
Fri Jun 23 10:46:00 GMT 2000


This code is currently working on alpha, powerpc, and x86. Sparc seems
screwed.

from libstdc++-v3 and current CVS on solaris 2.7:

../../../../../src.gcc_binutils/libstdc++-v3/math/ccos.c: In function
`ccos':
../../../../../src.gcc_binutils/libstdc++-v3/math/ccos.c:68: Insn does not
satisfy its constraints:
(insn 293 213 284 (set (reg:DF 10 %o2)
        (reg:DF 38 %f6)) 94 {*movdf_insn_sp64_novis} (nil)
    (nil))
../../../../../src.gcc_binutils/libstdc++-v3/math/ccos.c:68: Internal
compiler error in `reload_cse_simplify_operands', at reload1.c:8160
Please submit a full bug report.

this is the code in question:

#include <math.h>
#include "mathconf.h"

__complex__ double
ccos (__complex__ double x)
{
  __complex__ double res;

  if (!FINITE_P (__real__ x) || __imag__ x != __imag__ x)
    {
      if (__real__ x == 0.0 || __imag__ x == 0.0)
        {
          __real__ res = NAN;
          __imag__ res = 0.0;
        }
      else if (INFINITE_P (__imag__ x))
        {
          __real__ res = HUGE_VAL;
          __imag__ res = NAN;
        }
      else
        {
          __real__ res = NAN;
          __imag__ res = NAN;
        }
    }
  else
    {
      __complex__ double y;

      __real__ y = -__imag__ x;
      __imag__ y = __real__ x;

      res = ccosh (y);
    }

  return res;
}


The pre-processed file is also attached.

-benjamin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ccos.i.gz
Type: application/x-gzip
Size: 3889 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000623/efac05a4/attachment.bin>


More information about the Gcc-bugs mailing list