Hi Cesar!
Thanks for your review!
08.06.2015, 17:59, "Cesar Philippidis" <cesar@codesourcery.com>:
On 06/07/2015 02:05 PM, Ilmir Usmanov wrote:
Fixed fortran mail-list address. Sorry for inconvenience.
08.06.2015, 00:01, "Ilmir Usmanov" <me@ilmir.us>:
Hi Cesar!
This patch fixes checks of OpenMP and OpenACC continuations in
case if someone mixes them (i.e. continues OpenMP directive with
!$ACC sentinel or vice versa).
OK for gomp branch?
Thanks for working on this. Does this fix PR63858 by any chance?
No problem. I had a feeling that something is wrong in the scanner since
I've committed an initial support of OpenACC ver. 1.0 to gomp branch
(more than a year ago).
Now it does fix the PR, because I've added support of fixed form to the
patch. BTW, your test in the PR has a wrong continuation. Fixed test
added to the patch.
two minor nits...
0001-Fix-mix-of-OpenACC-and-OpenMP-sentinels-in-continuat.patch
From 5492bf5bc991b6924f5e3b35c11eeaed745df073 Mon Sep 17 00:00:00 2001
From: Ilmir Usmanov <i.usmanov@samsung.com>
Date: Sun, 7 Jun 2015 23:55:22 +0300
Subject: [PATCH] Fix mix of OpenACC and OpenMP sentinels in continuation
---
gcc/fortran/ChangeLog | 5 +++++
Use ChangeLog.gomp for gomp-4_0-branch.
Done.
+ /* In case we have an OpenMP directive continued by OpenACC
+ sentinel, or vice versa, we get both openmp_flag and
+ openacc_flag on. */
+
+ if (openacc_flag && openmp_flag)
+ {
+ int is_openmp = 0;
+ for (i = 0; i < 5; i++, c = next_char ())
+ {
+ if (gfc_wide_tolower (c) != (unsigned char) "!$acc"[i])
+ is_openmp = 1;
+ if (i == 4)
+ old_loc = gfc_current_locus;
+ }
+ gfc_error ("Wrong %s continuation at %C: expected %s, got %s",
+ is_openmp ? "OpenACC" : "OpenMP",
+ is_openmp ? "!$ACC" : "!$OMP",
+ is_openmp ? "!$OMP" : "!$ACC");
I think it's better for the translation project if you made this a
complete string. So maybe change this line into
gfc_error (is_openmp ? "Wrong continuation at %C: expected !$ACC, got"
" !$OMP",
: "Wrong continuation at %C: expected !$OMP, got !$ACC");
Done
Other than that, it looks fine.
Thanks,
Cesar
OK for gomp branch?
--
Ilmir.