diff options
author | lkrupp <lkrupp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-10-07 02:02:13 +0000 |
---|---|---|
committer | lkrupp <lkrupp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-10-07 02:02:13 +0000 |
commit | 4147af8082151c16af98175ca6b1b62ab61223fc (patch) | |
tree | 119ae41e8db5840e6f6ee3f69e192e2ea3f6b7d0 /gcc/fortran/trans-expr.c | |
parent | b2a7eddc291623a41797414199de1dd41e229eee (diff) |
2016_10-06 Louis Krupp <louis.krupp@zoho.com>
PR fortran/57910
* gfortran.dg/pr57910.f90: New test.
2016-10-05 Louis Krupp <louis.krupp@zoho.com>
PR fortran/57910
* trans-expr.c (gfc_add_interface_mapping): Don't try to
dereference call-by-value scalar argument
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@240850 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index a82178835ac1..1de2818a6b20 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -4009,6 +4009,10 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping, if (sym->attr.flavor == FL_PROCEDURE) value = se->expr; + /* If the argument is a pass-by-value scalar, use the value as is. */ + else if (!sym->attr.dimension && sym->attr.value) + value = se->expr; + /* If the argument is either a string or a pointer to a string, convert it to a boundless character type. */ else if (!sym->attr.dimension && sym->ts.type == BT_CHARACTER) |