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]
Other format: [Raw text]

[Bug optimization/12612] [3.4 Regression] ICE when using log function with -O3 -ffast-math


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12612


reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |critical
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |monitored
   Last reconfirmed|0000-00-00 00:00:00         |2003-10-17 16:37:30
               date|                            |
            Summary|[3.4 Regression] ICE when   |[3.4 Regression] ICE when
                   |compiling with -O3 -ffast-  |using log function with -O3
                   |math                        |-ffast-math


------- Additional Comments From reichelt at gcc dot gnu dot org  2003-10-17 16:37 -------
Here's a short testcase that crashes cc1 and cc1plus when compiled with
"-O3 -ffast-math":

=============================
double log (double);

void foo (double* x)
{
    int i;
    for (i=0; i<1; ++i)
        x[0]=log(2.0);
}
=============================

The error message is:

PR12612.c: In function `foo':

PR12612.c:8: error: unrecognizable insn:
(insn:HI 66 57 33 0 (parallel [
            (set (reg:DF 60)
                (unspec:DF [
                        (reg:DF 64)
                        (reg:XF 63)
                    ] 66))
            (clobber (reg:XF 70))
        ]) -1 (insn_list 56 (insn_list 57 (nil)))
    (expr_list:REG_DEAD (reg:XF 63)
        (expr_list:REG_DEAD (reg:DF 64)
            (expr_list:REG_UNUSED (reg:XF 70)
                (nil)))))
PR12612.c:8: internal compiler error: in extract_insn, at recog.c:2064

If I replace the log function by sin, cos, exp, the code compiles.

According to Phil's regression hunter, the regression was introduced
between 2003-10-10-trunk (#422) and 2003-10-12-trunk (#423).


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