diff mbox

FWD: Re: OpenACC subarray specifications in the GCC Fortran front end

Message ID 53DC10E0.1080100@codesourcery.com
State New
Headers show

Commit Message

Cesar Philippidis Aug. 1, 2014, 10:12 p.m. UTC
On 08/01/2014 12:48 AM, Jakub Jelinek wrote:
> On Wed, Jul 23, 2014 at 05:42:32PM -0700, Cesar Philippidis wrote:
>>>> Jakub, before your Fortran OpenMP 4 target changes, Ilmir had written the
>>>> test case gcc/testsuite/gfortran.dg/gomp/map-1.f90 (based on his
>>>> interpretation and implementation of OpenMP 4 target), which I have now
>>>> amended with XFAILs and changed error messages -- anything in there that
>>>> you'd like to see addressed for Fortran OpenMP 4 target?
>>>
>>>> +  !$omp target map(j(5:4)) ! { dg-error "Lower bound of OpenMP array section in greater than upper" "" { xfail *-*-* } }
>>>> +  !$omp end target
>>>
>>> I think this isn't an error in Fortran, if low bound is above upper bound,
>>> then it is considered a zero size array section.  Though supposedly for
>>> depend clause we might want to diagnose that.
>>>
>>>> +  !$omp target map(aas) ! { dg-error "The upper bound in the last dimension must appear" "" { xfail *-*-* } }
>>>> +  !$omp end target
>>>
>>> Assumed-size in map without array section would be indeed nice thing to
>>> diagnose.
>>>
>>>> +  !$omp target map(tt%i) ! { dg-error "Syntax error in OpenMP variable list" }
>>>> +  !$omp end target ! { dg-bogus "Unexpected !\\\$OMP END TARGET statement" "" { xfail *-*-* } }
>>>
>>> Right now the parsing of !$omp directives in case of parsing error rejects
>>> the whole directive, perhaps it should be reconsidered unless it is a fatal
>>> error from which there is no easy way out.
>>>
>>>> +  !$omp target map(tt%j(1)) ! { dg-bogus "Syntax error in OpenMP variable list" "" { xfail *-*-* } }
>>>> +  !$omp end target ! { dg-bogus "Unexpected !\\\$OMP END TARGET statement" "" { xfail *-*-* } }
>>>> +
>>>> +  !$omp target map(tt%j(1:)) ! { dg-bogus "Syntax error in OpenMP variable list" "" { xfail *-*-* } }
>>>> +  !$omp end target ! { dg-bogus "Unexpected !\\\$OMP END TARGET statement" "" { xfail *-*-* } }
>>>
>>> These two are pending resolution on omp-lang, I had exchanged a few mails
>>> about it, I think we shouldn't support those for consistency with the C/C++
>>> support, where tt.j[1] or tt.j[1:] and similar is explicitly invalid.
>>
>> Jakub, should I drop the map-1.f90 test?
> 
> Not the whole testcase, just the problematic parts (or, just remove the
> dg-error/xfail or replace dg-bogus xfail with dg-error), for the j(5:4)
> and tt%j(1)/tt%j(1:) cases?

Thank you for the feedback. I've committed those changes to gomp-4_0-branch.

Cesar
diff mbox

Patch

2014-08-01  Cesar Philippidis  <cesar@codesourcery.com>

	gcc/testsuite/
	* gfortran.dg/gomp/map-1.f90 (test): Update error reporting.


diff --git a/gcc/testsuite/gfortran.dg/gomp/map-1.f90 b/gcc/testsuite/gfortran.dg/gomp/map-1.f90
index de96ed2..e4b8b86 100644
--- a/gcc/testsuite/gfortran.dg/gomp/map-1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/map-1.f90
@@ -45,7 +45,7 @@  subroutine test(aas)
   !$omp target map(j(0:)) ! { dg-warning "out of bounds" }
   !$omp end target
 
-  !$omp target map(j(5:4)) ! { dg-error "Lower bound of OpenMP array section in greater than upper" "" { xfail *-*-* } }
+  !$omp target map(j(5:4))
   !$omp end target
 
   !$omp target map(j(5:))
@@ -93,16 +93,17 @@  subroutine test(aas)
   !$omp end target
 
   !$omp target map(tt%i) ! { dg-error "Syntax error in OpenMP variable list" }
-  !$omp end target ! { dg-bogus "Unexpected !\\\$OMP END TARGET statement" "" { xfail *-*-* } }
+  !$omp end target ! { dg-error "Unexpected !\\\$OMP END TARGET statement" }
 
   !$omp target map(tt%j) ! { dg-error "Syntax error in OpenMP variable list" }
-  !$omp end target ! { dg-bogus "Unexpected !\\\$OMP END TARGET statement" "" { xfail *-*-* } }
+  !$omp end target ! { dg-error "Unexpected !\\\$OMP END TARGET statement" }
 
-  !$omp target map(tt%j(1)) ! { dg-bogus "Syntax error in OpenMP variable list" "" { xfail *-*-* } }
-  !$omp end target ! { dg-bogus "Unexpected !\\\$OMP END TARGET statement" "" { xfail *-*-* } }
+  ! broken test
+  !$omp target map(tt%j(1)) ! { dg-error "Syntax error in OpenMP variable list" }
+  !$omp end target ! { dg-error "Unexpected !\\\$OMP END TARGET statement" }
 
-  !$omp target map(tt%j(1:)) ! { dg-bogus "Syntax error in OpenMP variable list" "" { xfail *-*-* } }
-  !$omp end target ! { dg-bogus "Unexpected !\\\$OMP END TARGET statement" "" { xfail *-*-* } }
+  !$omp target map(tt%j(1:)) ! { dg-error "Syntax error in OpenMP variable list" }
+  !$omp end target ! { dg-error "Unexpected !\\\$OMP END TARGET statement" }
 
   !$omp target map(tp) ! { dg-error "THREADPRIVATE object 'tp' in MAP clause" }
   !$omp end target