diff mbox

libgomp test fixes for FreeBSD

Message ID 52B08CFE.5040604@fgznet.ch
State New
Headers show

Commit Message

Andreas Tobler Dec. 17, 2013, 5:42 p.m. UTC
Hello,

the below patch fixes three unresolved and a FAIL test case in libgomp.
The FAIL test case can be solved with removing the include of the
alloca.h header which is not present on FreeBSD.

On Linux this header will be pulled in via stdlib.h if we define
_GNU_SOURCE. And this we do.

Tested on Linux/x86_64 and FreeBSD11.0 amd64.
On FreeBSD we get all test cases pass. (on Linux too, no regression)

Ok for trunk?

Thanks,
Andreas

2013-12-17  Andreas Tobler  <andreast@gcc.gnu.org>

	* testsuite/libgomp.c/affinity-1.c: Remove alloca.h inlcude.
	* testsuite/libgomp.c/icv-2.c: Add FreeBSD coverage.
	* testsuite/libgomp.c/lock-3.c: Likewise.
	* testsuite/libgomp.c/pr48591.c: Likewise.

Comments

Jakub Jelinek Dec. 17, 2013, 5:54 p.m. UTC | #1
On Tue, Dec 17, 2013 at 06:42:22PM +0100, Andreas Tobler wrote:
> 2013-12-17  Andreas Tobler  <andreast@gcc.gnu.org>
> 
> 	* testsuite/libgomp.c/affinity-1.c: Remove alloca.h inlcude.

In this case please also change the alloca (...) use in the testcase
to __builtin_alloca (...) and update the ChangeLog entry.
Ok with that change.

> 	* testsuite/libgomp.c/icv-2.c: Add FreeBSD coverage.
> 	* testsuite/libgomp.c/lock-3.c: Likewise.
> 	* testsuite/libgomp.c/pr48591.c: Likewise.

	Jakub
Andreas Tobler Dec. 17, 2013, 6:06 p.m. UTC | #2
On 17.12.13 18:54, Jakub Jelinek wrote:
> On Tue, Dec 17, 2013 at 06:42:22PM +0100, Andreas Tobler wrote:
>> 2013-12-17  Andreas Tobler  <andreast@gcc.gnu.org>
>>
>> 	* testsuite/libgomp.c/affinity-1.c: Remove alloca.h inlcude.
> 
> In this case please also change the alloca (...) use in the testcase
> to __builtin_alloca (...) and update the ChangeLog entry.
> Ok with that change.
> 
>> 	* testsuite/libgomp.c/icv-2.c: Add FreeBSD coverage.
>> 	* testsuite/libgomp.c/lock-3.c: Likewise.
>> 	* testsuite/libgomp.c/pr48591.c: Likewise.


Thank you for the review. Done with r206063.

Andreas

2013-12-17  Andreas Tobler  <andreast@gcc.gnu.org>

	* testsuite/libgomp.c/affinity-1.c: Remove alloca.h inlcude.
	Replace	alloca () with __builtin_alloca ().
	* testsuite/libgomp.c/icv-2.c: Add FreeBSD coverage.
	* testsuite/libgomp.c/lock-3.c: Likewise.
	* testsuite/libgomp.c/pr48591.c: Likewise.
diff mbox

Patch

Index: testsuite/libgomp.c/affinity-1.c
===================================================================
--- testsuite/libgomp.c/affinity-1.c	(revision 206062)
+++ testsuite/libgomp.c/affinity-1.c	(working copy)
@@ -23,7 +23,6 @@ 
 #define _GNU_SOURCE
 #endif
 #include "config.h"
-#include <alloca.h>
 #include <omp.h>
 #include <stdio.h>
 #include <stdlib.h>
Index: testsuite/libgomp.c/icv-2.c
===================================================================
--- testsuite/libgomp.c/icv-2.c	(revision 206062)
+++ testsuite/libgomp.c/icv-2.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-do run { target *-*-linux* *-*-gnu* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* *-*-freebsd* } } */
 
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE 1
Index: testsuite/libgomp.c/lock-3.c
===================================================================
--- testsuite/libgomp.c/lock-3.c	(revision 206062)
+++ testsuite/libgomp.c/lock-3.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-do run { target *-*-linux* *-*-gnu* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* *-*-freebsd* } } */
 
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE 1
Index: testsuite/libgomp.c/pr48591.c
===================================================================
--- testsuite/libgomp.c/pr48591.c	(revision 206062)
+++ testsuite/libgomp.c/pr48591.c	(working copy)
@@ -1,5 +1,5 @@ 
 /* PR middle-end/48591 */
-/* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* ia64-*-linux* } } */
+/* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* ia64-*-linux* x86_64-*-freebsd* } } */
 /* { dg-options "-fopenmp" } */
 
 extern void abort (void);