https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124052
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> (In reply to Andrew Pinski from comment #2)
> > TREE_CODE (type) != INTEGER_TYPE
> >
> > Could also break for enum types?
> > And _BitInt types?
>
> Yes, sure. I'd rather not enable things without at least one functional
> testcase. SCEV & friends are beasts.
enum testcase (C++):
```
enum a : unsigned {};
int f(a limit)
{
a i;
for(i = (a)0; i < limit; i = a(i + 1))
;
return i;
}
```
_BitInt testcase (C):
```
int f(_BitInt(64) limit)
{
_BitInt(64) i;
for(i = 0; i < limit; i++)
;
return i;
}
```
Both of these should just return figure out (via sccp) that the loop is empty
and can be removed.