OSDN Git Service

* builtin-types.def (BT_WINT, BT_FN_INT_WINT, BT_FN_WINT_WINT): New.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / torture / builtin-wctype-1.c
1 /* Copyright (C) 2004  Free Software Foundation.
2
3    Verify that built-in wctype function attributes are correctly set
4    by the compiler.
5
6    Written by Kaveh Ghazi, 2004-03-25.  */
7
8 /* { dg-do link } */
9
10
11 void test(int i)
12 {
13   /* All of these ctype functions should be const/pure and thus
14      eliminated.  */
15 #define TEST_CTYPE(FN) \
16   extern int FN(int); \
17   extern void link_failure_##FN(void); \
18   if (FN(i) != FN(i)) \
19     link_failure_##FN()
20   
21 #ifdef __OPTIMIZE__
22   TEST_CTYPE(iswalnum);
23   TEST_CTYPE(iswalpha);
24   TEST_CTYPE(iswblank);
25   TEST_CTYPE(iswcntrl);
26   TEST_CTYPE(iswdigit);
27   TEST_CTYPE(iswgraph);
28   TEST_CTYPE(iswlower);
29   TEST_CTYPE(iswprint);
30   TEST_CTYPE(iswpunct);
31   TEST_CTYPE(iswspace);
32   TEST_CTYPE(iswupper);
33   TEST_CTYPE(iswxdigit);
34   TEST_CTYPE(towlower);
35   TEST_CTYPE(towupper);
36 #endif /* __OPTIMIZE__ */
37 }
38
39 int main (void)
40 {
41   return 0;
42 }