[Patch, fortran] PR20876 - Subroutine call in FORALL block not PURE
THOMAS Paul Richard 169137
Paul.Richard.THOMAS@cea.fr
Tue Jun 20 10:17:00 GMT 2006
A segfault occurred when a non-pure subroutine was used for a defined assignment
in a forall statement. This came about because the locus for the forall
statement code was never set. This morning, as part of a big commit, I corrected
trunk, under the "obvious rule". You will find the patch below. I will update
4.1 in a few days time.
It should be noted that correct code compiled without problems.
Cheers
Paul
2006-06-20 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20876
* match.c (gfc_match_forall): Add missing locus to gfc_code.
Index: gcc/fortran/match.c
===================================================================
--- gcc/fortran/match.c (révision 114599)
+++ gcc/fortran/match.c (copie de travail)
@@ -3578,6 +3578,7 @@
c = gfc_get_code ();
*c = new_st;
+ c->loc = gfc_current_locus;
if (gfc_match_eos () != MATCH_YES)
goto syntax;
More information about the Gcc-patches
mailing list