2 /* { dg-do compile } */
3 /* { dg-options "-O -Wshift-negative-value" } */
4 /* { dg-additional-options "-std=c++03" { target c++ } } */
5 /* { dg-additional-options "-std=c90" { target c } } */
10 C
= -1 << 1, /* { dg-warning "10:left shift of negative value" } */
19 /* Warn for LSHIFT_EXPR. */
26 r
+= m
<< x
; /* { dg-warning "10:left shift of negative value" } */
29 r
+= -1 << x
; /* { dg-warning "11:left shift of negative value" } */
37 /* Shouldn't warn for RSHIFT_EXPR. */