https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112475
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Reduced testcase:
#pragma omp declare target
struct Surface { virtual double sag(); };
#pragma omp end declare target
Surface main_devPtr;
main() {
#pragma omp target
main_devPtr.sag();
}
Printing in 'output_constant' (varasm.cc:5302) the value of 'exp' shows:
<ssa_name 0x7ffff6e0df78
type <pointer_type 0x7ffff6ffc9d8
...
visited
def_stmt _6 = .omp_data_i_2(D)->_ZTI7Surface;
version:6>