blob: 2090c9ae75a02cefd5cbfab75faca7f1a21b79fa [file] [log] [blame]
SKIP: FAILED
#include <metal_stdlib>
using namespace metal;
struct modf_result_f32 {
float fract;
float whole;
};
struct frexp_result_f32 {
float fract;
int exp;
};
void deref_modf() {
modf_result_f32 a = modf_result_f32{.fract=0.5f, .whole=1.0f};
thread modf_result_f32* const p = a;
float fract = p.fract;
float whole = p.whole;
}
void no_deref_modf() {
modf_result_f32 a = modf_result_f32{.fract=0.5f, .whole=1.0f};
thread modf_result_f32* const p = a;
float fract = p.fract;
float whole = p.whole;
}
void deref_frexp() {
frexp_result_f32 a = frexp_result_f32{.fract=0.75f, .exp=1};
thread frexp_result_f32* const p = a;
float fract = p.fract;
int exp = p.exp;
}
void no_deref_frexp() {
frexp_result_f32 a = frexp_result_f32{.fract=0.75f, .exp=1};
thread frexp_result_f32* const p = a;
float fract = p.fract;
int exp = p.exp;
}
kernel void tint_symbol() {
deref_modf();
no_deref_modf();
deref_frexp();
no_deref_frexp();
}
program_source:14:33: error: no viable conversion from 'modf_result_f32' to 'modf_result_f32 *const'
thread modf_result_f32* const p = a;
^ ~
program_source:15:18: error: member reference type 'modf_result_f32 *const' is a pointer; did you mean to use '->'?
float fract = p.fract;
~^
->
program_source:16:18: error: member reference type 'modf_result_f32 *const' is a pointer; did you mean to use '->'?
float whole = p.whole;
~^
->
program_source:20:33: error: no viable conversion from 'modf_result_f32' to 'modf_result_f32 *const'
thread modf_result_f32* const p = a;
^ ~
program_source:21:18: error: member reference type 'modf_result_f32 *const' is a pointer; did you mean to use '->'?
float fract = p.fract;
~^
->
program_source:22:18: error: member reference type 'modf_result_f32 *const' is a pointer; did you mean to use '->'?
float whole = p.whole;
~^
->
program_source:26:34: error: no viable conversion from 'frexp_result_f32' to 'frexp_result_f32 *const'
thread frexp_result_f32* const p = a;
^ ~
program_source:27:18: error: member reference type 'frexp_result_f32 *const' is a pointer; did you mean to use '->'?
float fract = p.fract;
~^
->
program_source:28:14: error: member reference type 'frexp_result_f32 *const' is a pointer; did you mean to use '->'?
int exp = p.exp;
~^
->
program_source:32:34: error: no viable conversion from 'frexp_result_f32' to 'frexp_result_f32 *const'
thread frexp_result_f32* const p = a;
^ ~
program_source:33:18: error: member reference type 'frexp_result_f32 *const' is a pointer; did you mean to use '->'?
float fract = p.fract;
~^
->
program_source:34:14: error: member reference type 'frexp_result_f32 *const' is a pointer; did you mean to use '->'?
int exp = p.exp;
~^
->