Commit b21a544b by Janus Weil

re PR fortran/49708 (ICE with allocate and no dimensions)

2011-07-19  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/49708
	* resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.


2011-07-19  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/49708
	* gfortran.dg/allocate_error_3.f90: New.

From-SVN: r176447
parent 1b14d815
2011-07-19 Janus Weil <janus@gcc.gnu.org>
PR fortran/49708
* resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.
2011-07-18 Tobias Burnus <burnus@net-b.de> 2011-07-18 Tobias Burnus <burnus@net-b.de>
* trans-decl.c (gfc_build_qualified_array): Make coarray's * trans-decl.c (gfc_build_qualified_array): Make coarray's
......
...@@ -6886,7 +6886,7 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code) ...@@ -6886,7 +6886,7 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code)
gfc_find_derived_vtab (ts.u.derived); gfc_find_derived_vtab (ts.u.derived);
} }
if (pointer || (dimension == 0 && codimension == 0)) if (dimension == 0 && codimension == 0)
goto success; goto success;
/* Make sure the last reference node is an array specifiction. */ /* Make sure the last reference node is an array specifiction. */
......
2011-07-19 Janus Weil <janus@gcc.gnu.org>
PR fortran/49708
* gfortran.dg/allocate_error_3.f90: New.
2011-07-19 Richard Guenther <rguenther@suse.de> 2011-07-19 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/bool-10.c: Adjust expected pattern. * gcc.dg/tree-ssa/bool-10.c: Adjust expected pattern.
......
! { dg-do compile }
!
! PR 49708: [4.5/4.6/4.7 Regression] ICE with allocate and no dimensions
!
! Contributed by <fnordxyz@yahoo.com>
real, pointer :: x(:)
allocate(x) ! { dg-error "Array specification required" }
end
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