aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>2005-06-12 17:21:12 +0200
committerTobias Schlüter <tobi@gcc.gnu.org>2005-06-12 17:21:12 +0200
commitb49a3de7433301048a330df014a008a2b4066e7d (patch)
treebc5470fb3f7a556ac4c9073c27d737c7be8be269 /gcc/fortran/trans-expr.c
parent607fb860424ca6579ade785b50e7052ad50c0cd5 (diff)
downloadgcc-b49a3de7433301048a330df014a008a2b4066e7d.zip
gcc-b49a3de7433301048a330df014a008a2b4066e7d.tar.gz
gcc-b49a3de7433301048a330df014a008a2b4066e7d.tar.bz2
trans-expr.c (gfc_conv_variable): POINTER results don't need f2c calling conventions.
fortran/ * trans-expr.c (gfc_conv_variable): POINTER results don't need f2c calling conventions. Look at sym instead of sym->result. * trans-types.c (gfc_sym_type): Remove workaround for frontend bug. Remove condition which is always false with workaround removed. (gfc_return_by_reference): Always look at sym, never at sym->result. testsuite/ * gfortran.dg/f2c_7.f90: New test. From-SVN: r100857
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 52d3703..ee6de7e 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -379,7 +379,7 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr)
/* Dereference scalar hidden result. */
if (gfc_option.flag_f2c && sym->ts.type == BT_COMPLEX
&& (sym->attr.function || sym->attr.result)
- && !sym->attr.dimension)
+ && !sym->attr.dimension && !sym->attr.pointer)
se->expr = gfc_build_indirect_ref (se->expr);
/* Dereference non-character pointer variables.
@@ -1315,9 +1315,6 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
se->expr = build3 (CALL_EXPR, TREE_TYPE (fntype), se->expr,
arglist, NULL_TREE);
- if (sym->result)
- sym = sym->result;
-
/* If we have a pointer function, but we don't want a pointer, e.g.
something like
x = f()