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 c/14338] New: internal compiler error dp-bits.c line 412 (thumb)


Internal compiler error in the soft-float library when building the THUMB
version (Multilib)

------
GCC was configured with: (From gcc/config.status)

# ./configure  --host=i686-pc-linux-gnu --target=arm-elf
--prefix=/proj/ua/duane/install --exec-prefix=/proj/ua/duane/install/i686
--with-gcc-version-trigger=/proj/ua/duane/gcc-3.3.3/gcc/version.c --with-newlib
--with-local-prefix=/proj/ua/duane/install/i686/sys-root --without-headers
--enable-threads=no --enable-symvers=gnu --enable-__cxa_atexit
--enable-languages=c --disable-nls --disable-shared --cache-file=../config.cache

------

It dies during a the multi-lib build with this message:

./xgcc -B./ -B/proj/ua/duane/install/i686/arm-elf/bin/ -isystem
/proj/ua/duane/install/i686/arm-elf/include -isystem
/proj/ua/duane/install/i686/arm-elf/sys-include -O2  -DIN_GCC -DCROSS_COMPILE  
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem
./include  -Dinhibit_libc -fno-inline -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-Dinhibit_libc -I. -I. -I. -I./. -I./config -I./../include
-DFINE_GRAINED_LIBRARIES -mthumb -DL_pack_df -c dp-bit.c -o libgcc/thumb/_pack_df.o
dp-bit.c: In function `__pack_d':
dp-bit.c:411: error: insn does not satisfy its constraints:
(insn:HI 333 331 561 0x401b5ec8 (set (reg:HI 3 r3 [109])
        (mem:HI (label_ref 584) [0 S2 A16])) 169 {*thumb_movhi_insn}
(insn_list:REG_DEP_ANTI 330 (insn_list:REG_DEP_OUTPUT 329 (nil)))
    (expr_list:REG_EQUIV (const_int 2047 [0x7ff])
        (nil)))
dp-bit.c:411: internal compiler error: in extract_constrain_insn_cached, at
recog.c:2090
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [libgcc/thumb/_pack_df.o] Error 1
make[1]: Leaving directory `/proj/ua/duane/gcc-3.3.3/gcc'
make: *** [stmp-multilib] Error 2

--------

I reduced the orginal 'gcc/dp-bits.c' to a *MUCH* smaller file, see below:

typedef float DFtype __attribute__ ((mode (DF)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
typedef UDItype fractype;

typedef DFtype FLO_type;

typedef struct
{
  int normal_exp;
} fp_number_type;

typedef union
{
  FLO_type value;

  struct
    {
      fractype fraction:52 __attribute__ ((packed));
      unsigned int exp:11 __attribute__ ((packed));
    }
  bits;
}
FLO_union_type;

extern FLO_type __pack_d ( fp_number_type * );

FLO_type
__pack_d ( fp_number_type * src)
{
  FLO_union_type dst;

  dst.bits.exp = src->normal_exp + 1023;

  return dst.value;
}

-----------------

Compiling it with this greatly reduced cc1 command line: 

 /proj/ua/duane/gcc-3.3.3/gcc/cc1 -mthumb  -g -O2 -o /tmp/ccpl5DQK.s foo2.i

Will reproduce the bug.

------------------

If you remove the -O2 option it works.

Thanks.

-- 
           Summary: internal compiler error dp-bits.c line 412 (thumb)
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: duane_ellis at franklin dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-elf


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


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