Fix tsvc test build on DragonFly.

Currently all tsvc tests fail to build on DragonFly BSD because they
assume <malloc.h> and memalign() are available.

gcc/testsuite/ChangeLog:

	PR testsuite/104021
	* gcc.dg/vect/tsvc/tsvc.h: Do not include malloc.h on dragonfly
	and use posix_memalign ().

Signed-off-by: Rimvydas Jasinskas <rimvydas.jas@gmail.com>
This commit is contained in:
Rimvydas Jasinskas 2022-01-18 06:27:17 +00:00 committed by Martin Liska
parent 32657045bd
commit 8160b41051

View file

@ -11,7 +11,7 @@
#include <stdio.h>
#include <stdlib.h>
#ifndef __APPLE__
#if !defined(__APPLE__) && !defined(__DragonFly__)
#include <malloc.h>
#endif
#include <string.h>
@ -189,7 +189,7 @@ void set_2d_array(real_t arr[LEN_2D][LEN_2D], real_t value, int stride)
}
void init(int** ip, real_t* s1, real_t* s2){
#if !defined (__APPLE__) && !defined (_AIX)
#if !defined (__APPLE__) && !defined (_AIX) && !defined(__DragonFly__)
xx = (real_t*) memalign(ARRAY_ALIGNMENT, LEN_1D*sizeof(real_t));
*ip = (int *) memalign(ARRAY_ALIGNMENT, LEN_1D*sizeof(real_t));
#else