| SKIP: FAILED |
| |
| #include <metal_stdlib> |
| using namespace metal; |
| |
| thread float t = 0.0f; |
| float m() { |
| t = 1.0f; |
| return float(t); |
| } |
| void f() { |
| int v = tint_f32_to_i32(m()); |
| } |
| int tint_f32_to_i32(float value) { |
| return select(2147483647, select((-2147483647 - 1), int(value), (value >= -2147483648.0f)), (value <= 2147483520.0f)); |
| } |
| program_source:4:14: error: program scope variable must reside in constant address space |
| thread float t = 0.0f; |
| ^ |
| program_source:10:11: error: use of undeclared identifier 'tint_f32_to_i32' |
| int v = tint_f32_to_i32(m()); |
| ^ |
| |