summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-wchar_t-1.c
blob: ae55105b94ae453f873f36ad923c771ae214ce5d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
wchar_t-1.c from the execute part of the gcc torture tests.
*/

#include <testfwk.h>

#include <wchar.h>

/* { dg-options "-finput-charset=utf-8" } */

wchar_t x[] = L"Ä";
wchar_t y = L'Ä';

void
testTortureExecute (void)
{
  if (sizeof (x) / sizeof (wchar_t) != 2)
    ASSERT (0);
  if (x[0] != L'Ä' || x[1] != L'\0')
    ASSERT (0);
  if (y != L'Ä')
    ASSERT (0);
  return;
}