https://bugzilla.novell.com/show_bug.cgi?id=299556#c1
--- Comment #1 from Richard Guenther 2007-08-22 06:57:10 MST ---
Reduced testcase:
typedef struct _IO_FILE FILE;
typedef unsigned long potrace_word;
struct potrace_bitmap_s {
int dy;
potrace_word *map;
};
typedef struct potrace_bitmap_s potrace_bitmap_t;
struct bmp_info_s {
unsigned int w;
unsigned int h;
unsigned int bits;
unsigned int comp;
};
typedef struct bmp_info_s bmp_info_t;
static int bm_readbody_bmp(FILE *f, double threshold, potrace_bitmap_t **bmp)
{
bmp_info_t bmpinfo;
unsigned int b;
unsigned int i;
potrace_bitmap_t *bm;
int mask;
unsigned int y;
int col1[2];
if (col1[0] < col1[1])
mask = 0xff;
else
mask = 0;
for (y=0; ymap + y*bm->dy) |= (potrace_word)b << i;
}
return -1;
}
int bm_read(FILE *f, double threshold, potrace_bitmap_t **bmp, int *magic)
{
if (magic[0] == 'B' && magic[1] == 'M')
return bm_readbody_bmp(f, threshold, bmp);
return 0;
}
fails with a powerpc64-suse-linux cross with -O on the head of the
gcc-4_2-branch. Mode is CCmode on
56 gcc_assert (SCALAR_INT_MODE_P (mode));
#1 0x00000000005c0bd3 in trunc_int_for_mode (c=255, mode=CCmode)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/explow.c:56
#2 0x00000000005ae2b0 in gen_int_mode (c=255, mode=CCmode)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/emit-rtl.c:404
#3 0x000000000079e4e7 in simplify_binary_operation_1 (code=AND, mode=DImode,
op0=0x2b2c79301190, op1=0x2b2c78e6cae0, trueop0=0x2b2c79301190,
trueop1=0x2b2c78e6cae0)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/simplify-rtx.c:2224
#4 0x000000000079b76d in simplify_binary_operation (code=AND, mode=DImode,
op0=0x2b2c79301190, op1=0x2b2c78e6cae0)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/simplify-rtx.c:1473
#5 0x0000000000797e7f in simplify_gen_binary (code=AND, mode=DImode,
op0=0x2b2c79301190, op1=0x2b2c78e6cae0)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/simplify-rtx.c:119
#6 0x00000000008bac56 in simplify_and_const_int (x=0x0, mode=DImode,
varop=0x2b2c79301190, constop=255)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/combine.c:8247
#7 0x00000000008bd00e in simplify_shift_const_1 (code=LSHIFTRT,
result_mode=DImode, varop=0x2b2c79301190, orig_count=56)
#8 0x00000000008bd0e4 in simplify_shift_const (x=0x0, code=LSHIFTRT,
result_mode=DImode, varop=0x2b2c79300d60, count=56)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/combine.c:9275
#9 0x00000000008b44f3 in expand_compound_operation (x=0x2b2c79301180)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/combine.c:5779
#10 0x00000000008b7267 in force_to_mode (x=0x2b2c79301180, mode=DImode,
mask=18446744073709551615, just_select=0)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/combine.c:6910
#11 0x00000000008b2969 in simplify_set (x=0x2b2c792fde20)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/combine.c:5186
#12 0x00000000008b127e in combine_simplify_rtx (x=0x2b2c792fde20,
op0_mode=VOIDmode, in_dest=0)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/combine.c:4800
#13 0x00000000008af5ad in subst (x=0x2b2c792fde20, from=0x2b2c792fc020,
to=0x2b2c79300b60, in_dest=0, unique_copy=0)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/combine.c:4131
#14 0x00000000008ae6b7 in subst (x=0x2b2c793010a0, from=0x2b2c792fc020,
to=0x2b2c79300b60, in_dest=0, unique_copy=0)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/combine.c:4008
#15 0x00000000008a9475 in try_combine (i3=0x2b2c792f99b0, i2=0x2b2c792f9960,
i1=0x2b2c792f9870, new_direct_jump_p=0x7fff31d5a7bc)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/combine.c:2386
#16 0x00000000008a50ef in combine_instructions (f=0x2b2c792d86c0, nregs=170)
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/combine.c:845
#17 0x00000000008c5138 in rest_of_handle_combine ()
at /space/rguenther/src/svn/gcc-4_2-branch/gcc/combine.c:12614
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.