blob: e7a41c01a58c1647df4261ec9a1843cc3953e443 [file] [log] [blame]
// PR c++/91819 - ICE with operator++ and enum.
// { dg-do compile }
enum Foo
{
a,
b
};
inline Foo operator++(Foo &f, int)
{
return f = (Foo)(f + 1);
}
int main()
{
int count = 0;
for (Foo f = a; f <= b; f++) {
count++;
}
return count;
}