[Bug fortran/107075] ICE in get, at cgraph.h:461

2022-10-06 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107075 --- Comment #6 from anlauf at gcc dot gnu.org --- I tried the following patch, which however regresses on a couple testcases: diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc index d9d101775f6..cfc6fc055bd 100644 --- a/gcc/fortran/re

[Bug fortran/107075] ICE in get, at cgraph.h:461

2022-10-06 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107075 --- Comment #5 from anlauf at gcc dot gnu.org --- There is a check in expr.cc:2623 that is reached if one changes the testcase to a subroutine, but not if it is a program: 4615 if (!attr.save && rvalue->expr_type == EXPR_VARIABLE 4616

[Bug fortran/107075] ICE in get, at cgraph.h:461

2022-09-29 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107075 --- Comment #4 from anlauf at gcc dot gnu.org --- (In reply to Mikael Morin from comment #3) > (In reply to Richard Biener from comment #2) > > > > But maybe 'z' shouldn't be of static storage duration ... > > No, I think it shouldn't. A shoul

[Bug fortran/107075] ICE in get, at cgraph.h:461

2022-09-29 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107075 Mikael Morin changed: What|Removed |Added CC||mikael at gcc dot gnu.org --- Comment #3

[Bug fortran/107075] ICE in get, at cgraph.h:461

2022-09-29 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107075 --- Comment #2 from Richard Biener --- There's a static variable ('z') with an initializer that refers to an automatic variable ('a'). The appropriate way to runtime initialize is not with DECL_INITIAL but instead with an INIT_EXPR or MODIFY_EX

[Bug fortran/107075] ICE in get, at cgraph.h:461

2022-09-28 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107075 anlauf at gcc dot gnu.org changed: What|Removed |Added Last reconfirmed||2022-09-28 Ever confirme