affinity-1.c: Remove alloca.h inlcude.

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.

From-SVN: r206063
This commit is contained in:
Andreas Tobler 2013-12-17 19:05:32 +01:00
parent 5a2075280a
commit ae246f7f1d
5 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,11 @@
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.
2013-12-17 Jakub Jelinek <jakub@redhat.com>
PR testsuite/59534

View File

@ -23,7 +23,6 @@
#define _GNU_SOURCE
#endif
#include "config.h"
#include <alloca.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
@ -117,7 +116,7 @@ print_affinity (struct place p)
size = sizeof (cpu_set_t);
}
}
cpu_set_t *cpusetp = (cpu_set_t *) alloca (size);
cpu_set_t *cpusetp = (cpu_set_t *) __builtin_alloca (size);
if (pthread_getaffinity_np (pthread_self (), size, cpusetp) == 0)
{
unsigned long i, len, max = 8 * size;

View File

@ -1,4 +1,4 @@
/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-do run { target *-*-linux* *-*-gnu* *-*-freebsd* } } */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1

View File

@ -1,4 +1,4 @@
/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-do run { target *-*-linux* *-*-gnu* *-*-freebsd* } } */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1

View File

@ -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);