Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / c-c++-common / Wshift-overflow-5.c
blob36d617ee254f1d52cffda4248963b9174e1ae89c
1 /* PR c++/55095 */
2 /* { dg-do compile { target int32 } } */
3 /* { dg-options "-O -Wshift-overflow=2" } */
5 #define INTM1 (sizeof (int) * __CHAR_BIT__ - 1)
6 #define LLONGM1 (sizeof (long long) * __CHAR_BIT__ - 1)
8 int i1 = 1 << INTM1; /* { dg-warning "requires 33 bits to represent" "" { target { c || c++11_down } } } */
9 unsigned u1 = 1 << INTM1; /* { dg-warning "requires 33 bits to represent" "" { target { c || c++11_down } } } */
10 long long int l1 = 1LL << LLONGM1; /* { dg-warning "requires 65 bits to represent" "" { target { c || c++11_down } } } */