Open
Description
__constant__
aggregate initializer values return undef in host compilation, but things work when we access individual field values or make a local copy.
Reproducer:
struct S { int s; };
const __constant__ S const_s = { 77 };
__host__ S works () {
S s = const_s;
return s; // returns {77}
}
__host__ S broken () {
return const_s; // returns undef
}