diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2010-12-31 11:20:22 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2010-12-31 11:20:22 +0000 |
commit | 7c1a49fa1b2535dcce600d03887e2c72a463cc2c (patch) | |
tree | dce35256c392415d4df903f203fc6983ac3ba369 /gcc/fortran/resolve.c | |
parent | 1da41015bc4dbdd06cc0b94bbacfcfc537b42f25 (diff) | |
download | gcc-7c1a49fa1b2535dcce600d03887e2c72a463cc2c.zip gcc-7c1a49fa1b2535dcce600d03887e2c72a463cc2c.tar.gz gcc-7c1a49fa1b2535dcce600d03887e2c72a463cc2c.tar.bz2 |
re PR fortran/45338 (Failure on interfacing a function passed as an argument as a custom operator)
2010-12-31 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45338
* resolve.c (resolve_operator): Mark function for user-defined
operator as referenced.
2010-12-31 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45338
* gfortran.dg/userdef_operator_2.f90: New test case.
From-SVN: r168366
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 7081146..9a5dcc1 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -3793,9 +3793,12 @@ resolve_operator (gfc_expr *e) sprintf (msg, _("Operand of user operator '%s' at %%L is %s"), e->value.op.uop->name, gfc_typename (&op1->ts)); else - sprintf (msg, _("Operands of user operator '%s' at %%L are %s/%s"), - e->value.op.uop->name, gfc_typename (&op1->ts), - gfc_typename (&op2->ts)); + { + sprintf (msg, _("Operands of user operator '%s' at %%L are %s/%s"), + e->value.op.uop->name, gfc_typename (&op1->ts), + gfc_typename (&op2->ts)); + e->value.op.uop->op->sym->attr.referenced = 1; + } goto bad_op; |