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
This commit is contained in:
Janus Weil 2015-01-16 13:49:46 +01:00
parent 8b8e23de94
commit dc9a54fa10
4 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,9 @@
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>
* openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,

View File

@ -1780,8 +1780,8 @@ match_pointer_init (gfc_expr **init, int procptr)
return MATCH_ERROR;
}
if (!procptr)
gfc_resolve_expr (*init);
if (!procptr && !gfc_resolve_expr (*init))
return MATCH_ERROR;
if (!gfc_notify_std (GFC_STD_F2008, "non-NULL pointer "
"initialization at %C"))

View File

@ -1,3 +1,8 @@
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>
* gcc.c-torture/compile/20150108.c: New test.

View File

@ -16,6 +16,7 @@ module m1
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 :: p4 => x%i
integer, pointer :: p5 => u ! { dg-error "has no IMPLICIT type" }
end module m1