mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-30 23:11:09 +08:00
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
This commit is contained in:
parent
f968d60be0
commit
5fabac29f7
@ -1,3 +1,8 @@
|
||||
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)
|
||||
{
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
9
gcc/testsuite/gfortran.dg/associated_7.f90
Normal file
9
gcc/testsuite/gfortran.dg/associated_7.f90
Normal file
@ -0,0 +1,9 @@
|
||||
! { 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
|
Loading…
x
Reference in New Issue
Block a user