https://gcc.gnu.org/g:e77f137ef4266af65925305d8e85c926415fcafe

commit r14-12422-ge77f137ef4266af65925305d8e85c926415fcafe
Author: Jakub Jelinek <[email protected]>
Date:   Thu Mar 12 09:09:42 2026 +0100

    openmp, c++: Fix up TREE_TYPE of OMP_TASK
    
    I've made a typo a few years ago and used void_node instead of 
void_type_node
    as TREE_TYPE of OMP_TASK in the taskwait depend case.  This got later
    on copied also for dispatch.
    With reflection this leads to ICEs (but guess except for the testcase
    we should also backport it to release branches).
    
    2026-03-12  Jakub Jelinek  <[email protected]>
    
            * parser.cc (cp_parser_omp_taskwait): Set TREE_TYPE of OMP_TASK
            to void_type_node rather than void_node.
    
    (cherry picked from commit bc56ad604735d0b83f7019d44d832a06d843cf88)

Diff:
---
 gcc/cp/parser.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index 77812c8685d7..af2aa85d0051 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -46391,7 +46391,7 @@ cp_parser_omp_taskwait (cp_parser *parser, cp_token 
*pragma_tok)
   if (clauses)
     {
       tree stmt = make_node (OMP_TASK);
-      TREE_TYPE (stmt) = void_node;
+      TREE_TYPE (stmt) = void_type_node;
       OMP_TASK_CLAUSES (stmt) = clauses;
       OMP_TASK_BODY (stmt) = NULL_TREE;
       SET_EXPR_LOCATION (stmt, pragma_tok->location);

Reply via email to