1 /* { dg-do compile } */
2 /* { dg-options "-std=gnu99 -O2" } */
4 /* N1169 Conversion from fixed-point to integer.
5 Test if GCC warns when overflow or underflow. */
12 sc
= 500k
; /* { dg-warning "overflow in conversion" } */
13 sc
= -500k
; /* { dg-warning "overflow in conversion" } */
14 sc
= 500lk
; /* { dg-warning "overflow in conversion" } */
15 sc
= -500lk
; /* { dg-warning "overflow in conversion" } */
16 sc
= 500llk
; /* { dg-warning "overflow in conversion" } */
17 sc
= -500llk
; /* { dg-warning "overflow in conversion" } */
18 uc
= 500k
; /* { dg-warning "overflow in conversion" } */
19 uc
= -500k
; /* { dg-warning "overflow in conversion" } */
20 uc
= 500lk
; /* { dg-warning "overflow in conversion" } */
21 uc
= -500lk
; /* { dg-warning "overflow in conversion" } */
22 uc
= 500llk
; /* { dg-warning "overflow in conversion" } */
23 uc
= -500llk
; /* { dg-warning "overflow in conversion" } */