Multiply instead of doing a left shift of a potentially negative number
fixes GCC ubsan report in the BLAS tests
This commit is contained in:
parent
aa53a8a5cb
commit
0ef4b3f1f2
|
@ -233,9 +233,9 @@ int CNAME(BLASLONG m, BLASLONG n, BLASLONG dummy1, FLOAT alpha_r, FLOAT alpha_i,
|
||||||
if ( m < 1 ) return(0);
|
if ( m < 1 ) return(0);
|
||||||
if ( n < 1 ) return(0);
|
if ( n < 1 ) return(0);
|
||||||
|
|
||||||
inc_x <<= 1;
|
inc_x *= 2;
|
||||||
inc_y <<= 1;
|
inc_y *= 2;
|
||||||
lda <<= 1;
|
lda *= 2;
|
||||||
lda4 = lda << 2;
|
lda4 = lda << 2;
|
||||||
|
|
||||||
xbuffer = buffer;
|
xbuffer = buffer;
|
||||||
|
|
Loading…
Reference in New Issue