This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
New testcase [v3.0.4 ICE on alpha]
- From: Roger Sayle <roger at eyesopen dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 8 Mar 2002 00:01:56 -0700 (MST)
- Subject: New testcase [v3.0.4 ICE on alpha]
The relatively simple testcase below causes an ICE in gcc-3.0.4 on
alphaev67-dec-osf5.1 using the flags "-O -ffast-math" with the error
message:
20020308-1.c: In function `barf':
20020308-1.c:10: Unrecognizable insn:
(insn 42 41 43 (set (reg:DF 73)
(ge:DF (reg/v:DF 69)
(const_double:DF (cc0) 0 [0x0] 0 [0x0] 0 [0x0]))) -1 (insn_list 4 (nil))
(expr_list:REG_DEAD (reg/v:DF 69)
(nil)))
20020308-1.c:10: Internal compiler error in extract_insn, at recog.c:2218
Fortunately, I can no longer reproduce this on either mainline or the
3.1 branch. However, other than a vague memory of recent postings on
gcc-patches mentioning invalid comparision modes, I can't be sure the
problem has really been fixed, rather than just hidden by other changes.
Given that the "-ffast-math" is necessary and this particular bug isn't
tested for by any of seven "-ffast-math" tests in the testsuite I thought
it best to submit this testcase, just in case the problem ever reappears.
Ok for mainline? 3.1 branch?
2002-03-08 Roger Sayle <roger@eyesopen.com>
* gcc.dg/20020308-1.c: New test case.
*** /dev/null Mon Dec 31 21:00:00 1979
--- 20020308-1.c Thu Mar 7 20:37:29 2002
***************
*** 0 ****
--- 1,10 ----
+ /* This testcase ICEd on alpha because of an unrecognized insn formed
+ by conditional move optimization using an incorrect mode. */
+ /* { dg-do compile } */
+ /* { dg-options "-O -ffast-math" } */
+
+ char*
+ barf (double x)
+ {
+ return (x<0.0) ? "foo" : "bar";
+ }
Roger
--
Roger Sayle, E-mail: roger@eyesopen.com
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833