se->expr = gfc_build_addr_expr (NULL, se->expr);
}
return;
- }\r
-
-\r
- /* Dereference the expression, where needed. Since characters\r
- are entirely different from other types, they are treated \r
- separately. */\r
- if (sym->ts.type == BT_CHARACTER)\r
- {\r
- /* Dereference character pointer dummy arguments\r
+ }
+
+
+ /* Dereference the expression, where needed. Since characters
+ are entirely different from other types, they are treated
+ separately. */
+ if (sym->ts.type == BT_CHARACTER)
+ {
+ /* Dereference character pointer dummy arguments
or results. */
- if ((sym->attr.pointer || sym->attr.allocatable)\r
- && ((sym->attr.dummy)\r
- || (sym->attr.function\r
- || sym->attr.result)))\r
- se->expr = gfc_build_indirect_ref (se->expr);\r
- }\r
- else\r
- {\r
+ if ((sym->attr.pointer || sym->attr.allocatable)
+ && ((sym->attr.dummy)
+ || (sym->attr.function
+ || sym->attr.result)))
+ se->expr = gfc_build_indirect_ref (se->expr);
+ }
+ else
+ {
/* Dereference non-charcter scalar dummy arguments. */
- if ((sym->attr.dummy) && (!sym->attr.dimension))\r
- se->expr = gfc_build_indirect_ref (se->expr);\r
-\r
+ if ((sym->attr.dummy) && (!sym->attr.dimension))
+ se->expr = gfc_build_indirect_ref (se->expr);
+
/* Dereference scalar hidden result. */
- if ((gfc_option.flag_f2c && sym->ts.type == BT_COMPLEX)\r
- && (sym->attr.function || sym->attr.result)\r
- && (!sym->attr.dimension))\r
- se->expr = gfc_build_indirect_ref (se->expr);\r
-\r
- /* Dereference non-character pointer variables. \r
+ if ((gfc_option.flag_f2c && sym->ts.type == BT_COMPLEX)
+ && (sym->attr.function || sym->attr.result)
+ && (!sym->attr.dimension))
+ se->expr = gfc_build_indirect_ref (se->expr);
+
+ /* Dereference non-character pointer variables.
These must be dummys or results or scalars. */
- if ((sym->attr.pointer || sym->attr.allocatable)\r
- && ((sym->attr.dummy) \r
- || (sym->attr.function || sym->attr.result)\r
- || (!sym->attr.dimension)))\r
- se->expr = gfc_build_indirect_ref (se->expr);\r
- }\r
-\r
+ if ((sym->attr.pointer || sym->attr.allocatable)
+ && ((sym->attr.dummy)
+ || (sym->attr.function || sym->attr.result)
+ || (!sym->attr.dimension)))
+ se->expr = gfc_build_indirect_ref (se->expr);
+ }
+
ref = expr->ref;
}
if (se->direct_byref)
{
arglist = gfc_chainon_list (arglist, se->expr);
-\r
- /* Add string length to argument list. */\r
+
+ /* Add string length to argument list. */
if (sym->ts.type == BT_CHARACTER)
{
sym->ts.cl->backend_decl = len;
}
else if (sym->result->attr.dimension)
{
- gcc_assert (se->loop && se->ss);\r
+ gcc_assert (se->loop && se->ss);
/* Set the type of the array. */
tmp = gfc_typenode_for_spec (&sym->ts);
- info->dimen = se->loop->dimen;\r
+ info->dimen = se->loop->dimen;
/* Allocate a temporary to store the result. */
gfc_trans_allocate_temp_array (se->loop, info, tmp);
gfc_conv_descriptor_stride (info->descriptor, gfc_rank_cst[0]);
gfc_add_modify_expr (&se->pre, tmp,
convert (TREE_TYPE (tmp), integer_zero_node));
-\r
+
/* Pass the temporary as the first argument. */
tmp = info->descriptor;
tmp = gfc_build_addr_expr (NULL, tmp);
}
else if (sym->ts.type == BT_CHARACTER)
{
-\r
- /* Pass the string length. */\r
+
+ /* Pass the string length. */
sym->ts.cl->backend_decl = len;
type = gfc_get_character_type (sym->ts.kind, sym->ts.cl);
type = build_pointer_type (type);
if (sym->attr.pointer || sym->attr.allocatable)
{
/* Build char[4] * pstr. */
- tmp = fold_build2 (MINUS_EXPR, gfc_charlen_type_node, len,\r
- convert (gfc_charlen_type_node, integer_one_node));\r
- tmp = build_range_type (gfc_array_index_type, gfc_index_zero_node, tmp);\r
- tmp = build_array_type (gfc_character1_type_node, tmp);\r
+ tmp = fold_build2 (MINUS_EXPR, gfc_charlen_type_node, len,
+ convert (gfc_charlen_type_node, integer_one_node));
+ tmp = build_range_type (gfc_array_index_type, gfc_index_zero_node, tmp);
+ tmp = build_array_type (gfc_character1_type_node, tmp);
var = gfc_create_var (build_pointer_type (tmp), "pstr");
- /* Provide an address expression for the function arguments. */\r
- var = gfc_build_addr_expr (NULL, var);\r
+ /* Provide an address expression for the function arguments. */
+ var = gfc_build_addr_expr (NULL, var);
}
else
{
- var = gfc_conv_string_tmp (se, type, len);\r
+ var = gfc_conv_string_tmp (se, type, len);
}
arglist = gfc_chainon_list (arglist, var);
arglist = gfc_chainon_list (arglist,
se->string_length = len;
}
else if (sym->ts.type == BT_CHARACTER)
- {\r
+ {
/* Dereference for character pointer results. */
if (sym->attr.pointer || sym->attr.allocatable)
- se->expr = gfc_build_indirect_ref (var);\r
- else\r
+ se->expr = gfc_build_indirect_ref (var);
+ else
se->expr = var;
se->string_length = len;
}
else
gfc_conv_expr (&lse, expr1);
-\r
+
tmp = gfc_trans_scalar_assign (&lse, &rse, expr1->ts.type);
gfc_add_expr_to_block (&body, tmp);