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]

Re: [GOMP4, OpenACC] Fixed-form Fortran code failing to parse


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


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