libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr50723.c
blob24e490fc61824b220d8669cc93578fb46cc002af
1 /* { dg-do compile } */
3 typedef short unsigned int wchar_t;
4 typedef unsigned int size_t;
5 int* _errno(void);
6 int WideCharToMultiByte (wchar_t *);
7 int __attribute__ ((__nonnull__ (1)))
8 __wcrtomb_cp (char *dst, wchar_t wc, const unsigned int cp,
9 const unsigned int mb_max)
11 if (cp == 0) {
12 if (wc > 255)
13 (*_errno()) = 42;
14 return 1;
16 else
17 return WideCharToMultiByte (&wc);
19 void wcsrtombs (char *dst, const wchar_t *pwc, unsigned int cp,
20 unsigned int mb_max)
22 if ((__wcrtomb_cp (dst, *pwc, cp, mb_max)) <= 0)
23 return;
24 if ((__wcrtomb_cp (dst, *pwc, cp, mb_max)) <= 0)
25 return;