This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Implement switch statements with bit tests
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: roger at www dot eyesopen dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 24 Jan 2003 09:43:42 -0500 (EST)
- Subject: Re: [PATCH] Implement switch statements with bit tests
- References: <Pine.LNX.4.44.0301240656320.13344-100000@www.eyesopen.com>
> From: Roger Sayle <roger@www.eyesopen.com>
>
> I believe that we already have testsuite entries containg suitable
> switch statements that would have failed if I'd screwed things up.
>
> This is in addition to the 230+ switch statements that have to be
> implement correctly to complete a GCC bootstrap, and the 5100+
> corner cases that we need to determine must be implemented using
> another method, and ignore. :>
> Roger
True. However some targets are not meant for bootstrapping,
e.g. cross-only targets. If you build them with say gcc-2.95.x,
you'll never be alerted to the fact that switches specifically may be
broken in the resulting compiler (for just that config) by your patch
and it'll be a lot harder to track down.
Plus like I said, it'll help allay (prevent!) all the concerns raised
if you can say, "the testcase I wrote has your corner case and still
passes."
You're not still gun-shy because of 20020720-1.c are you? :-)
I'm *not* saying you need to verify the opt is performed on all
targets, just that correct code if produced.
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu