SKIP: FAILED | |
#include <metal_stdlib> | |
using namespace metal; | |
thread float u = 1.0f; | |
void f() { | |
int const v = tint_f32_to_i32(u); | |
} | |
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 u = 1.0f; | |
^ | |
program_source:6:13: warning: unused variable 'v' [-Wunused-variable] | |
int const v = tint_f32_to_i32(u); | |
^ | |