1 // { dg-do compile { target c++11 } }
6 return i << j; // { dg-error "is negative" }
9 constexpr int i1 = fn1 (1, -1); // { dg-message "in .constexpr. expansion of " }
14 return i << j; // { dg-error "is >= than the precision of the left operand" }
17 constexpr int i2 = fn2 (1, 200); // { dg-message "in .constexpr. expansion of " }
22 return i << j; // { dg-error "is negative" }
25 constexpr int i3 = fn3 (-1, 2); // { dg-message "in .constexpr. expansion of " }
30 return i << j; // { dg-error "overflows" }
33 constexpr int i4 = fn4 (__INT_MAX__, 2); // { dg-message "in .constexpr. expansion of " }
41 constexpr int i5 = fn5 (__INT_MAX__, 1);
44 fn6 (unsigned int i, unsigned int j)
46 return i << j; // { dg-error "is >= than the precision of the left operand" }
49 constexpr int i6 = fn6 (1, -1); // { dg-message "in .constexpr. expansion of " }
54 return i >> j; // { dg-error "is negative" }
57 constexpr int i7 = fn7 (1, -1); // { dg-message "in .constexpr. expansion of " }
65 constexpr int i8 = fn8 (-1, 1);
70 return i >> j; // { dg-error "is >= than the precision of the left operand" }
73 constexpr int i9 = fn9 (1, 200); // { dg-message "in .constexpr. expansion of " }