This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[C] gcc bails in complex, solaris 2.7



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

ccos.i.gz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]