2 /* { dg-do compile } */
3 /* { dg-options "-Wconversion -Wsign-conversion" } */
4 /* { dg-require-effective-target int32plus } */
12 short mask2(short ssx
)
17 ssz
= ((int)ssx
) & 0x7fff;
18 ssy
= ((int)ssx
) | 0x7fff;
19 ssz
= ((int)ssx
) ^ 0x7fff;
23 short mask3(int si
, unsigned int ui
)
29 ss
= si
& 0xAAAA; /* { dg-warning "conversion" } */
31 ss
= ui
& 0xAAAA; /* { dg-warning "conversion" } */
34 us
= si
& 0xAAAA; /* { dg-warning "conversion" } */
36 us
= ui
& 0xAAAA; /* 0xAAAA is zero-extended, thus it masks the
37 upper bits of 'ui' making it fit in 'us'. */
42 short mask4(int x
, int y
)
44 return x
& y
; /* { dg-warning "conversion" } */
49 return x
& -1; /* { dg-warning "conversion" } */