Commit dc9a54fa by Janus Weil

re PR fortran/45290 ([F08] pointer initialization)

2015-01-16  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/45290
	* decl.c (match_pointer_init): Error out if resolution of init expr
	failed.

2015-01-16  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/45290
	* gfortran.dg/pointer_init_6.f90: Extended.

From-SVN: r219731
parent 8b8e23de
2015-01-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/45290
* decl.c (match_pointer_init): Error out if resolution of init expr
failed.
2015-01-15 Tobias Burnus <burnus@net-b.de> 2015-01-15 Tobias Burnus <burnus@net-b.de>
* openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses, * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
......
...@@ -1780,8 +1780,8 @@ match_pointer_init (gfc_expr **init, int procptr) ...@@ -1780,8 +1780,8 @@ match_pointer_init (gfc_expr **init, int procptr)
return MATCH_ERROR; return MATCH_ERROR;
} }
if (!procptr) if (!procptr && !gfc_resolve_expr (*init))
gfc_resolve_expr (*init); return MATCH_ERROR;
if (!gfc_notify_std (GFC_STD_F2008, "non-NULL pointer " if (!gfc_notify_std (GFC_STD_F2008, "non-NULL pointer "
"initialization at %C")) "initialization at %C"))
......
2015-01-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/45290
* gfortran.dg/pointer_init_6.f90: Extended.
2015-01-16 Robert Suchanek <robert.suchanek@imgtec.com> 2015-01-16 Robert Suchanek <robert.suchanek@imgtec.com>
* gcc.c-torture/compile/20150108.c: New test. * gcc.c-torture/compile/20150108.c: New test.
......
...@@ -16,6 +16,7 @@ module m1 ...@@ -16,6 +16,7 @@ module m1
integer, pointer :: p2 => p1 ! { dg-error "must have the TARGET attribute" } integer, pointer :: p2 => p1 ! { dg-error "must have the TARGET attribute" }
integer, pointer :: p3 => x%p ! { dg-error "must have the TARGET attribute" } integer, pointer :: p3 => x%p ! { dg-error "must have the TARGET attribute" }
integer, pointer :: p4 => x%i integer, pointer :: p4 => x%i
integer, pointer :: p5 => u ! { dg-error "has no IMPLICIT type" }
end module m1 end module m1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment