aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorFrederik Harwath <frederik@codesourcery.com>2019-12-09 16:30:25 +0000
committerFrederik Harwath <frederik@gcc.gnu.org>2019-12-09 16:30:25 +0000
commit9b4c16f2c93a089d81c9e6f3ea6d1abc36fd1ad1 (patch)
treec0c15ebbebb8fae74affdf821fa13903914e08c9 /gcc/fortran
parent28dd61b782453624f0d10e6ace73b5e20506a4a6 (diff)
downloadgcc-9b4c16f2c93a089d81c9e6f3ea6d1abc36fd1ad1.zip
gcc-9b4c16f2c93a089d81c9e6f3ea6d1abc36fd1ad1.tar.gz
gcc-9b4c16f2c93a089d81c9e6f3ea6d1abc36fd1ad1.tar.bz2
Fix column information for omp_clauses in Fortran code
The location of all OpenMP/OpenACC clauses on any given line in Fortran code always points to the first clause on that line. Hence, the column information is wrong for all clauses but the first one. Use the correct location for each clause instead. 2019-12-09 Frederik Harwath <frederik@codesourcery.com> /gcc/fortran/ * trans-openmp.c (gfc_trans_omp_reduction_list): Pass correct location for each clause to build_omp_clause. From-SVN: r279132
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/trans-openmp.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index c3a4c3a..01866d5 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2019-12-09 Frederik Harwath <frederik@codesourcery.com>
+
+ * trans-openmp.c (gfc_trans_omp_reduction_list): Pass correct location for each
+ clause to build_omp_clause.
+
2018-12-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/92780
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c
index d07ff86..356fd04 100644
--- a/gcc/fortran/trans-openmp.c
+++ b/gcc/fortran/trans-openmp.c
@@ -1982,7 +1982,7 @@ gfc_trans_omp_reduction_list (gfc_omp_namelist *namelist, tree list,
tree t = gfc_trans_omp_variable (namelist->sym, false);
if (t != error_mark_node)
{
- tree node = build_omp_clause (gfc_get_location (&where),
+ tree node = build_omp_clause (gfc_get_location (&namelist->where),
OMP_CLAUSE_REDUCTION);
OMP_CLAUSE_DECL (node) = t;
if (mark_addressable)