[Bug optimization/12177] New: -new-ra with -ftracer, -fomit-frame-pointer, and -O2 ICE

peorth at artificial dot ath dot cx gcc-bugzilla@gcc.gnu.org
Fri Sep 5 07:34:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: -new-ra with -ftracer, -fomit-frame-pointer, and -O2 ICE
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: peorth at artificial dot ath dot cx
                CC: gcc-bugs at gcc dot gnu dot org

When combining these options on some code, it aborts with an ICE. If any of these are omitted, 
there's no ICE.

Currently this happens in ffmpeg-0.4.7_pre20030624/libabcodec/h263.c:1592: internal compiler 
error: in reloads_to_loads, at ra-rewrite.c:1068. The line in the source file is just a closing bracket, 
so it doesn't appear to shed much light on why (but I'm no expert in this stuff).

The code block in this case appears to be:
/* must be called before writing the header */
void ff_set_mpeg4_time(MpegEncContext * s, int picture_number){
    int time_div, time_mod;

    if(s->pict_type==I_TYPE){ //we will encode a vol header
        int dummy;
        av_reduce(&s->time_increment_resolution, &dummy, s->avctx->frame_rate, 
s->avctx->frame_rate_base, (1<<16)-1);

        s->time_increment_bits = av_log2(s->time_increment_resolution - 1) + 1;
    }

    if(s->current_picture.pts)
        s->time= (s->current_picture.pts*s->time_increment_resolution + 500*1000)/(1000*1000);
    else
        s->time= av_rescale(picture_number*(int64_t)s->avctx->frame_rate_base, 
s->time_increment_resolution, s->avctx->fram$
    time_div= s->time/s->time_increment_resolution;
    time_mod= s->time%s->time_increment_resolution;

    if(s->pict_type==B_TYPE){
        s->pb_time= s->pp_time - (s->last_non_b_time - s->time);
    }else{
        s->last_time_base= s->time_base;
        s->time_base= time_div;
        s->pp_time= s->time - s->last_non_b_time;
        s->last_non_b_time= s->time;
    }
}

The pre-processed source it said to attach appears the same from it, so I won't be redundant.



More information about the Gcc-bugs mailing list