This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/40415] New: gcc 4.4.0 error at postreload.c:396
- From: "nospamname at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jun 2009 13:35:09 -0000
- Subject: [Bug c/40415] New: gcc 4.4.0 error at postreload.c:396
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
its find out, the problematic optimization that crash seem "-funswitch-loops".
A compile
of ffmpeg with -O2 + all other optimization options from -O3 work, (see second
output)
See also the Mail i write before
http://gcc.gnu.org/ml/gcc/2009-06/msg00229.html
$ make_68k_v4
/usr/local/amiga/bin/m68k-amigaos-gcc-4.4.0.exe -V 4.4.0
-DHAVE_AV_CONFIG_H -I..
-I"/bin/ffmpeg8" --save-temps -mnobitfield -m68060 -std=c99
-Wdeclaration-afte
r-statement -Wdisabled-optimization -fno-math-errno -D_ISOC99_SOURCE
-D_POSIX_C_
SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-common
-fomit-fram
e-pointer -Wall -Wno-switch -Wpointer-arith -Wredundant-decls
-Wcast-qual -Wwrit
e-strings -Wundef -O3 -c -o mpegvideo.o mpegvideo.c
mpegvideo.c: In function 'init_rl':
mpegvideo.c:760: warning: pointer targets in assignment differ in
signedness
mpegvideo.c:765: warning: pointer targets in assignment differ in
signedness
mpegvideo.c: In function 'MPV_motion_lowres':
mpegvideo.c:1707: error: insn does not satisfy its constraints:
(insn 937 3765 3766 59 mpegvideo.c:1488 (set (reg:SI 0 d0 [931])
(plus:SI (mem/f:SI (reg:SI 9 a1) [7 S4 A16])
(reg:SI 0 d0 [931]))) 131 {*addsi3_internal} (nil))
mpegvideo.c:1707: internal compiler error: in
reload_cse_simplify_operands, at p
ostreload.c:396
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
------------------------------------------------------------------------
Compiles fine with -O2 + all optimalizations from -O3 except
"-funswitch-loops":
$ make_68k_v4
/usr/local/amiga/bin/m68k-amigaos-gcc-4.4.0.exe -V 4.4.0
-DHAVE_AV_CONFIG_H -I..
-I"/bin/ffmpeg8" --save-temps -mnobitfield -m68060 -std=c99
-Wdeclaration-afte
r-statement -Wdisabled-optimization -fno-math-errno -D_ISOC99_SOURCE
-D_POSIX_C_
SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-common
-fomit-fram
e-pointer -Wall -Wno-switch -Wpointer-arith -Wredundant-decls
-Wcast-qual -Wwrit
e-strings -Wundef -O2 -finline-functions -fgcse-after-reload
-fpredictive-common
ing -ftree-vectorize -c -o mpegvideo.o mpegvideo.c
mpegvideo.c: In function 'init_rl':
mpegvideo.c:760: warning: pointer targets in assignment differ in
signedness
mpegvideo.c:765: warning: pointer targets in assignment differ in
signedness
In file included from mpegvideo.c:34:
mpegvideo_common.h: In function 'MPV_motion':
mpegvideo_common.h:674: warning: dereferencing pointer '({anonymous})'
does brea
k strict-aliasing rules
mpegvideo_common.h:674: note: initialized from here
mpegvideo_common.h:675: warning: dereferencing pointer '({anonymous})'
does brea
k strict-aliasing rules
mpegvideo_common.h:675: note: initialized from here
mpegvideo_common.h:677: warning: dereferencing pointer '({anonymous})'
does brea
k strict-aliasing rules
mpegvideo_common.h:677: note: initialized from here
mpegvideo_common.h:678: warning: dereferencing pointer '({anonymous})'
does brea
k strict-aliasing rules
mpegvideo_common.h:678: note: initialized from here
here is snippet of .i file.full file have size 2476 kb.please let me know if
you need more info or send me fixes, i can compile new gcc
# 1594 "mpegvideo.c"
static inline void MPV_motion_lowres(MpegEncContext *s,
uint8_t *dest_y, uint8_t *dest_cb, uint8_t
*dest_cr,
int dir, uint8_t **ref_picture,
h264_chroma_mc_func *pix_op)
{
int mx, my;
int mb_x, mb_y, i;
const int lowres= s->avctx->lowres;
const int block_s= 8>>lowres;
mb_x = s->mb_x;
mb_y = s->mb_y;
switch(s->mv_type) {
case 0:
mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
0, 0, 0,
ref_picture, pix_op,
s->mv[dir][0][0], s->mv[dir][0][1], 2*block_s);
break;
case 1:
mx = 0;
my = 0;
for(i=0;i<4;i++) {
hpel_motion_lowres(s, dest_y + ((i & 1) + (i >> 1) *
s->linesize)*block_s,
ref_picture[0], 0, 0,
(2*mb_x + (i & 1))*block_s, (2*mb_y + (i
>>1))*block_s,
s->width, s->height, s->linesize,
s->h_edge_pos >> lowres, s->v_edge_pos >> lowres,
block_s, block_s, pix_op,
s->mv[dir][i][0], s->mv[dir][i][1]);
mx += s->mv[dir][i][0];
my += s->mv[dir][i][1];
}
if(!0 || !(s->flags&0x2000))
chroma_4mv_motion_lowres(s, dest_cb, dest_cr, ref_picture, pix_op,
mx, my);
break;
case 3:
if (s->picture_structure == 3) {
mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
1, 0, s->field_select[dir][0],
ref_picture, pix_op,
s->mv[dir][0][0], s->mv[dir][0][1], block_s);
mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
1, 1, s->field_select[dir][1],
ref_picture, pix_op,
s->mv[dir][1][0], s->mv[dir][1][1], block_s);
} else {
if(s->picture_structure != s->field_select[dir][0] + 1 &&
s->pict_type != 3 && !s->first_field){
ref_picture= s->current_picture_ptr->data;
}
mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
0, 0, s->field_select[dir][0],
ref_picture, pix_op,
s->mv[dir][0][0], s->mv[dir][0][1], 2*block_s);
}
break;
case 2:
for(i=0; i<2; i++){
uint8_t ** ref2picture;
if(s->picture_structure == s->field_select[dir][i] + 1 ||
s->pict_type == 3 || s->first_field){
ref2picture= ref_picture;
}else{
ref2picture= s->current_picture_ptr->data;
}
mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
0, 0, s->field_select[dir][i],
ref2picture, pix_op,
s->mv[dir][i][0], s->mv[dir][i][1] + 2*block_s*i,
block_s);
dest_y += 2*block_s*s->linesize;
dest_cb+= (2*block_s>>s->chroma_y_shift)*s->uvlinesize;
dest_cr+= (2*block_s>>s->chroma_y_shift)*s->uvlinesize;
}
break;
case 4:
if(s->picture_structure == 3){
for(i=0; i<2; i++){
int j;
for(j=0; j<2; j++){
mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
1, j, j^i,
ref_picture, pix_op,
s->mv[dir][2*i + j][0], s->mv[dir][2*i + j][1],
block_s);
}
pix_op = s->dsp.avg_h264_chroma_pixels_tab;
}
}else{
for(i=0; i<2; i++){
mpeg_motion_lowres(s, dest_y, dest_cb, dest_cr,
0, 0, s->picture_structure != i+1,
ref_picture, pix_op,
s->mv[dir][2*i][0],s->mv[dir][2*i][1],2*block_s);
pix_op = s->dsp.avg_h264_chroma_pixels_tab;
if(!s->first_field){
ref_picture = s->current_picture_ptr->data;
}
}
}
break;
default: ((void) 0);
}
}
static inline void put_dct(MpegEncContext *s,
DCTELEM *block, int i, uint8_t *dest, int line_size,
int qscale)
{
s->dct_unquantize_intra(s, block, i, qscale);
s->dsp.idct_put (dest, line_size, block);
}
static inline void add_dct(MpegEncContext *s,
DCTELEM *block, int i, uint8_t *dest, int line_size)
{
if (s->block_last_index[i] >= 0) {
s->dsp.idct_add (dest, line_size, block);
}
}
static inline void add_dequant_dct(MpegEncContext *s,
DCTELEM *block, int i, uint8_t *dest, int line_size,
int qscale)
{
if (s->block_last_index[i] >= 0) {
s->dct_unquantize_inter(s, block, i, qscale);
s->dsp.idct_add (dest, line_size, block);
}
}
void ff_clean_intra_table_entries(MpegEncContext *s)
{
int wrap = s->b8_stride;
int xy = s->block_index[0];
s->dc_val[0][xy ] =
s->dc_val[0][xy + 1 ] =
s->dc_val[0][xy + wrap] =
s->dc_val[0][xy + 1 + wrap] = 1024;
memset(s->ac_val[0][xy ], 0, 32 * sizeof(int16_t));
memset(s->ac_val[0][xy + wrap], 0, 32 * sizeof(int16_t));
if (s->msmpeg4_version>=3) {
s->coded_block[xy ] =
s->coded_block[xy + 1 ] =
s->coded_block[xy + wrap] =
s->coded_block[xy + 1 + wrap] = 0;
}
wrap = s->mb_stride;
xy = s->mb_x + s->mb_y * wrap;
s->dc_val[1][xy] =
s->dc_val[2][xy] = 1024;
memset(s->ac_val[1][xy], 0, 16 * sizeof(int16_t));
memset(s->ac_val[2][xy], 0, 16 * sizeof(int16_t));
s->mbintra_table[xy]= 0;
}
# 1779 "mpegvideo.c"
static __attribute__((always_inline)) inline
void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
int lowres_flag, int is_mpeg12)
{
const int mb_xy = s->mb_y * s->mb_stride + s->mb_x;
if(0 && s->avctx->xvmc_acceleration){
ff_xvmc_decode_mb(s);
return;
}
if(s->avctx->debug&0x00000040) {
int i,j;
DCTELEM *dct = &s->current_picture.dct_coeff[mb_xy*64*6];
for(i=0; i<6; i++)
for(j=0; j<64; j++)
*dct++ = block[i][s->dsp.idct_permutation[j]];
}
s->current_picture.qscale_table[mb_xy]= s->qscale;
if (!s->mb_intra) {
if (!is_mpeg12 && (s->h263_pred || s->h263_aic)) {
if(s->mbintra_table[mb_xy])
ff_clean_intra_table_entries(s);
} else {
s->last_dc[0] =
s->last_dc[1] =
s->last_dc[2] = 128 << s->intra_dc_precision;
}
}
else if (!is_mpeg12 && (s->h263_pred || s->h263_aic))
s->mbintra_table[mb_xy]=1;
if ((s->flags&0x8000) || !(s->encoding && (s->intra_only ||
s->pict_type==3) && s->avctx->mb_decision != 2)) {
uint8_t *dest_y, *dest_cb, *dest_cr;
int dct_linesize, dct_offset;
op_pixels_func (*op_pix)[4];
qpel_mc_func (*op_qpix)[16];
const int linesize= s->current_picture.linesize[0];
const int uvlinesize= s->current_picture.linesize[1];
const int readable= s->pict_type != 3 || s->encoding ||
s->avctx->draw_horiz_band || lowres_flag;
const int block_size= lowres_flag ? 8>>s->avctx->lowres : 8;
if(!s->encoding){
uint8_t *mbskip_ptr = &s->mbskip_table[mb_xy];
const int age= s->current_picture.age;
((void) 0);
if (s->mb_skipped) {
s->mb_skipped= 0;
((void) 0);
(*mbskip_ptr) ++;
if(*mbskip_ptr >99) *mbskip_ptr= 99;
if (*mbskip_ptr >= age && s->current_picture.reference){
return;
}
} else if(!s->current_picture.reference){
(*mbskip_ptr) ++;
if(*mbskip_ptr >99) *mbskip_ptr= 99;
} else{
*mbskip_ptr = 0;
}
}
dct_linesize = linesize << s->interlaced_dct;
dct_offset =(s->interlaced_dct)? linesize : linesize*block_size;
if(readable){
dest_y= s->dest[0];
dest_cb= s->dest[1];
dest_cr= s->dest[2];
}else{
dest_y = s->b_scratchpad;
dest_cb= s->b_scratchpad+16*linesize;
dest_cr= s->b_scratchpad+32*linesize;
}
if (!s->mb_intra) {
if(!s->encoding){
if(lowres_flag){
h264_chroma_mc_func *op_pix =
s->dsp.put_h264_chroma_pixels_tab;
if (s->mv_dir & 1) {
MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 0,
s->last_picture.data, op_pix);
op_pix = s->dsp.avg_h264_chroma_pixels_tab;
}
if (s->mv_dir & 2) {
MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 1,
s->next_picture.data, op_pix);
}
}else{
op_qpix= s->me.qpel_put;
if ((!s->no_rounding) || s->pict_type==3){
op_pix = s->dsp.put_pixels_tab;
}else{
op_pix = s->dsp.put_no_rnd_pixels_tab;
}
if (s->mv_dir & 1) {
MPV_motion(s, dest_y, dest_cb, dest_cr, 0,
s->last_picture.data, op_pix, op_qpix);
op_pix = s->dsp.avg_pixels_tab;
op_qpix= s->me.qpel_avg;
}
if (s->mv_dir & 2) {
MPV_motion(s, dest_y, dest_cb, dest_cr, 1,
s->next_picture.data, op_pix, op_qpix);
}
}
}
if(s->hurry_up>1) goto skip_idct;
if(s->avctx->skip_idct){
if( (s->avctx->skip_idct >= AVDISCARD_NONREF && s->pict_type ==
3)
||(s->avctx->skip_idct >= AVDISCARD_NONKEY && s->pict_type
!= 1)
|| s->avctx->skip_idct >= AVDISCARD_ALL)
goto skip_idct;
}
if(s->encoding || !( s->h263_msmpeg4 ||
s->codec_id==CODEC_ID_MPEG1VIDEO || s->codec_id==CODEC_ID_MPEG2VIDEO
|| (s->codec_id==CODEC_ID_MPEG4 &&
!s->mpeg_quant))){
add_dequant_dct(s, block[0], 0, dest_y , dct_linesize,
s->qscale);
add_dequant_dct(s, block[1], 1, dest_y + block_size,
dct_linesize, s->qscale);
add_dequant_dct(s, block[2], 2, dest_y + dct_offset ,
dct_linesize, s->qscale);
add_dequant_dct(s, block[3], 3, dest_y + dct_offset +
block_size, dct_linesize, s->qscale);
if(!0 || !(s->flags&0x2000)){
if (s->chroma_y_shift){
add_dequant_dct(s, block[4], 4, dest_cb, uvlinesize,
s->chroma_qscale);
add_dequant_dct(s, block[5], 5, dest_cr, uvlinesize,
s->chroma_qscale);
}else{
dct_linesize >>= 1;
dct_offset >>=1;
add_dequant_dct(s, block[4], 4, dest_cb, dct_linesize,
s->chroma_qscale);
add_dequant_dct(s, block[5], 5, dest_cr, dct_linesize,
s->chroma_qscale);
add_dequant_dct(s, block[6], 6, dest_cb + dct_offset,
dct_linesize, s->chroma_qscale);
add_dequant_dct(s, block[7], 7, dest_cr + dct_offset,
dct_linesize, s->chroma_qscale);
}
}
} else if(is_mpeg12 || (s->codec_id != CODEC_ID_WMV2)){
add_dct(s, block[0], 0, dest_y , dct_linesize);
add_dct(s, block[1], 1, dest_y + block_size, dct_linesize);
add_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize);
add_dct(s, block[3], 3, dest_y + dct_offset + block_size,
dct_linesize);
if(!0 || !(s->flags&0x2000)){
if(s->chroma_y_shift){
add_dct(s, block[4], 4, dest_cb, uvlinesize);
add_dct(s, block[5], 5, dest_cr, uvlinesize);
}else{
dct_linesize = uvlinesize << s->interlaced_dct;
dct_offset =(s->interlaced_dct)? uvlinesize :
uvlinesize*8;
add_dct(s, block[4], 4, dest_cb, dct_linesize);
add_dct(s, block[5], 5, dest_cr, dct_linesize);
add_dct(s, block[6], 6, dest_cb+dct_offset,
dct_linesize);
add_dct(s, block[7], 7, dest_cr+dct_offset,
dct_linesize);
if(!s->chroma_x_shift){
add_dct(s, block[8], 8, dest_cb+8, dct_linesize);
add_dct(s, block[9], 9, dest_cr+8, dct_linesize);
add_dct(s, block[10], 10, dest_cb+8+dct_offset,
dct_linesize);
add_dct(s, block[11], 11, dest_cr+8+dct_offset,
dct_linesize);
}
}
}
}
else if ((1 || 1)) {
ff_wmv2_add_mb(s, block, dest_y, dest_cb, dest_cr);
}
} else {
if(s->encoding || !(s->codec_id==CODEC_ID_MPEG1VIDEO ||
s->codec_id==CODEC_ID_MPEG2VIDEO)){
put_dct(s, block[0], 0, dest_y , dct_linesize, s->qscale);
put_dct(s, block[1], 1, dest_y + block_size, dct_linesize,
s->qscale);
put_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize,
s->qscale);
put_dct(s, block[3], 3, dest_y + dct_offset + block_size,
dct_linesize, s->qscale);
if(!0 || !(s->flags&0x2000)){
if(s->chroma_y_shift){
put_dct(s, block[4], 4, dest_cb, uvlinesize,
s->chroma_qscale);
put_dct(s, block[5], 5, dest_cr, uvlinesize,
s->chroma_qscale);
}else{
dct_offset >>=1;
dct_linesize >>=1;
put_dct(s, block[4], 4, dest_cb, dct_linesize,
s->chroma_qscale);
put_dct(s, block[5], 5, dest_cr, dct_linesize,
s->chroma_qscale);
put_dct(s, block[6], 6, dest_cb + dct_offset,
dct_linesize, s->chroma_qscale);
put_dct(s, block[7], 7, dest_cr + dct_offset,
dct_linesize, s->chroma_qscale);
}
}
}else{
s->dsp.idct_put(dest_y , dct_linesize, block[0]);
s->dsp.idct_put(dest_y + block_size, dct_linesize, block[1]);
s->dsp.idct_put(dest_y + dct_offset , dct_linesize, block[2]);
s->dsp.idct_put(dest_y + dct_offset + block_size, dct_linesize,
block[3]);
if(!0 || !(s->flags&0x2000)){
if(s->chroma_y_shift){
s->dsp.idct_put(dest_cb, uvlinesize, block[4]);
s->dsp.idct_put(dest_cr, uvlinesize, block[5]);
}else{
dct_linesize = uvlinesize << s->interlaced_dct;
dct_offset =(s->interlaced_dct)? uvlinesize :
uvlinesize*8;
s->dsp.idct_put(dest_cb, dct_linesize, block[4]);
s->dsp.idct_put(dest_cr, dct_linesize, block[5]);
s->dsp.idct_put(dest_cb + dct_offset, dct_linesize,
block[6]);
s->dsp.idct_put(dest_cr + dct_offset, dct_linesize,
block[7]);
if(!s->chroma_x_shift){
s->dsp.idct_put(dest_cb + 8, dct_linesize,
block[8]);
s->dsp.idct_put(dest_cr + 8, dct_linesize,
block[9]);
s->dsp.idct_put(dest_cb + 8 + dct_offset,
dct_linesize, block[10]);
s->dsp.idct_put(dest_cr + 8 + dct_offset,
dct_linesize, block[11]);
}
}
}
}
}
skip_idct:
if(!readable){
s->dsp.put_pixels_tab[0][0](s->dest[0], dest_y , linesize,16);
s->dsp.put_pixels_tab[s->chroma_x_shift][0](s->dest[1], dest_cb,
uvlinesize,16 >> s->chroma_y_shift);
s->dsp.put_pixels_tab[s->chroma_x_shift][0](s->dest[2], dest_cr,
uvlinesize,16 >> s->chroma_y_shift);
}
}
}
--
Summary: gcc 4.4.0 error at postreload.c:396
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nospamname at web dot de
GCC build triplet: cygwin-i686
GCC host triplet: cygwin-i686
GCC target triplet: m68k-amigaos
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40415