This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, fortran] [60/66] inline sum and product: Update the scalarizer: Fix error markers.


This makes the necessary changes for the error markers to be generated at the
right place in the testcase.
that is for:
  foo(        &
   sum(bar,1) &
  )

if sum(bar,1) requires a temporary, the warning is emitted on the second line
instead of the first one, so that one can distinguish between array generated
for the argument, for the function result, etc.
OK?

Attachment: pr43829-60.CL
Description: Text document

diff --git a/array.c b/array.c
index 3e6b9d2..a1449fd 100644
--- a/array.c
+++ b/array.c
@@ -70,6 +70,7 @@ match_subscript (gfc_array_ref *ar, int init, bool match_star)
 
   i = ar->dimen + ar->codimen;
 
+  gfc_gobble_whitespace ();
   ar->c_where[i] = gfc_current_locus;
   ar->start[i] = ar->end[i] = ar->stride[i] = NULL;
 
diff --git a/matchexp.c b/matchexp.c
index 8b99ce9..cd70dc0 100644
--- a/matchexp.c
+++ b/matchexp.c
@@ -201,6 +201,7 @@ match_level_1 (gfc_expr **result)
   locus where;
   match m;
 
+  gfc_gobble_whitespace ();
   where = gfc_current_locus;
   uop = NULL;
   m = match_defined_operator (&uop);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]