aboutsummaryrefslogtreecommitdiffstats
path: root/test/c/fft.c
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-09-10 17:50:42 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-09-10 17:50:42 +0200
commit5b6c019a507688dfcf63b9ef54f7731137422ab5 (patch)
treee9b5e653c1facbedc8756c1320f5ac9563695c80 /test/c/fft.c
parent8caa5a2e1f825b6e3d6b87e294c1a53c65d62612 (diff)
downloadcompcert-kvx-5b6c019a507688dfcf63b9ef54f7731137422ab5.tar.gz
compcert-kvx-5b6c019a507688dfcf63b9ef54f7731137422ab5.zip
Starting to modify official CompCert tests to be passable with the simu
Diffstat (limited to 'test/c/fft.c')
-rw-r--r--test/c/fft.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/c/fft.c b/test/c/fft.c
index 2bd55a18..f91f5300 100644
--- a/test/c/fft.c
+++ b/test/c/fft.c
@@ -3,6 +3,7 @@
by: Dave Edelblute, edelblut@cod.nosc.mil, 05 Jan 1993
*/
+#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
@@ -151,13 +152,15 @@ int main(int argc, char ** argv)
double enp, t, y, z, zr, zi, zm, a;
double * xr, * xi, * pxr, * pxi;
- if (argc >= 2) n = atoi(argv[1]); else n = 18;
+ if (argc >= 2) n = atoi(argv[1]); else n = 12;
np = 1 << n;
enp = np;
npm = np / 2 - 1;
t = PI / enp;
xr = calloc(np, sizeof(double));
+ assert(xr != NULL && "xr calloc failed");
xi = calloc(np, sizeof(double));
+ assert(xi != NULL && "xi calloc failed");
pxr = xr;
pxi = xi;
for (nruns = 0; nruns < NRUNS; nruns++) {