* [Bug fortran/95978] [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731
2020-06-29 17:50 [Bug fortran/95978] New: [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731 gscfq@t-online.de
@ 2020-06-29 20:47 ` dominiq at lps dot ens.fr
2020-06-29 21:05 ` anlauf at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-06-29 20:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95978
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-06-29
Status|UNCONFIRMED |NEW
Target Milestone|--- |10.2
Known to fail| |10.1.0, 11.0
Priority|P3 |P4
Known to work| |9.3.0
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
My build at 2019-12-18 doesn't give an ICE, gcc11-706 does. Probably a change
on master, back ported to GCC10.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/95978] [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731
2020-06-29 17:50 [Bug fortran/95978] New: [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731 gscfq@t-online.de
2020-06-29 20:47 ` [Bug fortran/95978] " dominiq at lps dot ens.fr
@ 2020-06-29 21:05 ` anlauf at gcc dot gnu.org
2020-06-29 21:11 ` anlauf at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-06-29 21:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95978
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #2 from anlauf at gcc dot gnu.org ---
The offending commit is c77b6f95e014ad1f6654683ff56f9508fe7f268d
by Mark and Steven.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/95978] [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731
2020-06-29 17:50 [Bug fortran/95978] New: [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731 gscfq@t-online.de
2020-06-29 20:47 ` [Bug fortran/95978] " dominiq at lps dot ens.fr
2020-06-29 21:05 ` anlauf at gcc dot gnu.org
@ 2020-06-29 21:11 ` anlauf at gcc dot gnu.org
2020-06-29 21:21 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-06-29 21:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95978
--- Comment #3 from anlauf at gcc dot gnu.org ---
The obvious patch
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index ac1f63f66e0..f38def4c291 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -728,7 +728,7 @@ gfc_match_data (void)
gfc_constructor *c;
c = gfc_constructor_first (new_data->value->expr->value.constructor);
for (; c; c = gfc_constructor_next (c))
- if (c->expr->ts.type == BT_BOZ)
+ if (c->expr && c->expr->ts.type == BT_BOZ)
{
gfc_error ("BOZ literal constant at %L cannot appear in a "
"structure constructor", &c->expr->where);
leads to:
z1.f90:5:19:
5 | data c /t(1)/
| 1
Error: Unexpected DATA statement at (1)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/95978] [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731
2020-06-29 17:50 [Bug fortran/95978] New: [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731 gscfq@t-online.de
` (2 preceding siblings ...)
2020-06-29 21:11 ` anlauf at gcc dot gnu.org
@ 2020-06-29 21:21 ` cvs-commit at gcc dot gnu.org
2020-06-29 21:25 ` anlauf at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-29 21:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95978
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:583812c2e2f3593823622b0a5821d957c832dbd0
commit r11-1720-g583812c2e2f3593823622b0a5821d957c832dbd0
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Jun 29 23:20:16 2020 +0200
PR fortran/95978 - ICE in gfc_match_data, at fortran/decl.c:731
Catch NULL pointer dereference on invalid DATA statement.
gcc/fortran/
PR fortran/95978
* decl.c (gfc_match_data): Avoid NULL pointer dereference.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/95978] [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731
2020-06-29 17:50 [Bug fortran/95978] New: [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731 gscfq@t-online.de
` (3 preceding siblings ...)
2020-06-29 21:21 ` cvs-commit at gcc dot gnu.org
@ 2020-06-29 21:25 ` anlauf at gcc dot gnu.org
2020-06-30 18:46 ` cvs-commit at gcc dot gnu.org
2020-06-30 18:48 ` anlauf at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-06-29 21:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95978
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #5 from anlauf at gcc dot gnu.org ---
Committed as obvious on master:
https://gcc.gnu.org/pipermail/fortran/2020-June/054650.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/95978] [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731
2020-06-29 17:50 [Bug fortran/95978] New: [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731 gscfq@t-online.de
` (4 preceding siblings ...)
2020-06-29 21:25 ` anlauf at gcc dot gnu.org
@ 2020-06-30 18:46 ` cvs-commit at gcc dot gnu.org
2020-06-30 18:48 ` anlauf at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-30 18:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95978
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:aa0868ffe0fd45891a9596bf4995f1b610243fa6
commit r10-8400-gaa0868ffe0fd45891a9596bf4995f1b610243fa6
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Jun 29 23:20:16 2020 +0200
PR fortran/95978 - ICE in gfc_match_data, at fortran/decl.c:731
Catch NULL pointer dereference on invalid DATA statement.
gcc/fortran/
PR fortran/95978
* decl.c (gfc_match_data): Avoid NULL pointer dereference.
(cherry picked from commit 583812c2e2f3593823622b0a5821d957c832dbd0)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/95978] [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731
2020-06-29 17:50 [Bug fortran/95978] New: [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731 gscfq@t-online.de
` (5 preceding siblings ...)
2020-06-30 18:46 ` cvs-commit at gcc dot gnu.org
@ 2020-06-30 18:48 ` anlauf at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-06-30 18:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95978
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #7 from anlauf at gcc dot gnu.org ---
Fixed on master for gcc-11, and on 10-branch.
Thanks for the report!
^ permalink raw reply [flat|nested] 8+ messages in thread