Bug 12070 - [3.3/3.4 Regression] ICE converting between double and long double with -msoft-float
Summary: [3.3/3.4 Regression] ICE converting between double and long double with -msof...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.3.1
: P1 critical
Target Milestone: 3.3.2
Assignee: Jan Hubicka
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2003-08-26 16:41 UTC by David Taylor
Modified: 2004-01-17 04:22 UTC (History)
2 users (show)

See Also:
Host:
Target: i686-pc-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-09-05 05:31:16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Taylor 2003-08-26 16:41:13 UTC
The following simple function (extracted from libstdc++-v3/libmath/stubs.c)
will get an internal compiler error.

extern double atan2(double, double);

long double
atan2l(long double x, long double y)
{
  return atan2((double) x, (double) y);
}

The ICE occurs with x86 native on GNU/Linux with GCC 3.3.1 when invoked with
-msoft-float.  It does not ICE with GCC 2.95.3.  I haven't yet tried the HEAD
of the CVS trunk.
Comment 1 Wolfgang Bangerth 2003-08-26 17:34:13 UTC
Confirmed. A regression on the 3.3 branch and mainline. 
 
W. 
Comment 2 Andrew Pinski 2003-08-26 17:46:25 UTC
From Phil's regression hunter: Search converges between 2001-06-10-trunk (#23) and 2001-06-
17-trunk (#24). Note this was hard to use Phil's regression hunter because it does not fail for -
arch=i386.
Comment 3 janis187 2003-08-28 23:24:57 UTC
The regression in PR 12070 was introduced or exposed by this patch:

--- gcc/gcc/ChangeLog ---

Thu Jun 14 12:44:15 CEST 2001  Jan Hubicka  <jh@suse.cz>

        * i386.c (x86_accumulate_outgoing_args, x86_prologue_using_move,
        x86_epilogue_using_move): New global variables.
        (override_options): Enable ACCUMULATE_OUTGOING_ARGS if preferred.
        (ix86_emit_save_regs_using_mov): New static function.
        (ix86_expand_prologue, ix86_expand_epilogue): Use moves if preferred.
        * i386.h (MASK_MMX, MASK_SSE, MASK_SSE2, MASK_128BIT_LONG_DOUBLE,
        MASK_MIX_SSE_I387): Renumber.
        (MASK_NO_ACCUMULATE_OUTGOING_ARGS): New.
        (x86_accumulate_outgoing_args, x86_prologue_using_move,
        x86_epilogue_using_move): Declare.
        (TARGET_PROLOGUE_USING_MOVE, TARGET_EPILOGUE_USING_MOVE): New.

The regression hunt took place on i686-pc-linux-gnu using the submitter's      
test case compiled with -msoft-float with cc1. 
Comment 4 Mark Mitchell 2003-09-05 05:31:16 UTC
Assigned to Jan because his patch caused the ICE.
Comment 5 CVS Commits 2003-09-06 21:26:55 UTC
Subject: Bug 12070

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	hubicka@gcc.gnu.org	2003-09-06 21:26:52

Modified files:
	gcc            : ChangeLog calls.c cfgcleanup.c 

Log message:
	PR target/12070
	* calls.c (emit_library_call_value_1): Fix saving of BLKmode arguments.
	
	PR opt/12082
	* cfgcleanup.c (try_simplify_condjump): Avoid unreachable code warning.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.724&r2=1.16114.2.725
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/calls.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.244.2.10&r2=1.244.2.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cfgcleanup.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.68.2.5&r2=1.68.2.6

Comment 6 CVS Commits 2003-09-06 21:50:28 UTC
Subject: Bug 12070

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	hubicka@gcc.gnu.org	2003-09-06 21:50:22

Modified files:
	gcc            : ChangeLog calls.c cfgcleanup.c 

Log message:
	PR target/12070
	* calls.c (emit_library_call_value_1): Fix saving of BLKmode arguments.
	
	PR opt/12082
	* cfgcleanup.c (try_simplify_condjump): Avoid unreachable code warning.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.988&r2=2.989
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/calls.c.diff?cvsroot=gcc&r1=1.297&r2=1.298
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cfgcleanup.c.diff?cvsroot=gcc&r1=1.91&r2=1.92

Comment 7 Andrew Pinski 2003-09-07 03:21:48 UTC
Fixed by the patch above for 3.3.2 and 3.4.