summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/wchar_t-1.c
blob: 7e90cc08f5ea5361d42a8f639fd284eb5c5916ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-options "-finput-charset=utf-8" } */
typedef __WCHAR_TYPE__ wchar_t;
wchar_t x[] = L"Ä";
wchar_t y = L'Ä';
extern void abort (void);
extern void exit (int);

int main (void)
{
  if (sizeof (x) / sizeof (wchar_t) != 2)
    abort ();
  if (x[0] != L'Ä' || x[1] != L'\0')
    abort ();
  if (y != L'Ä')
    abort ();
  exit (0);
}