public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug inline-asm/98847] Miscompilation with c++17, templates, and register keyword Date: Thu, 22 Apr 2021 16:50:15 +0000 [thread overview] Message-ID: <bug-98847-4-an1HaDfaYT@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98847-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98847 --- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-8 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:712ffc0ad150aadfa5b91f493075e88fd050189f commit r8-10878-g712ffc0ad150aadfa5b91f493075e88fd050189f Author: Jakub Jelinek <jakub@redhat.com> Date: Thu Jan 28 16:13:11 2021 +0100 c++: Fix up handling of register ... asm ("...") vars in templates [PR33661, PR98847] As the testcase shows, for vars appearing in templates, we don't attach the asm spec string to the pattern decls, nor pass it back to cp_finish_decl during instantiation. The following patch does that. 2021-01-28 Jakub Jelinek <jakub@redhat.com> PR c++/33661 PR c++/98847 * decl.c (cp_finish_decl): For register vars with asmspec in templates call set_user_assembler_name and set DECL_HARD_REGISTER. * pt.c (tsubst_expr): When instantiating DECL_HARD_REGISTER vars, pass asmspec_tree to cp_finish_decl. * g++.dg/opt/pr98847.C: New test. (cherry picked from commit cf93f94b3498f3925895fb0bbfd4b64232b9987a)
next prev parent reply other threads:[~2021-04-22 16:50 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-27 5:22 [Bug inline-asm/98847] New: " programmerjake at gmail dot com 2021-01-27 7:56 ` [Bug inline-asm/98847] " rguenth at gcc dot gnu.org 2021-01-27 8:17 ` pinskia at gcc dot gnu.org 2021-01-27 10:05 ` jakub at gcc dot gnu.org 2021-01-27 16:07 ` programmerjake at gmail dot com 2021-01-28 15:14 ` cvs-commit at gcc dot gnu.org 2021-01-28 15:29 ` krebbel at gcc dot gnu.org 2021-01-29 19:20 ` cvs-commit at gcc dot gnu.org 2021-02-01 20:42 ` programmerjake at gmail dot com 2021-04-20 23:31 ` cvs-commit at gcc dot gnu.org 2021-04-22 16:50 ` cvs-commit at gcc dot gnu.org [this message] 2021-04-22 17:10 ` jakub at gcc dot gnu.org 2021-04-22 19:01 ` programmerjake at gmail dot com 2021-09-11 14:29 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-98847-4-an1HaDfaYT@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).