diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2008-02-15 21:12:24 +0000 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2008-02-15 21:12:24 +0000 |
commit | 750606c6b235a3d7e1d5fcdfbc5f3f1f68efcefe (patch) | |
tree | 717a9d3b9a9d4cada4a008ed5787a7293589e166 /gcc/fortran/trans-expr.c | |
parent | ac84c0623d12bb99990f34f6bfdf0b17ab976ad6 (diff) | |
download | gcc-750606c6b235a3d7e1d5fcdfbc5f3f1f68efcefe.zip gcc-750606c6b235a3d7e1d5fcdfbc5f3f1f68efcefe.tar.gz gcc-750606c6b235a3d7e1d5fcdfbc5f3f1f68efcefe.tar.bz2 |
trans-expr.c (gfc_conv_function_call): Force evaluation of se->expr.
* trans-expr.c (gfc_conv_function_call): Force evaluation of
se->expr.
* gfortran.dg/c_loc_tests_12.f03: New test.
From-SVN: r132353
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 89bc3c2..4866d8c 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -2264,6 +2264,13 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym, gfc_conv_array_parameter (se, arg->expr, argss, f); } + /* TODO -- the following two lines shouldn't be necessary, but + they're removed a bug is exposed later in the codepath. + This is workaround was thus introduced, but will have to be + removed; please see PR 35150 for details about the issue. */ + se->expr = convert (pvoid_type_node, se->expr); + se->expr = gfc_evaluate_now (se->expr, &se->pre); + return 0; } else if (sym->intmod_sym_id == ISOCBINDING_FUNLOC) |