From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id D32563858CDA; Mon, 11 Dec 2023 22:07:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D32563858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702332467; bh=QAi3OJUeE7CcPVnmySInTGqBv9V7xfPr/tbxy25irXQ=; h=From:To:Subject:Date:From; b=P7x7zyCoo7sQxZ7ZaNwQa7/SpVq/UI0TcIs9Brd+g9fqcBP30u+0fuzbL8c+NOtgc 7XOYohy6cZE2WvM2GhrbQlalGTB2SdRsc/VorTfpnHa8hIVbs/80eg+2gn/SDF9pG5 a8zcV9R/m0DhmNAj7MMgv0tJklS2j/4NCoWgdgAA= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-6435] Resolve ICE in 'gcc/fortran/trans-openmp.cc:gfc_omp_call_is_alloc' X-Act-Checkin: gcc X-Git-Author: Thomas Schwinge X-Git-Refname: refs/heads/master X-Git-Oldrev: 6008b80b25d71827fb26ce49f49aae02b645bb12 X-Git-Newrev: 453e0f45a49f425992bc47ff8909ed8affc29d2e Message-Id: <20231211220747.D32563858CDA@sourceware.org> Date: Mon, 11 Dec 2023 22:07:47 +0000 (GMT) List-Id: https://gcc.gnu.org/g:453e0f45a49f425992bc47ff8909ed8affc29d2e commit r14-6435-g453e0f45a49f425992bc47ff8909ed8affc29d2e Author: Thomas Schwinge Date: Mon Dec 11 22:52:54 2023 +0100 Resolve ICE in 'gcc/fortran/trans-openmp.cc:gfc_omp_call_is_alloc' Fix-up for recent commit 2505a8b41d3b74a545755a278f3750a29c1340b6 "OpenMP: Minor '!$omp allocators' cleanup", which caused: {+FAIL: gfortran.dg/gomp/allocate-5.f90 -O (internal compiler error: tree check: expected class 'type', have 'declaration' (function_decl) in gfc_omp_call_is_alloc, at fortran/trans-openmp.cc:8386)+} [-PASS:-]{+FAIL:+} gfortran.dg/gomp/allocate-5.f90 -O (test for excess errors) ..., and similarly in 'libgomp.fortran/allocators-1.f90', 'libgomp.fortran/allocators-2.f90', 'libgomp.fortran/allocators-3.f90', 'libgomp.fortran/allocators-4.f90', 'libgomp.fortran/allocators-5.f90'. gcc/fortran/ * trans-openmp.cc (gfc_omp_call_is_alloc): Resolve ICE. Diff: --- gcc/fortran/trans-openmp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc index 95184920cf7..f7c73a5d273 100644 --- a/gcc/fortran/trans-openmp.cc +++ b/gcc/fortran/trans-openmp.cc @@ -8381,10 +8381,10 @@ gfc_omp_call_is_alloc (tree ptr) { fn = build_function_type_list (boolean_type_node, ptr_type_node, NULL_TREE); - fn = build_fn_decl ("GOMP_is_alloc", fn); tree att = build_tree_list (NULL_TREE, build_string (4, ". R ")); att = tree_cons (get_identifier ("fn spec"), att, TYPE_ATTRIBUTES (fn)); fn = build_type_attribute_variant (fn, att); + fn = build_fn_decl ("GOMP_is_alloc", fn); } return build_call_expr_loc (input_location, fn, 1, ptr); }