blob: 0810c7dd5f4bb33ca747d68d9b7eaadd6bf06d74 [file] [log] [blame]
extern void abort (void);
extern void exit (int);
static int f(char *x)
{
return __builtin_strlen(x);
}
int foo ()
{
return f((char*)&L"abcdef"[0]);
}
int
main()
{
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
if (foo () != 0)
abort ();
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
if (foo () != 1)
abort ();
#endif
exit (0);
}