Commit d61bff85 by Andreas Tobler

Testsuite, remove alloca header

2019-10-02  Andreas Tobler  <andreast@gcc.gnu.org>

	* testsuite/libgomp.oacc-c-c++-common/loop-default.h: Remove alloca.h
	include. Replace alloca () with __builtin_alloca ().
	* testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Likewise.

Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>

From-SVN: r276479
parent c20a90e0
2019-10-02 Andreas Tobler <andreast@gcc.gnu.org>
* testsuite/libgomp.oacc-c-c++-common/loop-default.h: Remove alloca.h
include. Replace alloca () with __builtin_alloca ().
* testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Likewise.
2019-10-01 Jakub Jelinek <jakub@redhat.com> 2019-10-01 Jakub Jelinek <jakub@redhat.com>
* configure.ac: Remove GCC_HEADER_STDINT(gstdint.h). * configure.ac: Remove GCC_HEADER_STDINT(gstdint.h).
......
#include <openacc.h> #include <openacc.h>
#include <alloca.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <gomp-constants.h> #include <gomp-constants.h>
...@@ -28,9 +27,9 @@ check (const int *ary, int size, int gp, int wp, int vp) ...@@ -28,9 +27,9 @@ check (const int *ary, int size, int gp, int wp, int vp)
{ {
int exit = 0; int exit = 0;
int ix; int ix;
int *gangs = (int *)alloca (gp * sizeof (int)); int *gangs = (int *)__builtin_alloca (gp * sizeof (int));
int *workers = (int *)alloca (wp * sizeof (int)); int *workers = (int *)__builtin_alloca (wp * sizeof (int));
int *vectors = (int *)alloca (vp * sizeof (int)); int *vectors = (int *)__builtin_alloca (vp * sizeof (int));
int offloaded = 0; int offloaded = 0;
memset (gangs, 0, gp * sizeof (int)); memset (gangs, 0, gp * sizeof (int));
......
/* { dg-additional-options "-fopenacc-dim=16:16" } */ /* { dg-additional-options "-fopenacc-dim=16:16" } */
#include <openacc.h> #include <openacc.h>
#include <alloca.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <gomp-constants.h> #include <gomp-constants.h>
...@@ -28,9 +27,9 @@ int check (const int *ary, int size, int gp, int wp, int vp) ...@@ -28,9 +27,9 @@ int check (const int *ary, int size, int gp, int wp, int vp)
{ {
int exit = 0; int exit = 0;
int ix; int ix;
int *gangs = (int *)alloca (gp * sizeof (int)); int *gangs = (int *)__builtin_alloca (gp * sizeof (int));
int *workers = (int *)alloca (wp * sizeof (int)); int *workers = (int *)__builtin_alloca (wp * sizeof (int));
int *vectors = (int *)alloca (vp * sizeof (int)); int *vectors = (int *)__builtin_alloca (vp * sizeof (int));
int offloaded = 0; int offloaded = 0;
memset (gangs, 0, gp * sizeof (int)); memset (gangs, 0, gp * sizeof (int));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment