1f08c3bdfSopenharmony_citypedef		 __int128	 int128_t;
2f08c3bdfSopenharmony_citypedef   signed __int128	sint128_t;
3f08c3bdfSopenharmony_citypedef unsigned __int128	uint128_t;
4f08c3bdfSopenharmony_ci
5f08c3bdfSopenharmony_citypedef	__int128 int	badxi;
6f08c3bdfSopenharmony_citypedef int __int128	badix;
7f08c3bdfSopenharmony_citypedef unsigned unsigned __int128 baduu;
8f08c3bdfSopenharmony_citypedef double __int128 baddx;
9f08c3bdfSopenharmony_citypedef __int128 double badxd;
10f08c3bdfSopenharmony_ci
11f08c3bdfSopenharmony_ciint sizeof_int128(void)
12f08c3bdfSopenharmony_ci{
13f08c3bdfSopenharmony_ci	return sizeof(__int128);
14f08c3bdfSopenharmony_ci}
15f08c3bdfSopenharmony_ci
16f08c3bdfSopenharmony_citypedef unsigned long long u64;
17f08c3bdfSopenharmony_citypedef unsigned long      u32;
18f08c3bdfSopenharmony_ci
19f08c3bdfSopenharmony_ciu64 foo(u64 a, u64 b, u64 c, u32 s)
20f08c3bdfSopenharmony_ci{
21f08c3bdfSopenharmony_ci       unsigned __int128 tmp;
22f08c3bdfSopenharmony_ci
23f08c3bdfSopenharmony_ci       tmp = (((uint128_t)a) * b) + c;
24f08c3bdfSopenharmony_ci       return (u64) (tmp >> s);
25f08c3bdfSopenharmony_ci}
26f08c3bdfSopenharmony_ci
27f08c3bdfSopenharmony_ci/*
28f08c3bdfSopenharmony_ci * check-name: int128
29f08c3bdfSopenharmony_ci * check-command: test-linearize $file
30f08c3bdfSopenharmony_ci * check-output-ignore
31f08c3bdfSopenharmony_ci *
32f08c3bdfSopenharmony_ci * check-output-contains: ret\\..*\\$16
33f08c3bdfSopenharmony_ci * check-output-contains: mul\\.128
34f08c3bdfSopenharmony_ci * check-output-contains: add\\.128
35f08c3bdfSopenharmony_ci *
36f08c3bdfSopenharmony_ci * check-error-start
37f08c3bdfSopenharmony_ciint128.c:5:18: error: two or more data types in declaration specifiers
38f08c3bdfSopenharmony_ciint128.c:5:18: error: Trying to use reserved word 'int' as identifier
39f08c3bdfSopenharmony_ciint128.c:5:25: error: Expected ; at end of declaration
40f08c3bdfSopenharmony_ciint128.c:5:25: error: got badxi
41f08c3bdfSopenharmony_ciint128.c:6:13: error: two or more data types in declaration specifiers
42f08c3bdfSopenharmony_ciint128.c:6:13: error: Trying to use reserved word '__int128' as identifier
43f08c3bdfSopenharmony_ciint128.c:6:25: error: Expected ; at end of declaration
44f08c3bdfSopenharmony_ciint128.c:6:25: error: got badix
45f08c3bdfSopenharmony_ciint128.c:7:18: error: impossible combination of type specifiers: unsigned unsigned
46f08c3bdfSopenharmony_ciint128.c:7:18: error: Trying to use reserved word 'unsigned' as identifier
47f08c3bdfSopenharmony_ciint128.c:7:27: error: Expected ; at end of declaration
48f08c3bdfSopenharmony_ciint128.c:7:27: error: got __int128
49f08c3bdfSopenharmony_ciint128.c:8:16: error: two or more data types in declaration specifiers
50f08c3bdfSopenharmony_ciint128.c:8:16: error: Trying to use reserved word '__int128' as identifier
51f08c3bdfSopenharmony_ciint128.c:8:25: error: Expected ; at end of declaration
52f08c3bdfSopenharmony_ciint128.c:8:25: error: got baddx
53f08c3bdfSopenharmony_ciint128.c:9:18: error: two or more data types in declaration specifiers
54f08c3bdfSopenharmony_ciint128.c:9:18: error: Trying to use reserved word 'double' as identifier
55f08c3bdfSopenharmony_ciint128.c:9:25: error: Expected ; at end of declaration
56f08c3bdfSopenharmony_ciint128.c:9:25: error: got badxd
57f08c3bdfSopenharmony_ci * check-error-end
58f08c3bdfSopenharmony_ci */
59