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]

c/5707: i386 compiler can't build libgcc2.c with -msoft-float



>Number:         5707
>Category:       c
>Synopsis:       i386 compiler can't build libgcc2.c with -msoft-float
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 16 07:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Eric Norum <eric.norum@usask.ca>
>Release:        2002-02-14 snapshot
>Organization:
>Environment:
Redhat 7.2 linux
>Description:
Here's what I can cut the failing program down to (this is part of libgcc2.c).
=================================================================
typedef float DFtype __attribute__ ((mode (DF)));
typedef int DItype __attribute__ ((mode (DI)));
typedef int SItype __attribute__ ((mode (SI)));
typedef unsigned int USItype __attribute__ ((mode (SI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
DFtype
__floatdidf (DItype u)
{
  DFtype d;

  d = (SItype) (u >> (sizeof (SItype) * 8));
  d *= (((UDItype) 1) << ((sizeof (SItype) * 8) / 2));
  d *= (((UDItype) 1) << ((sizeof (SItype) * 8) / 2));
  d += (USItype) (u & ((((UDItype) 1) << (sizeof (SItype) * 8)) - 1));

  return d;
}
=================================================================

Compiler details:
../gcc/configure --enable-languages="c,c++"  --prefix=/tmp/cjnk

source@norum1 1633> /tmp/cjnk/bin/gcc --version
gcc (GCC) 3.1 20020214 (experimental)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
=================================================================


Here's what happens when it's compiled with optimization turned on:
source@norum1 1635> /tmp/cjnk/bin/gcc -c -O2 -msoft-float b.c
b.c: In function `__floatdidf':
b.c:17: unrecognizable insn:
(insn 13 12 16 (set (reg/v:DF 60)
        (float:DF (subreg:SI (reg:DI 61) 0))) -1 (insn_list 12 (nil))
    (expr_list:REG_DEAD (reg:DI 61)
        (nil)))
b.c:17: Internal compiler error in extract_insn, at recog.c:2129
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

=================================================================


And here's what happens when it's compiled with optimization turned off:
source@norum1 1636> /tmp/cjnk/bin/gcc -c -msoft-float b.c
b.c: In function `__floatdidf':
b.c:17: Internal compiler error in instantiate_virtual_regs_1, at function.c:3880
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
=================================================================
>How-To-Repeat:
Try to build libgcc2.c with -msoft-float
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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