Skip to content

Commit 5625686

Browse files
committed
For SCALE intrinsic, correct order of initialization
BZERO 'rslt' after get_item, but before assigning values to 'rslt'.
1 parent dd9b028 commit 5625686

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/flang2/flang2exe/dinit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3097,9 +3097,9 @@ eval_scale(CONST *arg, int type)
30973097
DBLE dconval;
30983098

30993099
rslt = (CONST*)getitem(4, sizeof(CONST));
3100+
BZERO(rslt, CONST, 1);
31003101
rslt->id = AC_CONST;
31013102
rslt->repeatc = 1;
3102-
BZERO(rslt, CONST, 1);
31033103
rslt->dtype = arg->dtype;
31043104

31053105
arg = eval_init_expr(arg);

0 commit comments

Comments
 (0)