repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
other
/
operator4.C
blob
e7a41c01a58c1647df4261ec9a1843cc3953e443
1
// PR c++/91819 - ICE with operator++ and enum.
2
// { dg-do compile }
3
4
enum Foo
5
{
6
a,
7
b
8
};
9
10
inline Foo operator++(Foo &f, int)
11
{
12
return f = (Foo)(f + 1);
13
}
14
15
int main()
16
{
17
int count = 0;
18
for (Foo f = a; f <= b; f++) {
19
count++;
20
}
21
return count;
22
}