[target/116104] Fix test guarding UINTVAL to extract shift count
[official-gcc.git] / gcc / testsuite / g++.dg / template / constant1.C
blob850d02ded0d400d63f95d864046df73c27092dfc
1 // PR c++/49855
3 extern void foo(int);
5 template <class Key, class Value> void Basic() {
6 #if __SIZEOF_INT__ == 4
7   const int kT = 1.5e6;        // <--- causes ICE
8 #elif __SIZEOF_INT__ == 2
9   const int kT = 1.5e4;        // <--- causes ICE
10 #elif __SIZEOF_INT__ == 1
11   const int kT = 1.5e2;        // <--- causes ICE
12 #endif
13   int size = kT*2/3;
14   do {
15     foo(size);
16     size = size * 0.5 - 1;
17   } while (size >= 0 );