public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030
@ 2020-06-24 18:52 gscfq@t-online.de
2020-06-24 21:10 ` [Bug fortran/95880] " dominiq at lps dot ens.fr
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: gscfq@t-online.de @ 2020-06-24 18:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
Bug ID: 95880
Summary: [9/10/11 Regression] ICE in gfc_add_type, at
fortran/symbol.c:2030
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Affects versions down to r8, started between 20200517 and 20200524 :
$ cat z1.f90
module m
end
block data
use m
integer m
end block data
$ cat z5.f90
module m
type t
end type
end
block data
use m
type(t) m
end block data
$ gfortran-11-20200517 -c z1.f90
z1.f90:5:12:
5 | integer m
| 1
Error: Symbol 'm' at (1) cannot have a type
$ gfortran-11-20200621 -c z1.f90
f951: internal compiler error: Segmentation fault
0xbce57f crash_signal
../../gcc/toplev.c:328
0x6f02bc gfc_add_type(gfc_symbol*, gfc_typespec*, locus*)
../../gcc/fortran/symbol.c:2030
0x63eeed build_sym
../../gcc/fortran/decl.c:1685
0x649969 variable_decl
../../gcc/fortran/decl.c:2793
0x649969 gfc_match_data_decl()
../../gcc/fortran/decl.c:6195
0x6ad323 match_word
../../gcc/fortran/parse.c:65
0x6ad323 decode_statement
../../gcc/fortran/parse.c:376
0x6aed6a next_free
../../gcc/fortran/parse.c:1280
0x6aed6a next_statement
../../gcc/fortran/parse.c:1512
0x6b03bb parse_spec
../../gcc/fortran/parse.c:3923
0x6b4e30 parse_block_data
../../gcc/fortran/parse.c:6026
0x6b4e30 gfc_parse_file()
../../gcc/fortran/parse.c:6413
0x70098f gfc_be_parse_file
../../gcc/fortran/f95-lang.c:212
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/95880] [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030
2020-06-24 18:52 [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 gscfq@t-online.de
@ 2020-06-24 21:10 ` dominiq at lps dot ens.fr
2020-06-25 2:19 ` kargl at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-06-24 21:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2020-06-24
Priority|P3 |P4
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
This is due to a change in GCC11 that have been back ported to GCC9 and 10
(pr94397?).
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/95880] [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030
2020-06-24 18:52 [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 gscfq@t-online.de
2020-06-24 21:10 ` [Bug fortran/95880] " dominiq at lps dot ens.fr
@ 2020-06-25 2:19 ` kargl at gcc dot gnu.org
2020-06-25 7:09 ` [Bug fortran/95880] [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 since r11-524-geb069ae8819c3a84 marxin at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: kargl at gcc dot gnu.org @ 2020-06-25 2:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to Dominique d'Humieres from comment #1)
> This is due to a change in GCC11 that have been back ported to GCC9 and 10
> (pr94397?).
It is NOT pr94397.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/95880] [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 since r11-524-geb069ae8819c3a84
2020-06-24 18:52 [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 gscfq@t-online.de
2020-06-24 21:10 ` [Bug fortran/95880] " dominiq at lps dot ens.fr
2020-06-25 2:19 ` kargl at gcc dot gnu.org
@ 2020-06-25 7:09 ` marxin at gcc dot gnu.org
2020-06-25 7:35 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-06-25 7:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |markeggleston at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Summary|[9/10/11 Regression] ICE in |[9/10/11 Regression] ICE in
|gfc_add_type, at |gfc_add_type, at
|fortran/symbol.c:2030 |fortran/symbol.c:2030 since
| |r11-524-geb069ae8819c3a84
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-524-geb069ae8819c3a84.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/95880] [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 since r11-524-geb069ae8819c3a84
2020-06-24 18:52 [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 gscfq@t-online.de
` (2 preceding siblings ...)
2020-06-25 7:09 ` [Bug fortran/95880] [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 since r11-524-geb069ae8819c3a84 marxin at gcc dot gnu.org
@ 2020-06-25 7:35 ` rguenth at gcc dot gnu.org
2020-06-27 21:12 ` anlauf at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-25 7:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |9.4
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/95880] [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 since r11-524-geb069ae8819c3a84
2020-06-24 18:52 [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 gscfq@t-online.de
` (3 preceding siblings ...)
2020-06-25 7:35 ` rguenth at gcc dot gnu.org
@ 2020-06-27 21:12 ` anlauf at gcc dot gnu.org
2020-06-27 21:28 ` anlauf at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-06-27 21:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #4 from anlauf at gcc dot gnu.org ---
(In reply to Martin Liška from comment #3)
> Started with r11-524-geb069ae8819c3a84.
Good catch.
Fix:
diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index ba388ff598d..bfec57ccd9e 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -2027,7 +2027,12 @@ gfc_add_type (gfc_symbol *sym, gfc_typespec *ts, locus
*where)
|| (flavor == FL_PROCEDURE && sym->attr.subroutine)
|| flavor == FL_DERIVED || flavor == FL_NAMELIST)
{
- gfc_error ("Symbol %qs at %L cannot have a type",
sym->ns->proc_name->name, where);
+ if (sym->ns->proc_name)
+ gfc_error ("Symbol %qs at %L cannot have a type",
+ sym->ns->proc_name->name, where);
+ else
+ gfc_error ("Symbol %qs at %L cannot have a type",
+ sym->name, where);
return false;
}
Regtesting.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/95880] [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 since r11-524-geb069ae8819c3a84
2020-06-24 18:52 [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 gscfq@t-online.de
` (4 preceding siblings ...)
2020-06-27 21:12 ` anlauf at gcc dot gnu.org
@ 2020-06-27 21:28 ` anlauf at gcc dot gnu.org
2020-06-28 11:53 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-06-27 21:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
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 ---
Patch: https://gcc.gnu.org/pipermail/fortran/2020-June/054638.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/95880] [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 since r11-524-geb069ae8819c3a84
2020-06-24 18:52 [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 gscfq@t-online.de
` (5 preceding siblings ...)
2020-06-27 21:28 ` anlauf at gcc dot gnu.org
@ 2020-06-28 11:53 ` cvs-commit at gcc dot gnu.org
2020-06-29 15:47 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-28 11:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
--- Comment #6 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:f3a8f66a83f8c94f6fbb0233cefba8032f2e4876
commit r11-1693-gf3a8f66a83f8c94f6fbb0233cefba8032f2e4876
Author: Harald Anlauf <anlauf@gmx.de>
Date: Sun Jun 28 13:52:09 2020 +0200
PR fortran/95880 - ICE in gfc_add_type, at fortran/symbol.c:2030
The fix for PR39695 did not properly distinguish between procedure names
and other symbols names in errors emitted for invalid code. Fix that.
gcc/fortran/
PR fortran/95880
* symbol.c (gfc_add_type): If sym->ns->proc_name is set, use it,
otherwise fall back to sym->name.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/95880] [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 since r11-524-geb069ae8819c3a84
2020-06-24 18:52 [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 gscfq@t-online.de
` (6 preceding siblings ...)
2020-06-28 11:53 ` cvs-commit at gcc dot gnu.org
@ 2020-06-29 15:47 ` cvs-commit at gcc dot gnu.org
2020-06-29 15:51 ` [Bug fortran/95880] [9 " anlauf at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-29 15:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
--- Comment #7 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:e3942f91376ba29a8014fd19f7719c5697ac05e8
commit r10-8389-ge3942f91376ba29a8014fd19f7719c5697ac05e8
Author: Harald Anlauf <anlauf@gmx.de>
Date: Sun Jun 28 13:52:09 2020 +0200
PR fortran/95880 - ICE in gfc_add_type, at fortran/symbol.c:2030
The fix for PR39695 did not properly distinguish between procedure names
and other symbols names in errors emitted for invalid code. Fix that.
gcc/fortran/
PR fortran/95880
* symbol.c (gfc_add_type): If sym->ns->proc_name is set, use it,
otherwise fall back to sym->name.
(cherry picked from commit f3a8f66a83f8c94f6fbb0233cefba8032f2e4876)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/95880] [9 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 since r11-524-geb069ae8819c3a84
2020-06-24 18:52 [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 gscfq@t-online.de
` (7 preceding siblings ...)
2020-06-29 15:47 ` cvs-commit at gcc dot gnu.org
@ 2020-06-29 15:51 ` anlauf at gcc dot gnu.org
2020-07-01 19:50 ` cvs-commit at gcc dot gnu.org
2020-07-01 19:54 ` anlauf at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-06-29 15:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[9/10/11 Regression] ICE in |[9 Regression] ICE in
|gfc_add_type, at |gfc_add_type, at
|fortran/symbol.c:2030 since |fortran/symbol.c:2030 since
|r11-524-geb069ae8819c3a84 |r11-524-geb069ae8819c3a84
--- Comment #8 from anlauf at gcc dot gnu.org ---
Fixed on master and 10-branch.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/95880] [9 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 since r11-524-geb069ae8819c3a84
2020-06-24 18:52 [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 gscfq@t-online.de
` (8 preceding siblings ...)
2020-06-29 15:51 ` [Bug fortran/95880] [9 " anlauf at gcc dot gnu.org
@ 2020-07-01 19:50 ` cvs-commit at gcc dot gnu.org
2020-07-01 19:54 ` anlauf at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-07-01 19:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:f60918f960594ab6aa6d3082d342385210e8ac90
commit r9-8711-gf60918f960594ab6aa6d3082d342385210e8ac90
Author: Harald Anlauf <anlauf@gmx.de>
Date: Sun Jun 28 13:52:09 2020 +0200
PR fortran/95880 - ICE in gfc_add_type, at fortran/symbol.c:2030
The fix for PR39695 did not properly distinguish between procedure names
and other symbols names in errors emitted for invalid code. Fix that.
gcc/fortran/
PR fortran/95880
* symbol.c (gfc_add_type): If sym->ns->proc_name is set, use it,
otherwise fall back to sym->name.
(cherry picked from commit f3a8f66a83f8c94f6fbb0233cefba8032f2e4876)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/95880] [9 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 since r11-524-geb069ae8819c3a84
2020-06-24 18:52 [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 gscfq@t-online.de
` (9 preceding siblings ...)
2020-07-01 19:50 ` cvs-commit at gcc dot gnu.org
@ 2020-07-01 19:54 ` anlauf at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-07-01 19:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #10 from anlauf at gcc dot gnu.org ---
Fixed on master for gcc-11, and on 10- and 9-branch.
Thanks for the report!
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-07-01 19:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 18:52 [Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 gscfq@t-online.de
2020-06-24 21:10 ` [Bug fortran/95880] " dominiq at lps dot ens.fr
2020-06-25 2:19 ` kargl at gcc dot gnu.org
2020-06-25 7:09 ` [Bug fortran/95880] [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 since r11-524-geb069ae8819c3a84 marxin at gcc dot gnu.org
2020-06-25 7:35 ` rguenth at gcc dot gnu.org
2020-06-27 21:12 ` anlauf at gcc dot gnu.org
2020-06-27 21:28 ` anlauf at gcc dot gnu.org
2020-06-28 11:53 ` cvs-commit at gcc dot gnu.org
2020-06-29 15:47 ` cvs-commit at gcc dot gnu.org
2020-06-29 15:51 ` [Bug fortran/95880] [9 " anlauf at gcc dot gnu.org
2020-07-01 19:50 ` cvs-commit at gcc dot gnu.org
2020-07-01 19:54 ` anlauf at gcc dot gnu.org
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).