aboutsummaryrefslogtreecommitdiff
path: root/gcc/genmatch.cc
diff options
context:
space:
mode:
authorTobias Burnus <tburnus@baylibre.com>2025-01-15 10:47:29 +0100
committerTobias Burnus <tburnus@baylibre.com>2025-01-15 10:47:29 +0100
commitb67a0d6aca0c049e14e44c3f28ce3806680543ef (patch)
treececc25cf582b1e7b7de61a0f35630434d33220fa /gcc/genmatch.cc
parentdd389c2549a4891e044c96b9298efa2a363c744a (diff)
downloadgcc-b67a0d6aca0c049e14e44c3f28ce3806680543ef.zip
gcc-b67a0d6aca0c049e14e44c3f28ce3806680543ef.tar.gz
gcc-b67a0d6aca0c049e14e44c3f28ce3806680543ef.tar.bz2
OpenMP/C++: Fix 'declare variant' for struct-returning functions [PR118486]
To find the variant declaration, a call is constructed in omp_declare_variant_finalize_one, which gives here: TARGET_EXPR <D.3010, variant_fn ()> Extracting now the function declaration failed and gave the bogus error: could not find variant declaration Solution: Use the 2nd argument of the TARGET_EXPR and continue. PR c++/118486 gcc/cp/ChangeLog: * decl.cc (omp_declare_variant_finalize_one): When resolving the variant to use, handle variant calls with TARGET_EXPR. gcc/testsuite/ChangeLog: * g++.dg/gomp/declare-variant-11.C: New test.
Diffstat (limited to 'gcc/genmatch.cc')
0 files changed, 0 insertions, 0 deletions