2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/84511
* trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
From-SVN: r257943
+2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/84511
+ * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
+
2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/84346
ts->kind = gfc_index_integer_kind;
}
+ /* gfortran reaches here for "print *, c_loc(xxx)". */
+ if (ts->type == BT_VOID
+ && code->expr1 && code->expr1->ts.type == BT_VOID
+ && code->expr1->symtree
+ && strcmp (code->expr1->symtree->name, "c_loc") == 0)
+ {
+ ts->type = BT_INTEGER;
+ ts->kind = gfc_index_integer_kind;
+ }
+
kind = ts->kind;
function = NULL;
arg2 = NULL;