Skip to content

Commit b873470

Browse files
authored
Merge pull request #126 from ThePortlandGroup/nv_stage
Pull 2017-07-05T11-04 Recent NVIDIA Changes
2 parents 6c56450 + ab6befc commit b873470

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/flang1/flang1exe/semant3.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5697,7 +5697,7 @@ construct_association(int lhs_sptr, SST *rhs, int stmt_dtype, LOGICAL is_class)
56975697
LOGICAL is_lhs_unl_poly;
56985698
int rhs_descriptor_ast = 0;
56995699
LOGICAL does_lhs_need_runtime_type;
5700-
int lhs_length_ast;
5700+
int lhs_length_ast = 0;
57015701

57025702
if (!(rhs_ast = SST_ASTG(rhs))) {
57035703
mkexpr(rhs);
@@ -5878,7 +5878,8 @@ construct_association(int lhs_sptr, SST *rhs, int stmt_dtype, LOGICAL is_class)
58785878
/* Generate code to initialize, when necessary, the byte length field
58795879
* in the left-hand side's descriptor, if it exists.
58805880
*/
5881-
lhs_length_ast = symbol_descriptor_length_ast(lhs_sptr, 0 /*no AST*/);
5881+
if (is_lhs_runtime_length_char || is_lhs_unl_poly || is_array)
5882+
lhs_length_ast = symbol_descriptor_length_ast(lhs_sptr, 0 /*no AST*/);
58825883
if (lhs_length_ast > 0) {
58835884
SPTR size_sptr = stmt_dtype > DT_NONE &&
58845885
!is_class /* TYPE IS */ &&

0 commit comments

Comments
 (0)