diff mbox

[testsuite] Add missing dg-require-effective-target alloca to gcc testsuite

Message ID 57fe5b00-f121-1b0c-5515-5267b4b08002@mentor.com
State New
Headers show

Commit Message

Tom de Vries April 27, 2017, 10:04 p.m. UTC
On 04/26/2017 01:57 PM, Jakub Jelinek wrote:
> I guess those should be decided case by case
> whether we want relative, absolute or saved line numbers.  If the
> diagnostic is within the same function or code block as the stuff it is
> relative to, relative is fine, but if e.g. the messages are just at the end
> of file and there are unrelated functions in between, it is not a good idea

I've written attached patches:
- replace absolute linenrs in objc.dg,obj-c++.dg
- replace absolute linenrs in gfortran.dg
and tested them on x86_64 with -m64/-m32.

OK for trunk?

Thanks,
- Tom

Comments

Jeff Law April 28, 2017, 3:53 p.m. UTC | #1
On 04/27/2017 04:04 PM, Tom de Vries wrote:
> On 04/26/2017 01:57 PM, Jakub Jelinek wrote:
>> I guess those should be decided case by case
>> whether we want relative, absolute or saved line numbers.  If the
>> diagnostic is within the same function or code block as the stuff it is
>> relative to, relative is fine, but if e.g. the messages are just at 
>> the end
>> of file and there are unrelated functions in between, it is not a good 
>> idea
> 
> I've written attached patches:
> - replace absolute linenrs in objc.dg,obj-c++.dg
> - replace absolute linenrs in gfortran.dg
> and tested them on x86_64 with -m64/-m32.
> 
> OK for trunk?
> 
> Thanks,
> - Tom
> 
> 0001-Replace-absolute-linenrs-in-objc.dg-obj-c-.dg.patch
> 
> 
> Replace absolute linenrs in objc.dg,obj-c++.dg
> 
> 2017-04-25  Tom de Vries<tom@codesourcery.com>
> 
> 	* obj-c++.dg/bitfield-1.mm: Replace absolute linenrs.
> 	* obj-c++.dg/bitfield-4.mm: Same.
> 	* obj-c++.dg/bitfield-5.mm: Same.
> 	* obj-c++.dg/exceptions-3.mm: Same.
> 	* obj-c++.dg/exceptions-5.mm: Same.
> 	* obj-c++.dg/method-1.mm: Same.
> 	* obj-c++.dg/method-12.mm: Same.
> 	* obj-c++.dg/method-13.mm: Same.
> 	* obj-c++.dg/method-15.mm: Same.
> 	* obj-c++.dg/method-16.mm: Same.
> 	* obj-c++.dg/property/at-property-18.mm: Same.
> 	* obj-c++.dg/property/at-property-25.mm: Same.
> 	* obj-c++.dg/property/at-property-5.mm: Same.
> 	* obj-c++.dg/property/dynamic-2.mm: Same.
> 	* obj-c++.dg/property/property-neg-3.mm: Same.
> 	* obj-c++.dg/protocol-inheritance-1.mm: Same.
> 	* obj-c++.dg/protocol-inheritance-2.mm: Same.
> 	* obj-c++.dg/syntax-error-1.mm: Same.
> 	* obj-c++.dg/try-catch-13.mm: Same.
> 	* objc.dg/bitfield-4.m: Same.
> 	* objc.dg/class-1.m: Same.
> 	* objc.dg/method-11.m: Same.
> 	* objc.dg/method-6.m: Same.
> 	* objc.dg/method-7.m: Same.
> 	* objc.dg/method-9.m: Same.
> 	* objc.dg/missing-proto-3.m: Same.
> 	* objc.dg/naming-2.m: Same.
> 	* objc.dg/property/at-property-16.m: Same.
> 	* objc.dg/property/at-property-18.m: Same.
> 	* objc.dg/property/at-property-25.m: Same.
> 	* objc.dg/property/at-property-5.m: Same.
> 	* objc.dg/property/dynamic-2.m: Same.
> 	* objc.dg/property/property-neg-3.m: Same.
> 	* objc.dg/protocol-inheritance-1.m: Same.
> 	* objc.dg/protocol-inheritance-2.m: Same.
OK.
jeff
diff mbox

Patch

Replace absolute linenrs in gfortran.dg

2017-04-25  Tom de Vries  <tom@codesourcery.com>

	* gfortran.dg/gomp/appendix-a/a.24.1.f90: Replace absolute linenrs.
	* gfortran.dg/gomp/appendix-a/a.31.3.f90: Same.

---
 .../gfortran.dg/gomp/appendix-a/a.24.1.f90         |  6 ++---
 .../gfortran.dg/gomp/appendix-a/a.31.3.f90         | 26 ++++++++++------------
 2 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90
index 802577b..52a2cbb 100644
--- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90
@@ -11,7 +11,7 @@ 
 !$OMP THREADPRIVATE(/BLOCKX/)
       INTEGER I, J
       i=1
-!$OMP PARALLEL DEFAULT(NONE) PRIVATE(A) SHARED(Z) PRIVATE(J)
+!$OMP PARALLEL DEFAULT(NONE) PRIVATE(A) SHARED(Z) PRIVATE(J) ! { dg-line omp_parallel }
       J = OMP_GET_NUM_THREADS();
                ! O.K. - J is listed in PRIVATE clause
       A = Z(J) ! O.K. - A is listed in PRIVATE clause
@@ -19,8 +19,8 @@ 
       X=1      ! O.K. - X is THREADPRIVATE
       Z(I) = Y ! Error - cannot reference I or Y here
 ! { dg-error "'i' not specified" "" { target *-*-* } .-1 } */
-! { dg-error "enclosing 'parallel'" "" { target *-*-* } 14 } */
-! { dg-error "'y' not specified" "" { target *-*-* } 20 }  */
+! { dg-error "enclosing 'parallel'" "" { target *-*-* } omp_parallel } */
+! { dg-error "'y' not specified" "" { target *-*-* } .-3 }  */
 !$OMP DO firstprivate(y)
       DO I = 1,10
         Z(I) = Y ! O.K. - I is the loop iteration variable
diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90
index 598c904..7de656a 100644
--- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90
@@ -1,15 +1,13 @@ 
 ! { dg-do compile }
-        PROGRAM A31_3_WRONG
-        MAX = HUGE(0)
-        M=0
-        !$OMP PARALLEL DO REDUCTION(MAX: M) ! MAX is no longer the
-                                            ! intrinsic so this
-                                            ! is non-conforming
-! { dg-error "OMP DECLARE REDUCTION max not found" "" { target *-*-* } 5 } */
-        DO I = 1, 100
-        CALL SUB(M,I)
-        END DO
-        END PROGRAM A31_3_WRONG
-        SUBROUTINE SUB(M,I)
-        M = MAX(M,I)
-        END SUBROUTINE SUB
+PROGRAM A31_3_WRONG
+  MAX = HUGE(0)
+  M=0
+  !$OMP PARALLEL DO REDUCTION(MAX: M) ! MAX is no longer the intrinsic so this is non-conforming
+  ! { dg-error "OMP DECLARE REDUCTION max not found" "" { target *-*-* } .-1 } */
+  DO I = 1, 100
+     CALL SUB(M,I)
+  END DO
+END PROGRAM A31_3_WRONG
+SUBROUTINE SUB(M,I)
+  M = MAX(M,I)
+END SUBROUTINE SUB