From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 26DEE3858D35; Fri, 31 Jul 2020 12:28:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26DEE3858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596198492; bh=FrGG5bFyHpkRpe/w0uON6i9gAgO985nzy04zOS/VinU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pVbxBbWlafier3pPE3Jf56/nvkhbrb044kJHXOQv9Myyhg6TaeseglpKNABcpwDW7 zulnZ+wu/uLVLxZuVV8I72fqRsBVUyBk8JEtZTYvtEVIn3yEkIT/S3bjgrgI7G/rU2 Exk4+ZtElqmUfBo/S2H24YfbW8bWuJvpZft/DO8k= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/96390] [OpenMP] Link errors on the offload side for C++ code with templates Date: Fri, 31 Jul 2020 12:28:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Jul 2020 12:28:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96390 --- Comment #2 from Tobias Burnus --- omp-offload.c's omp_discover_declare_target_tgt_fn_r sees the ::S()" It does not call ((vec *) data)->safe_push (*tp); to add it to the work list. (=E2=86=92 follow up issue for "V"?) However, it sets the attribute (+ updates the node); in omp_discover_declare_target_tgt_fn_r: (gdb) p *tp $27 =3D (tree) 0x7ffff7648e00 (gdb) p debug_tree((*tp)->decl_common.attributes) >> But later in dump_function_to_file: (gdb) p fndecl $30 =3D (tree) 0x7ffff7648f00 (gdb) p debug_tree(fndecl->decl_common.attributes) $31 =3D void Thus, there is now a different tree =E2=80=93 with DECL_ATTRIBUTES stripped= .=