* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
[official-gcc.git] / gcc / testsuite / gcc.dg / utf32-1.c
blobf9d24c4d0c3c7f3cff7d0cfff240e7e847aeb8c1
1 /* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
2 /* Test the support for char32_t character constants. */
3 /* { dg-do run } */
4 /* { dg-options "-std=gnu99 -Wall -Werror" } */
6 typedef __CHAR32_TYPE__ char32_t;
8 extern void abort (void);
10 char32_t c0 = U'a';
11 char32_t c1 = U'\0';
12 char32_t c2 = U'\u0024';
13 char32_t c3 = U'\u2029';
14 char32_t c4 = U'\U00064321';
16 #define A 0x00000061
17 #define D 0x00000024
18 #define X 0x00002029
19 #define Y 0x00064321
21 int main ()
23 if (sizeof (U'a') != sizeof (char32_t))
24 abort ();
25 if (sizeof (U'\0') != sizeof (char32_t))
26 abort ();
27 if (sizeof (U'\u0024') != sizeof (char32_t))
28 abort ();
29 if (sizeof (U'\u2029') != sizeof (char32_t))
30 abort ();
31 if (sizeof (U'\U00064321') != sizeof (char32_t))
32 abort ();
34 if (c0 != A)
35 abort ();
36 if (c1 != 0x0000)
37 abort ();
38 if (c2 != D)
39 abort ();
40 if (c3 != X)
41 abort ();
42 if (c4 != Y)
43 abort ();