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