2 /* { dg-do compile } */
3 /* { dg-options "-O -Wextra -Wno-shift-negative-value" } */
4 /* { dg-additional-options "-std=c++11" { target c++ } } */
10 /* { dg-error "not an integer constant" "no constant" { target c++ } .-1 } */
11 /* { dg-error "left operand of shift expression" "shift" { target c++ } .-2 } */
20 /* Warn for LSHIFT_EXPR. */
27 r
+= m
<< x
; /* { dg-bogus "left shift of negative value" } */
30 r
+= -1 << x
; /* { dg-bogus "left shift of negative value" } */
38 /* Shouldn't warn for RSHIFT_EXPR. */