aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2016-11-01 16:18:18 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2016-11-01 16:18:18 +0000
commit7f4266d4fdfc7442d11d2c1a5f8c956a577e0813 (patch)
treeb1e0b44e5ee7e4c8ab5172340227f73c4a0f81dc /gcc/fortran
parenta14b1c1c1175cb73167a778dda3a73b5de351a94 (diff)
downloadgcc-7f4266d4fdfc7442d11d2c1a5f8c956a577e0813.zip
gcc-7f4266d4fdfc7442d11d2c1a5f8c956a577e0813.tar.gz
gcc-7f4266d4fdfc7442d11d2c1a5f8c956a577e0813.tar.bz2
re PR fortran/69544 (Internal compiler error with -Wall and where)
2016-11-01 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/69544 * match.c (gfc_match_where): Fill in locus for assigment in simple WHERE statement. 2016-11-01 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/69544 * gfortran.dg/where_5.f90: New test. From-SVN: r241745
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/match.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d3120e5..b3a0d50 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2016-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/69544
+ * match.c (gfc_match_where): Fill in locus for assigment
+ in simple WHERE statement.
+
2016-10-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/54679
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 0996a9e..5ec6e89 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -6275,8 +6275,12 @@ gfc_match_where (gfc_statement *st)
c = gfc_get_code (EXEC_WHERE);
c->expr1 = expr;
+ /* Put in the assignment. It will not be processed by add_statement, so we
+ need to copy the location here. */
+
c->next = XCNEW (gfc_code);
*c->next = new_st;
+ c->next->loc = gfc_current_locus;
gfc_clear_new_st ();
new_st.op = EXEC_WHERE;