This is the mail archive of the
mailing list for the GCC project.
Re: [Patch] Fix PR44328 - switch/case optimization produces an invalid lookup table index
On Mon, Aug 16, 2010 at 7:35 AM, Ian Bolton <Ian.Bolton@arm.com> wrote:
> H.J.Lu writes:
>> I am open to suggestions as to where it should go, and what
>> > options to give it.
>> > For trunk, I need "-fstrict-enums -O2 -Wextra" to cause the
>> > circumstances that exposed the bug, and check that there are
>> > no warnings. ?For 4.5 branch, -fstrict-enums does not exist,
>> > so I guess I only want "-O2 -Wextra".
>> Only add -fstrict-enums to test in trunk.
> Thanks for your help. ?As the test is a C++ one, I have added it
> to testsuite/g++.dg, and updated the patch accordingly.
> Note that this is intended for 4.5 branch, as I have not
> supplied -fstrict-enums in the test.
> Best regards,
> 2010-08-16 ?Ian Bolton ?<email@example.com>
> ? ? ? ?* tree-switch-conversion.c (gen_inbound_check): Ensure that the
> ? ? ? ?type for the conditional has wide enough range.
> ? ? ? ?* testsuite/g++.dg/pr44328.C: New test.
You should submit the patch for trunk first and backport to 4.5 branch
after it was checked into trunk.