This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Tighten GIMPLE_SWITCH verification


On Mon, May 7, 2012 at 1:34 PM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Mon, May 7, 2012 at 1:28 PM, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
>> Hello,
>>
>> When I moved the first bits of the switch lowering code from stmt.c, I
>> didn't anticipate that the GIMPLE passes can sometimes perform
>> transformations that break the rules the gimplifier uses while
>> lowering SWITCH_EXPRs.
>>
>> The attached patch adds the expected rules to the GIMPLE_SWITCH verifier.
>>
>> Bootstrap&test running on powerpc64-unknown-linux-gnu. OK if it passes?
>
> Ok!

Thanks. I've committed a slightly weaker version that allows the type
of case label values to be different from the index type, as long as
all case labels have the same type and the type precision of the index
type is not less than the case label value type. I allowed that
earlier in the gimplifier to avoid fold_converting case label values
to larger types and then back to smaller types.

Bootstrapped&tested on powerpc64-unknown-linux-gnu, committed as r187242.

Ciao!
Steven


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]