re PR fortran/71723 ([F08] ICE on invalid pointer initialization)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 10 Feb 2019 15:52:38 +0000 (15:52 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 10 Feb 2019 15:52:38 +0000 (15:52 +0000)
commitcedf8d2ee7cf8bb3a5d4d3fe480b257110c0debb
tree66de6950f32c4e85b501ddff96ddb2149f461dd3
parent1386121ecd068799110d01f01e20e190e3937d25
re PR fortran/71723 ([F08] ICE on invalid pointer initialization)

2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/71237
* expr.c (gfc_check_assign): Add argument is_init_expr.  If we are
looking at an init expression, issue error if the target is not a
TARGET and we are not looking at a procedure pointer.
* gfortran.h (gfc_check_assign): Add optional argument
is_init_expr.

2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/71237
* gfortran.dg/pointer_init_2.f90: Adjust error messages.
* gfortran.dg/pointer_init_6.f90: Likewise.
* gfortran.dg/pointer_init_9.f90: New test.

From-SVN: r268748
gcc/fortran/ChangeLog
gcc/fortran/expr.c
gcc/fortran/gfortran.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pointer_init_2.f90
gcc/testsuite/gfortran.dg/pointer_init_6.f90
gcc/testsuite/gfortran.dg/pointer_init_9.f90 [new file with mode: 0644]