aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-06-20 13:50:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-06-20 02:04:52 +0000
commit3c447213baf828ebd01c45ad459552b3c9922c92 (patch)
tree198ed6386925c6ff5c24faf686b836aa74082836 /gcc-4.8/gcc/fortran/interface.c
parente1be674a8e345aaa025ad9f1d38bab4272301e1d (diff)
parentf190d6284359da8ae8694b2d2e14b01602a959ed (diff)
downloadtoolchain_gcc-3c447213baf828ebd01c45ad459552b3c9922c92.tar.gz
toolchain_gcc-3c447213baf828ebd01c45ad459552b3c9922c92.tar.bz2
toolchain_gcc-3c447213baf828ebd01c45ad459552b3c9922c92.zip
Merge "Merge GCC 4.8.3"
Diffstat (limited to 'gcc-4.8/gcc/fortran/interface.c')
-rw-r--r--gcc-4.8/gcc/fortran/interface.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc-4.8/gcc/fortran/interface.c b/gcc-4.8/gcc/fortran/interface.c
index 895eee48c..725cd8a4b 100644
--- a/gcc-4.8/gcc/fortran/interface.c
+++ b/gcc-4.8/gcc/fortran/interface.c
@@ -1245,7 +1245,8 @@ check_result_characteristics (gfc_symbol *s1, gfc_symbol *s2,
return FAILURE;
}
- if (r1->ts.u.cl->length)
+ if (s1->ts.u.cl && s1->ts.u.cl->length
+ && s2->ts.u.cl && s2->ts.u.cl->length)
{
int compval = gfc_dep_compare_expr (r1->ts.u.cl->length,
r2->ts.u.cl->length);
@@ -1367,8 +1368,8 @@ gfc_compare_interfaces (gfc_symbol *s1, gfc_symbol *s2, const char *name2,
if (s1->attr.function && s2->attr.function)
{
/* If both are functions, check result characteristics. */
- if (check_result_characteristics (s1, s2, errmsg, err_len)
- == FAILURE)
+ if (check_result_characteristics (s1, s2, errmsg, err_len) == FAILURE
+ || check_result_characteristics (s2, s1, errmsg, err_len) == FAILURE)
return 0;
}