mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-13 11:21:18 +08:00
libgomp.oacc-c-c++-common/loop-gwv-2.c: Use __builtin_alloca
Some systems do not have <alloca.h> but provide alloca differently, e.g. via stdlib.h. Do it like other testcases do and use __builtin_alloca. libgomp/ChangeLog: PR testsuite/102910 * testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c: Use __builtin_alloca instead of #include <alloca.h> + alloca.
This commit is contained in:
parent
c49f389e3d
commit
72dc270be7
@ -6,7 +6,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <openacc.h>
|
||||
#include <alloca.h>
|
||||
#include <string.h>
|
||||
#include <gomp-constants.h>
|
||||
#include <stdlib.h>
|
||||
@ -78,9 +77,9 @@ int main ()
|
||||
vectorsize = __builtin_goacc_parlevel_size (GOMP_DIM_VECTOR);
|
||||
}
|
||||
|
||||
gangdist = (int *) alloca (gangsize * sizeof (int));
|
||||
workerdist = (int *) alloca (workersize * sizeof (int));
|
||||
vectordist = (int *) alloca (vectorsize * sizeof (int));
|
||||
gangdist = (int *) __builtin_alloca (gangsize * sizeof (int));
|
||||
workerdist = (int *) __builtin_alloca (workersize * sizeof (int));
|
||||
vectordist = (int *) __builtin_alloca (vectorsize * sizeof (int));
|
||||
memset (gangdist, 0, gangsize * sizeof (int));
|
||||
memset (workerdist, 0, workersize * sizeof (int));
|
||||
memset (vectordist, 0, vectorsize * sizeof (int));
|
||||
|
Loading…
x
Reference in New Issue
Block a user