This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR middle-end/18859
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 9 Mar 2006 18:29:39 -0500
- Subject: Re: [PATCH] Fix PR middle-end/18859
- References: <200603100028.06795.ebotcazou@adacore.com>
On Mar 9, 2006, at 6:28 PM, Eric Botcazou wrote:
Hi,
2006-03-09 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/18859
* stmt.c (expand_case): Discard empty ranges beforehand.
I wonder if this shouldn't be discarded in the gimplification or the
lowering
process instead of this late?
Also here is an example which fails at all optimizations levels:
int foo(int a)
{
switch (a)
{
case 0 ... -1: /* { dg-warning "empty range" } */
a = a+2;
break;
case 1 ... 2:
a = 0;
break;
case 3 ... 4:
a = 1;
break;
case 5 ... 6:
a = 0;
break;
}
return a;
}
Which might be want to put into torture instead of into gcc.dg.
-- Pinski