On 11/04/2015 09:15 AM, Thomas Schwinge wrote:

>> --- a/gcc/fortran/trans-openmp.c
>> +++ b/gcc/fortran/trans-openmp.c
> 
>> @@ -3449,16 +3478,28 @@ gfc_trans_oacc_combined_directive (gfc_code *code)
>>            sizeof (construct_clauses));
>>        loop_clauses.collapse = construct_clauses.collapse;
>> [...]
>> -      construct_clauses.collapse = 0;
> 
> Again I'm confused by this, why this is being removed, as earlier in
> <http://news.gmane.org/find-root.php?message_id=%3C87vb9r45qw.fsf%40kepler.schwinge.homeip.net%3E>.

I'm not sure why, but gfc_trans_omp_do needs it. It's probably an openmp
thing. If you look at gfc_trans_omp_do, you'll see that two sets of
clauses are passed into it. code->ext.omp_clauses corresponds to the
combined construct clauses and do_clauses are the filtered out ones.

So in order to get collapse to work as expected in combined loops, I
can't zero out construct_clauses.collapse.

>> --- /dev/null
>> +++ b/gcc/testsuite/gfortran.dg/goacc/combined-directives.f90
> 
> I suggest you also merge the existing
> gcc/testsuite/gfortran.dg/goacc/combined_loop.f90 into your new test case
> file (consistent naming, with the other combined-directives* files).

OK, but it depends on what type of things combined_loop.f90 is checking.
If it's scanning gimple, it may have to be a separate file.

>> @@ -0,0 +1,152 @@
>> +! Exercise combined OpenACC directives.
>> +
>> +! { dg-do compile }
>> +! { dg-options "-fopenacc -fdump-tree-gimple" }
>> +
>> +! { dg-prune-output "sorry, unimplemented" }
> 
> What's still unimplemented here?  Please add a comment, or put the
> dg-prune-output directive next to the offending OpenACC directive, so
> we'll be sure to remove it later on.

I was still seeing those sorry messages. I'll put a comment on them.

>> --- /dev/null
>> +++ b/gcc/testsuite/gfortran.dg/goacc/loop-5.f95
>> @@ -0,0 +1,363 @@
>> +! { dg-do compile }
>> +! { dg-additional-options "-fmax-errors=100" }
>> +
>> +! { dg-prune-output "sorry, unimplemented" }
> 
> Likewise.
> 
>> +! { dg-prune-output "Error: work-sharing region" }
> 
> What's the intention of this?  If we're expecting this error, place
> dg-error directives where they belong?

Trunk is missing some acc loop nesting verification code in omp-low.c
that's present in gomp4. I'm not sure who's going to port that to trunk.
I'll add a comment in this test to remove it with the sorry messages
when appropriate.

>> --- /dev/null
>> +++ b/gcc/testsuite/gfortran.dg/goacc/loop-6.f95
>> @@ -0,0 +1,80 @@
>> +! { dg-do compile }
>> +! { dg-additional-options "-fmax-errors=100" }
>> +
>> +! { dg-prune-output "sorry, unimplemented" }
> 
> Likewise.
> 
>> +! { dg-prune-output "Error: work-sharing region" }
> 
> Likewise.
> 
>> --- a/gcc/testsuite/gfortran.dg/goacc/loop-tree-1.f90
>> +++ b/gcc/testsuite/gfortran.dg/goacc/loop-tree-1.f90
>> @@ -3,6 +3,9 @@
>>  
>>  ! test for tree-dump-original and spaces-commas
>>  
>> +! { dg-prune-output "sorry, unimplemented" }
> 
> Likewise.
> 
>> +! { dg-prune-output "Error: work-sharing region" }
> 
> Likewise.
> 
>> --- a/gcc/testsuite/gfortran.dg/goacc/parallel-tree.f95
>> +++ b/gcc/testsuite/gfortran.dg/goacc/parallel-tree.f95
>> @@ -37,4 +37,3 @@ end program test
>>  
>>  ! { dg-final { scan-tree-dump-times "map\\(force_deviceptr:u\\)" 1 
>> "original" } } 
>>  ! { dg-final { scan-tree-dump-times "private\\(v\\)" 1 "original" } } 
>> -! { dg-final { scan-tree-dump-times "firstprivate\\(w\\)" 1 "original" } } 
> 
> Which of your source code changes does this change related to?

I think Nathan made this change because he found a bug in the test or
something. I just included this test because trunk should be capable to
handle it now.

Cesar

Reply via email to