diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2013-01-15 05:29:01 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2013-01-15 05:29:01 +0000 |
commit | feb6eab0f59640cf19caa7bc09587b0c5a8a371f (patch) | |
tree | 0d181503dcaf29b44335c9f7bc731c309119ebdb /gcc/fortran | |
parent | 54be5fb321b9ddb64a26f6cef4bfafd8a564b3d0 (diff) | |
download | gcc-feb6eab0f59640cf19caa7bc09587b0c5a8a371f.zip gcc-feb6eab0f59640cf19caa7bc09587b0c5a8a371f.tar.gz gcc-feb6eab0f59640cf19caa7bc09587b0c5a8a371f.tar.bz2 |
re PR fortran/54286 (Accepts invalid proc-pointer assignments involving proc-ptr function result)
2013-01-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/54286
* expr.c (gfc_check_pointer_assign): Check for presence of
's2' before using it.
2013-01-15 Paul Thomas <pault@gcc.gnu.org>
PR fortran/54286
* gfortran.dg/proc_ptr_result_8.f90 : Add module 'm' to check
case where interface is null.
From-SVN: r195185
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/expr.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b412d0a..f297deb 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2013-01-15 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/54286 + * expr.c (gfc_check_pointer_assign): Check for presence of + 's2' before using it. + 2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/55806 diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 3010dd9..f358ac7 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3537,7 +3537,7 @@ gfc_check_pointer_assign (gfc_expr *lvalue, gfc_expr *rvalue) name = s2->name; } - if (s2->attr.proc_pointer && s2->ts.interface) + if (s2 && s2->attr.proc_pointer && s2->ts.interface) s2 = s2->ts.interface; if (s1 == s2 || !s1 || !s2) |