optimization/10764: ICE when using log(), -fast-math and optimization

phil_e@wanadoo.fr phil_e@wanadoo.fr
Tue May 13 05:29:00 GMT 2003

>Number:         10764
>Category:       optimization
>Synopsis:       ICE when using log(), -fast-math and optimization
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Tue May 13 03:56:00 UTC 2003
>Originator:     phil_e@wanadoo.fr
>Release:        gcc version 3.4 20030513 (experimental)
GNU/linux x86
double log(double);

double ndtri(double y0)
  double x;

  x = log(y0);
  x = log(x);

  return x;

$ gcc -O1 -ffast-math gcc-3.4-error.c
gcc-3.4-error.c: In function `ndtri':
gcc-3.4-error.c:11: internal compiler error: in subst_stack_regs_pat, at reg-stack.c:1764

  regno = get_hard_regnum (&temp_stack, *src2);
  if (regno < 0)
    abort ();


replace prototype
double log(double);
#include <math.h>
or remove -O1 or remove --fast-math

More information about the Gcc-bugs mailing list