1 /* Copyright (C) 2007 Free Software Foundation
2    Contributed by Ollie Wild <aaw@google.com> */
3 
4 /* { dg-do preprocess } */
5 
6 /* Tests __COUNTER__ macro is correctly expanded.  */
7 
8 #define counter __COUNTER__
9 
10 #if __COUNTER__ != 0
11 #error __COUNTER__ != 0
12 #endif
13 
14 #if counter != 1
15 #error counter != 1
16 #endif
17 
18 #if __COUNTER__ != 2
19 #error __COUNTER__ != 2
20 #endif
21