]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp: Teach OpenMP declare variant append_args handling about TYPE_NO_NAMED_ARGS_ST...
authorJakub Jelinek <jakub@redhat.com>
Mon, 13 Oct 2025 07:47:09 +0000 (09:47 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 13 Oct 2025 07:47:09 +0000 (09:47 +0200)
commit80e82de4b802aa2e4c7cfad6e3288d99a7cb16ac
treec734e5dc122d44a1dc909710460c86a737aede36
parent273121cabe28c93dffa18854d42ea33d2406cfc1
openmp: Teach OpenMP declare variant append_args handling about TYPE_NO_NAMED_ARGS_STDARG_P

Since my recent patch, GCC for C++26 uses the TYPE_NO_NAMED_ARGS_STDARG_P
flag like C23 uses for (...) function types.  The OpenMP declare variant
append_args handling does some very ugly hacks (modify TYPE_ARG_TYPES
temporarily instead of trying to create new function types) and had
to be tweaked to deal with that.  This fixes
-FAIL: c-c++-common/gomp/append-args-7.c  -std=c++26  scan-tree-dump-times gimple "f3 \\\\(obj1, obj2, 1, a, cp, d\\\\);" 1
-FAIL: c-c++-common/gomp/append-args-7.c  -std=c++26 (test for excess errors)

2025-10-13  Jakub Jelinek  <jakub@redhat.com>

* decl.cc (omp_declare_variant_finalize_one): If !nbase_args
and TREE_TYPE (decl) has TYPE_NO_NAMED_ARGS_STDARG_P bit set
and varg is NULL, temporarily set TYPE_NO_NAMED_ARGS_STDARG_P
on TREE_TYPE (variant).
gcc/cp/decl.cc