Commit 5fabac29 by Janus Weil

re PR fortran/55692 (ICE on incorrect use of ASSOCIATED function)

2012-12-28  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/55692
	* check.c (gfc_check_associated): Remove a "gcc_assert (0)".

2012-12-28  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/55692
	* gfortran.dg/associated_7.f90: New.

From-SVN: r194744
parent f968d60b
2012-12-28 Janus Weil <janus@gcc.gnu.org>
PR fortran/55692
* check.c (gfc_check_associated): Remove a "gcc_assert (0)".
2012-12-28 Tobias Burnus <burnus@net-b.de>
PR fortran/55763
......
......@@ -895,12 +895,10 @@ gfc_check_associated (gfc_expr *pointer, gfc_expr *target)
where = &pointer->where;
if (pointer->expr_type == EXPR_VARIABLE || pointer->expr_type == EXPR_FUNCTION)
attr1 = gfc_expr_attr (pointer);
else if (pointer->expr_type == EXPR_NULL)
if (pointer->expr_type == EXPR_NULL)
goto null_arg;
else
gcc_assert (0); /* Pointer must be a variable or a function. */
attr1 = gfc_expr_attr (pointer);
if (!attr1.pointer && !attr1.proc_pointer)
{
......
2012-12-28 Janus Weil <janus@gcc.gnu.org>
PR fortran/55692
* gfortran.dg/associated_7.f90: New.
2012-12-28 Tobias Burnus <burnus@net-b.de>
PR fortran/55763
......
! { dg-do compile }
!
! PR 55692: ICE on incorrect use of ASSOCIATED function
!
! Contributed by Gilbert Scott <gilbert.scott@easynet.co.uk>
INTEGER, POINTER :: P1, P2
PRINT *, ASSOCIATED([P1,P2]) ! { dg-error "must be a POINTER" }
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