Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / builtin-arith-overflow-5.c
blobb43fd1859d43b743adc56c81d1bb1646963d36de
1 /* PR rtl-optimization/95862 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
5 int
6 f1 (int a, int b)
8 unsigned long long c;
9 return __builtin_mul_overflow (a, b, &c);
12 int
13 f2 (int a, unsigned b)
15 unsigned long long c;
16 return __builtin_mul_overflow (a, b, &c);
19 int
20 f3 (unsigned a, unsigned b)
22 long long c;
23 return __builtin_mul_overflow (a, b, &c);
26 int
27 f4 (int a, unsigned b)
29 long long c;
30 return __builtin_mul_overflow (a, b, &c);
33 short
34 f5 (short a, short b)
36 unsigned c;
37 return __builtin_mul_overflow (a, b, &c);
40 short
41 f6 (short a, unsigned short b)
43 unsigned c;
44 return __builtin_mul_overflow (a, b, &c);
47 short
48 f7 (unsigned short a, unsigned short b)
50 int c;
51 return __builtin_mul_overflow (a, b, &c);
54 short
55 f8 (short a, unsigned short b)
57 int c;
58 return __builtin_mul_overflow (a, b, &c);
61 signed char
62 f9 (signed char a, signed char b)
64 unsigned short c;
65 return __builtin_mul_overflow (a, b, &c);
68 signed char
69 f10 (signed char a, unsigned char b)
71 unsigned short c;
72 return __builtin_mul_overflow (a, b, &c);
75 signed char
76 f11 (unsigned char a, unsigned char b)
78 short c;
79 return __builtin_mul_overflow (a, b, &c);
82 signed char
83 f12 (signed char a, unsigned char b)
85 short c;
86 return __builtin_mul_overflow (a, b, &c);