Commit 9c3e90e3 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/30865 ([4.1, 4.2 only] optional argument passed on to size(...,dim=))

2007-03-01  Tobias Burnus  <burnus@net-b.de>

        PR fortran/30865
        * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.

From-SVN: r122423
parent aedcd695
2007-03-01 Tobias Burnus <burnus@net-b.de>
PR fortran/30865
* trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
2007-02-28 Tobias Burnus <burnus@net-b.de> 2007-02-28 Tobias Burnus <burnus@net-b.de>
Paul Thomas <pault@gcc.gnu.org> Paul Thomas <pault@gcc.gnu.org>
......
...@@ -2723,10 +2723,13 @@ gfc_conv_intrinsic_size (gfc_se * se, gfc_expr * expr) ...@@ -2723,10 +2723,13 @@ gfc_conv_intrinsic_size (gfc_se * se, gfc_expr * expr)
&& actual->expr->symtree->n.sym->attr.optional) && actual->expr->symtree->n.sym->attr.optional)
{ {
tree tmp; tree tmp;
tmp = gfc_build_addr_expr (pvoid_type_node, gfc_init_se (&argse, NULL);
argse.expr); argse.want_pointer = 1;
tmp = build2 (NE_EXPR, boolean_type_node, tmp, argse.data_not_needed = 1;
build_int_cst (pvoid_type_node, 0)); gfc_conv_expr (&argse, actual->expr);
gfc_add_block_to_block (&se->pre, &argse.pre);
tmp = build2 (NE_EXPR, boolean_type_node, argse.expr,
null_pointer_node);
tmp = gfc_evaluate_now (tmp, &se->pre); tmp = gfc_evaluate_now (tmp, &se->pre);
se->expr = build3 (COND_EXPR, pvoid_type_node, se->expr = build3 (COND_EXPR, pvoid_type_node,
tmp, fncall1, fncall0); tmp, fncall1, fncall0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment