* [Bug fortran/103715] [9/10/11/12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
@ 2021-12-15 11:18 ` marxin at gcc dot gnu.org
2022-01-04 11:13 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-15 11:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org,
| |pault at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-12-15
Summary|[12 Regression] ICE in |[9/10/11/12 Regression] ICE
|gfc_find_gsymbol, at |in gfc_find_gsymbol, at
|fortran/symbol.c:4301 |fortran/symbol.c:4301 since
| |r9-3803-ga5fbc2f36a291cbe
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r9-3803-ga5fbc2f36a291cbe.
One can see valgrind Invalid read errors.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/103715] [9/10/11/12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
2021-12-15 11:18 ` [Bug fortran/103715] [9/10/11/12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe marxin at gcc dot gnu.org
@ 2022-01-04 11:13 ` rguenth at gcc dot gnu.org
2022-05-27 9:46 ` [Bug fortran/103715] [10/11/12/13 " rguenth at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-04 11:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Target Milestone|--- |9.5
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/103715] [10/11/12/13 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
2021-12-15 11:18 ` [Bug fortran/103715] [9/10/11/12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe marxin at gcc dot gnu.org
2022-01-04 11:13 ` rguenth at gcc dot gnu.org
@ 2022-05-27 9:46 ` rguenth at gcc dot gnu.org
2022-06-28 10:47 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/103715] [10/11/12/13 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
` (2 preceding siblings ...)
2022-05-27 9:46 ` [Bug fortran/103715] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:47 ` jakub at gcc dot gnu.org
2023-07-07 10:41 ` [Bug fortran/103715] [11/12/13/14 " rguenth at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/103715] [11/12/13/14 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
` (3 preceding siblings ...)
2022-06-28 10:47 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:41 ` rguenth at gcc dot gnu.org
2024-03-18 17:48 ` anlauf at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/103715] [11/12/13/14 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
` (4 preceding siblings ...)
2023-07-07 10:41 ` [Bug fortran/103715] [11/12/13/14 " rguenth at gcc dot gnu.org
@ 2024-03-18 17:48 ` anlauf at gcc dot gnu.org
2024-03-18 18:10 ` jvdelisle at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-03-18 17:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
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
CC| |anlauf at gcc dot gnu.org
--- Comment #5 from anlauf at gcc dot gnu.org ---
Obvious fix for the invalid read (untested):
diff --git a/gcc/fortran/frontend-passes.cc b/gcc/fortran/frontend-passes.cc
index 06dfa1a3232..3c06018fdbb 100644
--- a/gcc/fortran/frontend-passes.cc
+++ b/gcc/fortran/frontend-passes.cc
@@ -5807,6 +5807,9 @@ check_externals_expr (gfc_expr **ep, int *walk_subtrees
ATTRIBUTE_UNUSED,
if (e->expr_type != EXPR_FUNCTION)
return 0;
+ if (e->symtree && e->symtree->n.sym->attr.subroutine)
+ return 0;
+
sym = e->value.function.esym;
if (sym == NULL)
return 0;
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/103715] [11/12/13/14 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
` (5 preceding siblings ...)
2024-03-18 17:48 ` anlauf at gcc dot gnu.org
@ 2024-03-18 18:10 ` jvdelisle at gcc dot gnu.org
2024-03-18 18:20 ` anlauf at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2024-03-18 18:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu.org
--- Comment #6 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to anlauf from comment #5)
> Obvious fix for the invalid read (untested):
>
If it test OK feel free to commit.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/103715] [11/12/13/14 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
` (6 preceding siblings ...)
2024-03-18 18:10 ` jvdelisle at gcc dot gnu.org
@ 2024-03-18 18:20 ` anlauf at gcc dot gnu.org
2024-03-18 18:41 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-03-18 18:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
--- Comment #7 from anlauf at gcc dot gnu.org ---
(In reply to Jerry DeLisle from comment #6)
> (In reply to anlauf from comment #5)
> > Obvious fix for the invalid read (untested):
> >
> If it test OK feel free to commit.
Unsurprisingly it regtests fine :-)
Will commit soon.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/103715] [11/12/13/14 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
` (7 preceding siblings ...)
2024-03-18 18:20 ` anlauf at gcc dot gnu.org
@ 2024-03-18 18:41 ` cvs-commit at gcc dot gnu.org
2024-03-19 19:21 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-18 18:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
--- Comment #8 from GCC 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:3be2b8f475f22c531d6cef1b041c0573b3ea5133
commit r14-9522-g3be2b8f475f22c531d6cef1b041c0573b3ea5133
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Mar 18 19:36:59 2024 +0100
Fortran: error recovery in frontend optimization [PR103715]
gcc/fortran/ChangeLog:
PR fortran/103715
* frontend-passes.cc (check_externals_expr): Prevent invalid read
in case of mismatch of external subroutine with function.
gcc/testsuite/ChangeLog:
PR fortran/103715
* gfortran.dg/pr103715.f90: New test.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/103715] [11/12/13/14 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
` (8 preceding siblings ...)
2024-03-18 18:41 ` cvs-commit at gcc dot gnu.org
@ 2024-03-19 19:21 ` cvs-commit at gcc dot gnu.org
2024-03-20 21:13 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-19 19:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:9623e5dd70b0d8334ebe093459721d0d447ce4f2
commit r13-8467-g9623e5dd70b0d8334ebe093459721d0d447ce4f2
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Mar 18 19:36:59 2024 +0100
Fortran: error recovery in frontend optimization [PR103715]
gcc/fortran/ChangeLog:
PR fortran/103715
* frontend-passes.cc (check_externals_expr): Prevent invalid read
in case of mismatch of external subroutine with function.
gcc/testsuite/ChangeLog:
PR fortran/103715
* gfortran.dg/pr103715.f90: New test.
(cherry picked from commit 3be2b8f475f22c531d6cef1b041c0573b3ea5133)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/103715] [11/12/13/14 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
` (9 preceding siblings ...)
2024-03-19 19:21 ` cvs-commit at gcc dot gnu.org
@ 2024-03-20 21:13 ` cvs-commit at gcc dot gnu.org
2024-03-20 21:29 ` cvs-commit at gcc dot gnu.org
2024-03-20 21:30 ` anlauf at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-20 21:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:811145b10ff30608bb5ea459ea277219ada4f13d
commit r12-10286-g811145b10ff30608bb5ea459ea277219ada4f13d
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Mar 18 19:36:59 2024 +0100
Fortran: error recovery in frontend optimization [PR103715]
gcc/fortran/ChangeLog:
PR fortran/103715
* frontend-passes.cc (check_externals_expr): Prevent invalid read
in case of mismatch of external subroutine with function.
gcc/testsuite/ChangeLog:
PR fortran/103715
* gfortran.dg/pr103715.f90: New test.
(cherry picked from commit 3be2b8f475f22c531d6cef1b041c0573b3ea5133)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/103715] [11/12/13/14 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
` (10 preceding siblings ...)
2024-03-20 21:13 ` cvs-commit at gcc dot gnu.org
@ 2024-03-20 21:29 ` cvs-commit at gcc dot gnu.org
2024-03-20 21:30 ` anlauf at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-20 21:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:7294f1a7aa457fe24d11270f06fd15c2b3ffd4ab
commit r11-11287-g7294f1a7aa457fe24d11270f06fd15c2b3ffd4ab
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Mar 18 19:36:59 2024 +0100
Fortran: error recovery in frontend optimization [PR103715]
gcc/fortran/ChangeLog:
PR fortran/103715
* frontend-passes.c (check_externals_expr): Prevent invalid read
in case of mismatch of external subroutine with function.
gcc/testsuite/ChangeLog:
PR fortran/103715
* gfortran.dg/pr103715.f90: New test.
(cherry picked from commit 3be2b8f475f22c531d6cef1b041c0573b3ea5133)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/103715] [11/12/13/14 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 since r9-3803-ga5fbc2f36a291cbe
2021-12-14 18:10 [Bug fortran/103715] New: [12 Regression] ICE in gfc_find_gsymbol, at fortran/symbol.c:4301 gscfq@t-online.de
` (11 preceding siblings ...)
2024-03-20 21:29 ` cvs-commit at gcc dot gnu.org
@ 2024-03-20 21:30 ` anlauf at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-03-20 21:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103715
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #12 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-14, and backported to open branches. Closing.
^ permalink raw reply [flat|nested] 14+ messages in thread