[Bug fortran/32732] [Bind C] Character scalars are passed as arrays
Steve Kargl
sgk@troutmask.apl.washington.edu
Sat Aug 4 23:14:00 GMT 2007
Hi Chris,
I'm testing and reviewing your patch now. I have a few
questions:
> +void
> +gfc_conv_scalar_char_value (gfc_symbol *sym, gfc_se *se, gfc_expr **expr)
> +{
> + gfc_expr *tmp_expr;
> +
> + else if (se != NULL && (*expr)->expr_type == EXPR_VARIABLE)
> + {
> + if ((*expr)->ref == NULL)
> + {
> + tmp_expr = *expr;
This tmp_expr appears to be extraneous. I've removed it in my
local copy. Is this correct?
> + se->expr = gfc_to_single_character
> + (build_int_cst (integer_type_node, 1),
> + gfc_build_addr_expr (pchar_type_node,
> + gfc_get_symbol_decl
> + return;
I've removed the return statement. Although it is not incorrect
to have the return, all function in gfortran omitted.
--
Steve
More information about the Fortran
mailing list