This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50222] ICE with -O{1,2} -funswitch-loops -ftree-loop-distribution
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Aug 2011 08:39:42 +0000
- Subject: [Bug tree-optimization/50222] ICE with -O{1,2} -funswitch-loops -ftree-loop-distribution
- Auto-submitted: auto-generated
- References: <bug-50222-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50222
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-29 08:39:42 UTC ---
Reduced testcase (only ICEs 4.6.1 and trunk):
typedef struct AVProgram {
void *priv_data;
unsigned int nb_streams;
} AVFormatContext;
typedef struct {
unsigned short flags;
unsigned char stream_id;
} FrameCode;
typedef struct {
FrameCode frame_code[256];
} NUTContext;
void build_frame_code(AVFormatContext *s, int stream_id,
int is_audio, int pred_count)
{
NUTContext *nut = s->priv_data;
int keyframe_0_esc = s->nb_streams > 2;
int start2 = 1 + 253*stream_id / s->nb_streams;
int key_frame;
for(key_frame=0; key_frame<2; key_frame++)
{
FrameCode *ft;
if (is_audio && keyframe_0_esc && key_frame==0)
continue;
ft= &nut->frame_code[start2];
ft->flags|= 3;
ft->stream_id= stream_id;
}
}