This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/14257] New: ICE for dp-bit.c source file of gnu 3.3.3 gcc compiler
- From: "lodewijk_smit at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Feb 2004 11:23:26 -0000
- Subject: [Bug c/14257] New: ICE for dp-bit.c source file of gnu 3.3.3 gcc compiler
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
While compiling a ARM crosscompiler, I got an internal compiler error while
compiling gcc-3.3.3/gcc/dp-bit.c of gcc version 3.3.3. Additional info:
Machine running: SUSE linux on Intel Pentium 4
uname -a
Linux systemname 2.4.20-4GB #1 Sat Feb 7 02:07:16 UTC 2004 i686 unknown unknown
GNU/Linux
Gcc version:
Reading specs from /home/aid/smitl/linux/lib/gcc-lib/i686-pc-linux-
gnu/3.3.2/specs
Configured with: ./configure --prefix=/home/aid/smitl/linux --enable-
languages=c,c++
Thread model: posix
gcc version 3.3.2
Command given:
/home/aid/smitl/linux/arm/gcc-3.3.3/gcc/xgcc -B/home/aid/smitl/linux/arm/gcc-
3.3.3/gcc/ -B/home/aid/smitl/linux/arm/arm-elf/bin/ -
B/home/aid/smitl/linux/arm/arm-elf/lib/ -isystem /home/aid/smitl/linux/arm/arm-
elf/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-v -save-temps
gcc 3.3.2 compiler output:
dp-bit.c: In function `__pack_d':
dp-bit.c:411: error: insn does not satisfy its constraints:
(insn:HI 333 331 561 0x401a7ec8 (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.
--- START of dp-bit.i ---
# 1 "dp-bit.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "dp-bit.c"
# 50 "dp-bit.c"
# 1 "tconfig.h" 1
struct rtx_def;
typedef struct rtx_def *rtx;
struct rtvec_def;
typedef struct rtvec_def *rtvec;
union tree_node;
typedef union tree_node *tree;
# 1 "../include/ansidecl.h" 1
# 16 "tconfig.h" 2
# 1 "config/dbxelf.h" 1
# 17 "tconfig.h" 2
# 1 "config/elfos.h" 1
# 18 "tconfig.h" 2
# 1 "config/arm/unknown-elf.h" 1
# 19 "tconfig.h" 2
# 1 "config/arm/elf.h" 1
# 20 "tconfig.h" 2
# 1 "config/arm/aout.h" 1
# 21 "tconfig.h" 2
# 1 "config/arm/arm.h" 1
# 102 "config/arm/arm.h"
typedef enum arm_cond_code
{
ARM_EQ = 0, ARM_NE, ARM_CS, ARM_CC, ARM_MI, ARM_PL, ARM_VS, ARM_VC,
ARM_HI, ARM_LS, ARM_GE, ARM_LT, ARM_GT, ARM_LE, ARM_AL, ARM_NV
}
arm_cc;
extern arm_cc arm_current_cc;
extern int arm_target_label;
extern int arm_ccfsm_state;
extern rtx arm_target_insn;
extern int target_flags;
extern const char * target_fp_name;
extern rtx arm_compare_op0;
extern rtx arm_compare_op1;
extern rtx pool_vector_label;
extern int return_used_this_function;
extern rtx aof_pic_label;
# 504 "config/arm/arm.h"
struct arm_cpu_select
{
const char * string;
const char * name;
const struct processors * processors;
};
extern struct arm_cpu_select arm_select[];
enum prog_mode_type
{
prog_mode26,
prog_mode32
};
extern enum prog_mode_type arm_prgmode;
enum floating_point_type
{
FP_HARD,
FP_SOFT2,
FP_SOFT3
};
extern enum floating_point_type arm_fpu;
extern enum floating_point_type arm_fpu_arch;
# 553 "config/arm/arm.h"
extern int arm_fast_multiply;
extern int arm_arch4;
extern int arm_arch5;
extern int arm_arch5e;
extern int arm_ld_sched;
extern int thumb_code;
extern int arm_is_strong;
extern int arm_is_xscale;
extern int arm_is_6_or_7;
# 720 "config/arm/arm.h"
extern int arm_structure_size_boundary;
# 731 "config/arm/arm.h"
extern const char * structure_size_string;
# 1021 "config/arm/arm.h"
enum reg_class
{
NO_REGS,
FPU_REGS,
LO_REGS,
STACK_REG,
BASE_REGS,
HI_REGS,
CC_REG,
GENERAL_REGS,
ALL_REGS,
LIM_REG_CLASSES
};
# 1431 "config/arm/arm.h"
typedef struct machine_function
{
rtx eh_epilogue_sp_ofs;
int far_jump_used;
int arg_pointer_live;
int lr_save_eliminated;
int frame_size;
unsigned long func_type;
int uses_anonymous_args;
}
machine_function;
typedef struct
{
int nregs;
int call_cookie;
} CUMULATIVE_ARGS;
# 2420 "config/arm/arm.h"
extern int arm_pic_register;
extern const char * arm_pic_register_string;
# 2444 "config/arm/arm.h"
extern int making_const_table;
# 2786 "config/arm/arm.h"
enum arm_builtins
{
ARM_BUILTIN_CLZ,
ARM_BUILTIN_MAX
};
# 22 "tconfig.h" 2
# 1 "defaults.h" 1
# 23 "tconfig.h" 2
# 51 "dp-bit.c" 2
# 1 "config/fp-bit.h" 1
# 94 "config/fp-bit.h"
typedef float SFtype __attribute__ ((mode (SF)));
typedef float DFtype __attribute__ ((mode (DF)));
typedef int HItype __attribute__ ((mode (HI)));
typedef int SItype __attribute__ ((mode (SI)));
typedef int DItype __attribute__ ((mode (DI)));
# 112 "config/fp-bit.h"
typedef unsigned int UHItype __attribute__ ((mode (HI)));
typedef unsigned int USItype __attribute__ ((mode (SI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
# 215 "config/fp-bit.h"
typedef UDItype fractype;
typedef USItype halffractype;
typedef DFtype FLO_type;
typedef DItype intfrac;
# 343 "config/fp-bit.h"
typedef enum
{
CLASS_SNAN,
CLASS_QNAN,
CLASS_ZERO,
CLASS_NUMBER,
CLASS_INFINITY
} fp_class_type;
typedef struct
{
fp_class_type class;
unsigned int sign;
int normal_exp;
union
{
fractype ll;
halffractype l[2];
} fraction;
} fp_number_type;
typedef union
{
FLO_type value;
fractype value_raw;
halffractype words[2];
struct
{
fractype fraction:52 __attribute__ ((packed));
unsigned int exp:11 __attribute__ ((packed));
unsigned int sign:1 __attribute__ ((packed));
}
bits;
# 411 "config/fp-bit.h"
}
FLO_union_type;
extern FLO_type __pack_d (fp_number_type *);
extern void __unpack_d (FLO_union_type *, fp_number_type *);
# 435 "config/fp-bit.h"
extern int __fpcmp_parts_d (fp_number_type *, fp_number_type *);
# 511 "config/fp-bit.h"
extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
# 52 "dp-bit.c" 2
# 144 "dp-bit.c"
extern const fp_number_type __thenan_df;
__inline__
static fp_number_type *
nan (void)
{
return (fp_number_type *) (& __thenan_df);
}
__inline__
static int
isnan ( fp_number_type * x)
{
return x->class == CLASS_SNAN || x->class == CLASS_QNAN;
}
__inline__
static int
isinf ( fp_number_type * x)
{
return x->class == CLASS_INFINITY;
}
__inline__
static int
iszero ( fp_number_type * x)
{
return x->class == CLASS_ZERO;
}
__inline__
static void
flip_sign ( fp_number_type * x)
{
x->sign = !x->sign;
}
extern FLO_type __pack_d ( fp_number_type * );
FLO_type
__pack_d ( fp_number_type * src)
{
FLO_union_type dst;
fractype fraction = src->fraction.ll;
int sign = src->sign;
int exp = 0;
if (0 && (isnan (src) || isinf (src)))
{
exp = (0x7ff);
fraction = ((fractype) 1 << 52) - 1;
}
else if (isnan (src))
{
exp = (0x7ff);
if (src->class == CLASS_QNAN || 1)
{
fraction |= 0x8000000000000LL;
}
}
else if (isinf (src))
{
exp = (0x7ff);
fraction = 0;
}
else if (iszero (src))
{
exp = 0;
fraction = 0;
}
else if (fraction == 0)
{
exp = 0;
}
else
{
if (src->normal_exp < (-(1023)+1))
{
# 247 "dp-bit.c"
int shift = (-(1023)+1) - src->normal_exp;
exp = 0;
if (shift > 64 - 8L)
{
fraction = 0;
}
else
{
int lowbit = (fraction & (((fractype)1 << shift) - 1)) ? 1 : 0;
fraction = (fraction >> shift) | lowbit;
}
if ((fraction & 0xff) == 0x80)
{
if ((fraction & (1 << 8L)))
fraction += 0x7f + 1;
}
else
{
fraction += 0x7f;
}
if (fraction >= ((fractype)1<<(52 +8L)))
{
exp += 1;
}
fraction >>= 8L;
}
else if (!0
&& src->normal_exp > 1023)
{
exp = (0x7ff);
fraction = 0;
}
else
{
exp = src->normal_exp + 1023;
if (!0)
{
if ((fraction & 0xff) == 0x80)
{
if (fraction & (1 << 8L))
fraction += 0x7f + 1;
}
else
{
fraction += 0x7f;
}
if (fraction >= ((fractype)1<<(52 +1+8L)))
{
fraction >>= 1;
exp += 1;
}
}
fraction >>= 8L;
if (0 && exp > (0x7ff))
{
exp = (0x7ff);
fraction = ((fractype) 1 << 52) - 1;
}
}
}
dst.bits.fraction = fraction;
dst.bits.exp = exp;
dst.bits.sign = sign;
# 402 "dp-bit.c"
{
halffractype tmp = dst.words[0];
dst.words[0] = dst.words[1];
dst.words[1] = tmp;
}
return dst.value;
}
# 1501 "dp-bit.c"
extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype);
--- END of dp-bit.i ---
Hopefully I provided all necessary information to make life easy for you.
With kind regards,
Lodewijk Smit
--
Summary: ICE for dp-bit.c source file of gnu 3.3.3 gcc compiler
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: critical
Priority: P1
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lodewijk_smit at yahoo dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14257