* [Bug c/94239] [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc.
2020-03-20 16:28 [Bug c/94239] New: [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc ro at gcc dot gnu.org
@ 2020-03-20 16:28 ` ro at gcc dot gnu.org
2020-03-20 16:38 ` msebor at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ro at gcc dot gnu.org @ 2020-03-20 16:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94239
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/94239] [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc.
2020-03-20 16:28 [Bug c/94239] New: [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc ro at gcc dot gnu.org
2020-03-20 16:28 ` [Bug c/94239] " ro at gcc dot gnu.org
@ 2020-03-20 16:38 ` msebor at gcc dot gnu.org
2020-03-21 2:44 ` law at redhat dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-03-20 16:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94239
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2020-03-20
CC| |msebor at gcc dot gnu.org
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
I noticed this on x86_64-linux as well last night in a fully bootstrapped
compiler but today I can't reproduce with just stage1.
It can be seen in powerpc64le-unknown-linux-gnu test results:
https://gcc.gnu.org/pipermail/gcc-testresults/2020-March/556737.html
and m68k-unknown-linux-gnu:
https://gcc.gnu.org/pipermail/gcc-testresults/2020-March/556729.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/94239] [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc.
2020-03-20 16:28 [Bug c/94239] New: [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc ro at gcc dot gnu.org
2020-03-20 16:28 ` [Bug c/94239] " ro at gcc dot gnu.org
2020-03-20 16:38 ` msebor at gcc dot gnu.org
@ 2020-03-21 2:44 ` law at redhat dot com
2020-03-21 8:48 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: law at redhat dot com @ 2020-03-21 2:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94239
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
CC| |law at redhat dot com
--- Comment #2 from Jeffrey A. Law <law at redhat dot com> ---
Almost certainly the bug we were looking at earlier today Jakub.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/94239] [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc.
2020-03-20 16:28 [Bug c/94239] New: [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc ro at gcc dot gnu.org
` (2 preceding siblings ...)
2020-03-21 2:44 ` law at redhat dot com
@ 2020-03-21 8:48 ` jakub at gcc dot gnu.org
2020-03-21 13:47 ` seurer at linux dot vnet.ibm.com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-21 8:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94239
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yes, see https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542459.html
Sorry for that.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/94239] [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc.
2020-03-20 16:28 [Bug c/94239] New: [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc ro at gcc dot gnu.org
` (3 preceding siblings ...)
2020-03-21 8:48 ` jakub at gcc dot gnu.org
@ 2020-03-21 13:47 ` seurer at linux dot vnet.ibm.com
2020-03-22 15:06 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: seurer at linux dot vnet.ibm.com @ 2020-03-21 13:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94239
Bill Seurer <seurer at linux dot vnet.ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |seurer at linux dot vnet.ibm.com
--- Comment #4 from Bill Seurer <seurer at linux dot vnet.ibm.com> ---
I think this also hit powerpc though only on power 8.
Regressions on trunk (power8) on update from
37482edc3f7f19110da7178d0d4c3003ea5272f3, r10-7280 to
9def91e9f2a7051c9c146f16c1a10d1b25d33b47, r10-7281:
New failures (these tests were not seen to fail previously):
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)
This only happens on a bootstrap.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/94239] [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc.
2020-03-20 16:28 [Bug c/94239] New: [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc ro at gcc dot gnu.org
` (4 preceding siblings ...)
2020-03-21 13:47 ` seurer at linux dot vnet.ibm.com
@ 2020-03-22 15:06 ` ro at CeBiTec dot Uni-Bielefeld.DE
2020-03-22 18:07 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2020-03-22 15:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94239
--- Comment #5 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Yes, see https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542459.html
> Sorry for that.
I've just applied your patch (the primary one above), rebuilt cc1 on
both i386-pc-solaris2.11 and sparc-sun-solaris2.11 (where the failures
had apppeared in this Friday's bootstaps, too), and run the two affected
tests for both 32 and 64-bit: both failures are gone now.
Thanks.
Rainer
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/94239] [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc.
2020-03-20 16:28 [Bug c/94239] New: [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc ro at gcc dot gnu.org
` (5 preceding siblings ...)
2020-03-22 15:06 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2020-03-22 18:07 ` jakub at gcc dot gnu.org
2020-03-23 7:32 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-22 18:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94239
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dcb314 at hotmail dot com
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
*** Bug 94262 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/94239] [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc.
2020-03-20 16:28 [Bug c/94239] New: [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc ro at gcc dot gnu.org
` (6 preceding siblings ...)
2020-03-22 18:07 ` jakub at gcc dot gnu.org
@ 2020-03-23 7:32 ` rguenth at gcc dot gnu.org
2020-03-23 17:01 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-03-23 7:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94239
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/94239] [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc.
2020-03-20 16:28 [Bug c/94239] New: [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc ro at gcc dot gnu.org
` (7 preceding siblings ...)
2020-03-23 7:32 ` rguenth at gcc dot gnu.org
@ 2020-03-23 17:01 ` jakub at gcc dot gnu.org
2020-03-23 18:46 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-23 17:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94239
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |asolokha at gmx dot com
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
*** Bug 94287 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/94239] [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc.
2020-03-20 16:28 [Bug c/94239] New: [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc ro at gcc dot gnu.org
` (8 preceding siblings ...)
2020-03-23 17:01 ` jakub at gcc dot gnu.org
@ 2020-03-23 18:46 ` cvs-commit at gcc dot gnu.org
2020-03-23 18:49 ` jakub at gcc dot gnu.org
2020-04-07 19:03 ` cvs-commit at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-23 18:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94239
--- Comment #8 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:5db9e89323cd0a0be16a94f2f984121531ea7772
commit r10-7343-g5db9e89323cd0a0be16a94f2f984121531ea7772
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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/94239] [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc.
2020-03-20 16:28 [Bug c/94239] New: [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc ro at gcc dot gnu.org
` (9 preceding siblings ...)
2020-03-23 18:46 ` cvs-commit at gcc dot gnu.org
@ 2020-03-23 18:49 ` jakub at gcc dot gnu.org
2020-04-07 19:03 ` cvs-commit at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-23 18:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94239
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c/94239] [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc.
2020-03-20 16:28 [Bug c/94239] New: [10 regression] cc1 SEGV in get_location_from_adhoc_loc with gcc.dg/pr20245-1.c etc ro at gcc dot gnu.org
` (10 preceding siblings ...)
2020-03-23 18:49 ` jakub at gcc dot gnu.org
@ 2020-04-07 19:03 ` cvs-commit at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-07 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94239
--- Comment #10 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.
^ permalink raw reply [flat|nested] 13+ messages in thread