This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [GOMP4, OpenACC] Fixed-form Fortran code failing to parse
- From: Cesar Philippidis <cesar at codesourcery dot com>
- To: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>, Thomas Schwinge <thomas at codesourcery dot com>, <i dot usmanov at samsung dot com>, <e dot gavrin at samsung dot com>, <v dot garbuzov at samsung dot com>, <dmitry dot b at samsung dot com>, <jnorris at codesourcery dot com>, <gcc-patches at gcc dot gnu dot org>, <fortran at gcc dot gnu dot org>
- Date: Tue, 8 Jul 2014 07:14:24 -0700
- Subject: Re: [GOMP4, OpenACC] Fixed-form Fortran code failing to parse
- Authentication-results: sourceware.org; auth=none
- References: <20140708092129 dot GA29471 at physik dot fu-berlin dot de>
On 07/08/2014 02:21 AM, Tobias Burnus wrote:
> Cesar Philippidis wrote:
>> Thomas, is this OK for gomp-4_0-branch?
> ...
>
>
>> * gcc/fortran/scanner.c (gfc_next_char_literal): Fix the scan for
>> *$acc.
>
> This changes looks good to me.
>
>> * parse.c (next_fixed): Don't handle openmp pragmas when scanning
>> for openacc pragmas.
>
> This one doesn't. If both -fopenmp(-simd) and -fopenacc are both specified,
> parsing of $omp *and* $acc are both disabled, which does not seem to be
> what is intended.
>
>
> The current code does:
>
> 1066 if ((gfc_option.gfc_flag_openmp
> 1067 || gfc_option.gfc_flag_openmp_simd)
> 1068 && !gfc_option.gfc_flag_openacc)
> ...
> 1074 else if ((gfc_option.gfc_flag_openmp
> 1075 || gfc_option.gfc_flag_openmp_simd)
> 1076 && gfc_option.gfc_flag_openacc)
> ...
> 1092 else if (gfc_option.gfc_flag_openacc)
>
>
> The proposed patch keeps
>
> 1066 if ((gfc_option.gfc_flag_openmp
> 1067 || gfc_option.gfc_flag_openmp_simd)
> 1068 && !gfc_option.gfc_flag_openacc)
> ...
>
> and then it uses:
> + else if (gfc_option.gfc_flag_openacc
> + && !(gfc_option.gfc_flag_openmp
> + || gfc_option.gfc_flag_openmp_simd))
>
> ...
> - else if (gfc_option.gfc_flag_openacc)
>
>
> Thus, from my side this patch is NOT OK.
Thanks for the review. I've committed the scanner portion of this patch.
Cesar