c/2866: float-int conversion causes infinite recursion on the h8300 port

kazu@hxi.com kazu@hxi.com
Fri May 18 06:06:00 GMT 2001


>Number:         2866
>Category:       c
>Synopsis:       float-int  conversion causes infinite recursion on the h8300 port
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 18 06:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Kazu Hirata
>Release:        gcc-3.0 20010518 (prerelease)
>Organization:
>Environment:
RedHat Linux 7.1
>Description:
The following causes infinite recursion within libgcc.

float
foo ()
{
  return 1.23;
}

int
main ()
{
  return foo ();
}
>How-To-Repeat:
Simply compile and run it on the simulator.  Compile options do not matter unless -O3 is specified, in which case the functions in the example are inlined.
>Fix:
This fixes the problem, but I am not sure if this is the right way to go about it.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.602.2.14
diff -u -r1.602.2.14 Makefile.in
--- Makefile.in	2001/04/25 00:04:37	1.602.2.14
+++ Makefile.in	2001/05/01 12:17:10
@@ -795,8 +795,8 @@
 # Library members defined in libgcc2.c.
 LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
      _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _clz \
-    _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
-    _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
+    _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf \
+    _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi \
     _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
     _fixtfdi _fixunstfdi _floatditf \
     __gcc_bcmp _eprintf \
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-prs mailing list