This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34387] FAIL: gfortran.dg/optional_dim_2.f90: FE vs library argument missmatch
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jan 2008 05:00:37 -0000
- Subject: [Bug fortran/34387] FAIL: gfortran.dg/optional_dim_2.f90: FE vs library argument missmatch
- References: <bug-34387-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from jvdelisle at gcc dot gnu dot org 2008-01-04 05:00 -------
Notice in the tree dump that dimmy is already a pointer type when passed into
the subroutine.
Can you try this patch and see if it works and also send me the fdump tree
original?
Index: trans-expr.c
===================================================================
--- trans-expr.c (revision 131316)
+++ trans-expr.c (working copy)
@@ -156,13 +156,12 @@ gfc_conv_missing_dummy (gfc_se * se, gfc
tmp = build3 (COND_EXPR, TREE_TYPE (se->expr), present, se->expr,
fold_convert (TREE_TYPE (se->expr), integer_zero_node));
- tmp = gfc_evaluate_now (tmp, &se->pre);
if (kind > 0)
{
tmp = gfc_get_int_type (kind);
+ tmp = build_pointer_type (tmp);
tmp = fold_convert (tmp, se->expr);
- tmp = gfc_evaluate_now (tmp, &se->pre);
}
se->expr = tmp;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34387