[Patch 4/5] OpenACC tile clause support, Fortran front-end parts

Cesar Philippidis cesar@codesourcery.com
Sat Nov 12 16:51:00 GMT 2016


On 11/11/2016 02:34 AM, Jakub Jelinek wrote:
> On Thu, Nov 10, 2016 at 06:46:46PM +0800, Chung-Lin Tang wrote:

And here's the patch.

Cesar

>> 2016-XX-XX  Cesar Philippidis  <cesar@codesourcery.com>
>>
>> 	fortran/
>> 	* openmp.c (resolve_oacc_positive_int_expr): Promote the warning
>> 	to an error.
>> 	(resolve_oacc_loop_blocks): Use integer zero to represent the '*'
>> 	tile argument.
>> 	(resolve_omp_clauses): Error on directives containing both tile
>> 	and collapse clauses.
>> 	* trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
>> 	collapsed loops.
>>
>>
>> 	gcc/testsuite/
>> 	* gfortran.dg/goacc/loop-2.f95: Change expected tile clause
>>         warnings to errors.
>>         * gfortran.dg/goacc/loop-5.f95: Likewise.
>>         * gfortran.dg/goacc/sie.f95: Likewise.
>>         * gfortran.dg/goacc/tile-1.f90: New test.
>>         * gfortran.dg/goacc/tile-2.f90: New test
>>         * gfortran.dg/goacc/tile-lowering.f95: New test.
> 
> Again, 8 spaces in ChangeLog.  Missing full stop after New test
> 
>> --- fortran/openmp.c	(revision 241809)
>> +++ fortran/openmp.c	(working copy)
>> @@ -3024,8 +3024,8 @@ resolve_oacc_positive_int_expr (gfc_expr *expr, co
>>    resolve_oacc_scalar_int_expr (expr, clause);
>>    if (expr->expr_type == EXPR_CONSTANT && expr->ts.type == BT_INTEGER
>>        && mpz_sgn(expr->value.integer) <= 0)
>> -    gfc_warning (0, "INTEGER expression of %s clause at %L must be positive",
>> -		     clause, &expr->where);
>> +    gfc_error ("INTEGER expression of %s clause at %L must be positive",
>> +	       clause, &expr->where);
>>  }
> 
> This can't be against current trunk.  The current routine is shared with
> OpenMP and gfc_error is undesirable there.
> 
>> @@ -3859,6 +3859,8 @@ resolve_omp_clauses (gfc_code *code, gfc_omp_claus
>>      if (omp_clauses->wait_list)
>>        for (el = omp_clauses->wait_list; el; el = el->next)
>>  	resolve_oacc_scalar_int_expr (el->expr, "WAIT");
>> +  if (omp_clauses->collapse && omp_clauses->tile_list)
>> +    gfc_error ("Incompatible use of TILE and COLLAPSE at %L", &code->loc);
> 
> Shouldn't you in that case for error recovery clear collapse (or tile_list)?
> 
> 	Jakub
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: routine-cxx-fe.diff
Type: text/x-patch
Size: 17243 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161112/35df2910/attachment.bin>


More information about the Gcc-patches mailing list