diff --git a/lib/node_modules/@stdlib/blas/ext/base/dsnannsumors/benchmark/c/benchmark.length.c b/lib/node_modules/@stdlib/blas/ext/base/dsnannsumors/benchmark/c/benchmark.length.c index 0dae157264c7..be24ff027c36 100644 --- a/lib/node_modules/@stdlib/blas/ext/base/dsnannsumors/benchmark/c/benchmark.length.c +++ b/lib/node_modules/@stdlib/blas/ext/base/dsnannsumors/benchmark/c/benchmark.length.c @@ -96,12 +96,13 @@ static float rand_float( void ) { */ static double benchmark1( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; CBLAS_INT n; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -124,6 +125,7 @@ static double benchmark1( int iterations, int len ) { if ( v != v || n < 0 ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; } @@ -136,12 +138,13 @@ static double benchmark1( int iterations, int len ) { */ static double benchmark2( int iterations, int len ) { double elapsed; - float x[ len ]; + float *x; CBLAS_INT n; double v; double t; int i; + x = (float *) malloc( len * sizeof( float ) ); for ( i = 0; i < len; i++ ) { if ( rand_float() < 0.2f ) { x[ i ] = 0.0f / 0.0f; // NaN @@ -164,6 +167,7 @@ static double benchmark2( int iterations, int len ) { if ( v != v || n < 0 ) { printf( "should not return NaN\n" ); } + free( x ); return elapsed; }