[PATCH] Fix PR optimization/11210

Eric Botcazou ebotcazou@libertysurf.fr
Sun Jun 29 07:55:00 GMT 2003


> Since neither decode_field_reference nor get_inner_reference change the
> size of the operand, we don't have to check if the size is the same.

We have, for bitfields.

> This gives me the following patch.  It works for the s390 testcase, and
> for the original testcase.  I haven't tried any other testing.

This patch is not correct either (it was the first thing I tried and it 
caused a bootstrap failure on x86): it turns every comparison on unsigned 
bitfields into a signed comparison. Thus

struct s {
   unsigned c : 1;
   unsigned d : 1;
}

	if (s->c == 1 && s->d)

is always 0.

-- 
Eric Botcazou



More information about the Gcc-patches mailing list