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 gcov-profile/94029] [9 Regression] gcc crash in coverage.c:655 since r9-4216-g390e529e2b98983d Date: Tue, 07 Apr 2020 19:03:51 +0000 [thread overview] Message-ID: <bug-94029-4-PI5SQOGIz3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94029-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94029 --- Comment #21 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>: https://gcc.gnu.org/g:f83c2d2991a762f729741a409a1ac7871733ee40 commit r9-8467-gf83c2d2991a762f729741a409a1ac7871733ee40 Author: Jakub Jelinek <jakub@redhat.com> Date: Mon Mar 23 19:44:58 2020 +0100 c: Fix up cfun->function_end_locus on invalid function bodies [PR94239] Unfortunately the patch broke +FAIL: gcc.dg/pr20245-1.c (internal compiler error) +FAIL: gcc.dg/pr20245-1.c (test for excess errors) +FAIL: gcc.dg/pr28419.c (internal compiler error) +FAIL: gcc.dg/pr28419.c (test for excess errors) on some targets (and under valgrind on the rest of them). Those functions don't have the opening { and so c_parser_compound_statement returned error_mark_node before initializing *endlocp. So, either we can initialize it in that case too: --- gcc/c/c-parser.c 2020-03-20 22:09:39.659411721 +0100 +++ gcc/c/c-parser.c 2020-03-21 09:36:44.455705261 +0100 @@ -5611,6 +5611,8 @@ c_parser_compound_statement (c_parser *p if we have just prepared to enter a function body. */ stmt = c_begin_compound_stmt (true); c_end_compound_stmt (brace_loc, stmt, true); + if (endlocp) + *endlocp = brace_loc; return error_mark_node; } stmt = c_begin_compound_stmt (true); or perhaps simpler initialize it to the function_start_locus at the beginning and have those functions without { have function_start_locus == function_end_locus like the __GIMPLE functions (where propagating the closing } seemed too difficult). 2020-03-23 Jakub Jelinek <jakub@redhat.com> PR gcov-profile/94029 PR c/94239 * c-parser.c (c_parser_declaration_or_fndef): Initialize endloc to the function_start_locus location. Don't do that afterwards for the __GIMPLE body parsing.
next prev parent reply other threads:[~2020-04-07 19:03 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-94029-4@http.gcc.gnu.org/bugzilla/> 2020-03-12 11:58 ` [Bug gcov-profile/94029] [9/10 " jakub at gcc dot gnu.org 2020-03-17 16:23 ` marxin at gcc dot gnu.org 2020-03-17 16:43 ` marxin at gcc dot gnu.org 2020-03-18 12:40 ` jakub at gcc dot gnu.org 2020-03-18 12:51 ` marxin at gcc dot gnu.org 2020-03-18 13:04 ` jakub at gcc dot gnu.org 2020-03-19 21:57 ` cvs-commit at gcc dot gnu.org 2020-03-19 21:58 ` [Bug gcov-profile/94029] [9 " jakub at gcc dot gnu.org 2020-03-22 4:57 ` sandra at gcc dot gnu.org 2020-03-22 5:24 ` bernd.edlinger at hotmail dot de 2020-03-23 18:46 ` cvs-commit at gcc dot gnu.org 2020-03-24 22:29 ` sandra at gcc dot gnu.org 2020-03-25 0:00 ` bernd.edlinger at hotmail dot de 2020-04-07 19:03 ` cvs-commit at gcc dot gnu.org 2020-04-07 19:03 ` cvs-commit at gcc dot gnu.org [this message] 2020-04-07 20:00 ` jakub 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-94029-4-PI5SQOGIz3@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).