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 c++/101731] [9/10/11/12 Regression] ICE in cp_parser_skip_to_pragma_eol, at cp/parser.c:4055 Date: Mon, 22 Nov 2021 16:07:29 +0000 [thread overview] Message-ID: <bug-101731-4-uX5FS74fQD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101731-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101731 --- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:1aedb3920a45bfe75db4514502b4e7f83e108f63 commit r12-5451-g1aedb3920a45bfe75db4514502b4e7f83e108f63 Author: Jakub Jelinek <jakub@redhat.com> Date: Mon Nov 22 17:06:12 2021 +0100 openacc: Fix up C++ #pragma acc routine handling [PR101731] The following testcase ICEs because two function declarations are nested in each other and the acc routine handling code isn't prepared to put the pragma on both. The fix is similar to what #pragma omp declare {simd,variant} does, in particular set the fndecl_seen flag already in cp_parser_late_parsing* when we encounter it rather than only after we finalize it. In cp_finalize_oacc_routine I had to move the fndecl_seen diagnostics to non-FUNCTION_DECL block, because for FUNCTION_DECLs the flag is already known to be set from cp_parser_late_parsing_oacc_routine, but can't be removed altogether, because that regresses quality of 2 goacc/routine-5.c diagnostics - we drop "a single " from the '#pragma acc routine' not immediately followed by a single function declaration or definition diagnostic say on #pragma acc routine int foo (), b; if we drop it altogether. 2021-11-22 Jakub Jelinek <jakub@redhat.com> PR c++/101731 * parser.c (cp_parser_late_parsing_oacc_routine): Set parser->oacc_routine->fndecl_seen here, rather than ... (cp_finalize_oacc_routine): ... here. Don't error if parser->oacc_routine->fndecl_seen is set for FUNCTION_DECLs. * c-c++-common/goacc/routine-6.c: New test.
next prev parent reply other threads:[~2021-11-22 16:07 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-02 18:46 [Bug c++/101731] New: " gscfq@t-online.de 2021-08-02 19:52 ` [Bug c++/101731] " pinskia at gcc dot gnu.org 2021-08-05 19:41 ` [Bug c++/101731] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org 2021-08-05 19:42 ` pinskia at gcc dot gnu.org 2021-08-05 19:55 ` pinskia at gcc dot gnu.org 2021-11-19 15:06 ` jakub at gcc dot gnu.org 2021-11-22 16:07 ` cvs-commit at gcc dot gnu.org [this message] 2021-11-22 16:08 ` [Bug c++/101731] [9/10/11 " jakub at gcc dot gnu.org 2022-01-21 13:57 ` rguenth at gcc dot gnu.org 2022-05-27 9:45 ` [Bug c++/101731] [10/11 " rguenth at gcc dot gnu.org 2022-06-28 10:45 ` jakub at gcc dot gnu.org 2023-07-07 10:40 ` [Bug c++/101731] [11 " rguenth 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-101731-4-uX5FS74fQD@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).