rs6000: Consider explicit VSX when masking off ALTIVEC [PR115688]
[official-gcc.git] / gcc / testsuite / g++.dg / template / pr68978.C
blobcf91558847f8c21295784ba0526a5aa40959c93d
1 // PR c++/68978
3 typedef int int32_t __attribute__((mode (__SI__)));
5 int32_t i = 0, c = 0, radix = 10, max = 0x7fffffff;
7 template <typename T> int32_t toi_1() {
8   if (max < ((i *= radix) += c))
9     return 0;
10   return i;
13 template <typename T> int32_t toi_2() {
14   if (max < ((i = radix) = c))
15     return 0;
16   return i;
19 template <typename T> int32_t toi_3() {
20   if (max < ((i = radix) += c))
21     return 0;
22   return i;
25 template <typename T> int32_t toi_4() {
26   if (max < ((i += radix) = c))
27     return 0;
28   return i;
31 template <typename T> int32_t toi_5() {
32   if (max < (((i = radix) += (c += 5)) *= 30))
33     return 0;
34   return i;
37 int32_t x = toi_1<int32_t> ();
38 int32_t y = toi_2<int32_t> ();
39 int32_t z = toi_3<int32_t> ();
40 int32_t w = toi_4<int32_t> ();
41 int32_t r = toi_5<int32_t> ();