1short cast_int_to_short(int x) { 2 return short(x); 3} 4short2 cast_int2_to_short2(int2 x) { 5 return short2(x); 6} 7int cast_float_to_int(float x) { 8 return int(x); 9} 10int3 cast_float3_to_int3(float3 x) { 11 return int3(x); 12} 13short negate_short(short x) { 14 return -x; 15} 16int4 negate_int4(int4 x) { 17 return -x; 18} 19void main() { 20 cast_int_to_short(99999); 21 cast_int2_to_short2(int2(12345, 67890)); 22 cast_float_to_int(5000000000.0); 23 cast_float3_to_int3(float3(3000000000, 2000000, 1000)); 24 negate_short(-32768); 25 negate_int4(int4(-2147483648)); 26} 27 28 29/*%%* 30value is out of range for type 'short': 99999 31value is out of range for type 'short': 67890 32value is out of range for type 'int': 5000000000 33value is out of range for type 'int': 3000000000 34value is out of range for type 'short': 32768 35value is out of range for type 'int': 2147483648 36*%%*/ 37