PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / template / pr68978.C
blob19045329f01259ec34da5cce11189f67cc1f92a7
1 // PR c++/68978
3 int i = 0, c = 0, radix = 10, max = 0x7fffffff;
5 template <typename T> int toi_1() {
6   if (max < ((i *= radix) += c))
7     return 0;
8   return i;
11 template <typename T> int toi_2() {
12   if (max < ((i = radix) = c))
13     return 0;
14   return i;
17 template <typename T> int toi_3() {
18   if (max < ((i = radix) += c))
19     return 0;
20   return i;
23 template <typename T> int toi_4() {
24   if (max < ((i += radix) = c))
25     return 0;
26   return i;
29 template <typename T> int toi_5() {
30   if (max < (((i = radix) += (c += 5)) *= 30))
31     return 0;
32   return i;
35 int x = toi_1<int> ();
36 int y = toi_2<int> ();
37 int z = toi_3<int> ();
38 int w = toi_4<int> ();
39 int r = toi_5<int> ();