Description
`struct A {
A() {}
~A() {}
int x;
};
device A x;`
the above code is allowed with nvcc but not cuda-clang.
https://godbolt.org/z/jjMG3zTd3
https://godbolt.org/z/74Ed1WvGn
nvcc allows it not because it makes the ctor A::A() implicitly host device (this can be seen by defining A x in device function), but because it does not check host/device availability for file-scope device var.
I think it makes sense to make trivial ctor/dtor implicitly host device.