* [Bug fortran/77667] ICE in expand_call, at calls.c:2588
[not found] <bug-77667-4@http.gcc.gnu.org/bugzilla/>
@ 2022-01-04 21:49 ` anlauf at gcc dot gnu.org
2022-01-04 22:07 ` anlauf at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-04 21:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77667
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #3 from anlauf at gcc dot gnu.org ---
The following patch seems to work:
diff --git a/gcc/fortran/data.c b/gcc/fortran/data.c
index 839e04277ef..dee38e5de50 100644
--- a/gcc/fortran/data.c
+++ b/gcc/fortran/data.c
@@ -589,6 +589,15 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue,
mpz_t index,
return false;
}
+ if (rvalue->symtree && rvalue->symtree->n.sym
+ && !rvalue->symtree->n.sym->attr.target
+ && !gfc_is_constant_expr (rvalue))
+ {
+ gfc_error ("non-constant initialization expression in DATA statement "
+ "at %L", &rvalue->where);
+ return false;
+ }
+
if (ref || (last_ts->type == BT_CHARACTER
&& rvalue->expr_type == EXPR_CONSTANT))
{
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/77667] ICE in expand_call, at calls.c:2588
[not found] <bug-77667-4@http.gcc.gnu.org/bugzilla/>
2022-01-04 21:49 ` [Bug fortran/77667] ICE in expand_call, at calls.c:2588 anlauf at gcc dot gnu.org
@ 2022-01-04 22:07 ` anlauf at gcc dot gnu.org
2022-01-14 21:31 ` anlauf at gcc dot gnu.org
2022-01-16 20:48 ` anlauf at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-04 22:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77667
--- Comment #4 from anlauf at gcc dot gnu.org ---
(In reply to anlauf from comment #3)
> The following patch seems to work:
... and regtests ok.
It is not really pretty, though, and does not help with apparently related PRs,
such as PR50410.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/77667] ICE in expand_call, at calls.c:2588
[not found] <bug-77667-4@http.gcc.gnu.org/bugzilla/>
2022-01-04 21:49 ` [Bug fortran/77667] ICE in expand_call, at calls.c:2588 anlauf at gcc dot gnu.org
2022-01-04 22:07 ` anlauf at gcc dot gnu.org
@ 2022-01-14 21:31 ` anlauf at gcc dot gnu.org
2022-01-16 20:48 ` anlauf at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-14 21:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77667
--- Comment #5 from anlauf at gcc dot gnu.org ---
Seems fixed on mainline for gcc-12.
Most likely fix: r12-6557 for pr67804.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/77667] ICE in expand_call, at calls.c:2588
[not found] <bug-77667-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2022-01-14 21:31 ` anlauf at gcc dot gnu.org
@ 2022-01-16 20:48 ` anlauf at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-16 20:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77667
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|NEW |RESOLVED
--- Comment #6 from anlauf at gcc dot gnu.org ---
Indeed fixed on mainline by r12-6557.
*** This bug has been marked as a duplicate of bug 67804 ***
^ permalink raw reply [flat|nested] 4+ messages in thread