This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi all, attached is a close-to-trivial patch which rejects the declaration of 'abstract procedure pointers' (which is not a valid Fortran concept), and thereby fixes an ICE-on-invalid. Regtested on x86_64-unknown-linux-gnu. Ok for trunk? [In principle the ICE is a regression, but I don't think the patch is worth backporting.] Cheers, Janus 2013-12-16 Janus Weil <janus@gcc.gnu.org> PR fortran/54949 * symbol.c (check_conflict): Forbid abstract procedure pointers. (gfc_add_abstract): Check for attribute conflicts. 2013-12-16 Janus Weil <janus@gcc.gnu.org> PR fortran/54949 * gfortran.dg/proc_ptr_44.f90: New.
Attachment:
pr54949.diff
Description: Text document
! { dg-do compile } ! ! PR 54949: [F03] abstract procedure pointers not rejected ! ! Contributed by Janus Weil <janus@gcc.gnu.org> implicit none abstract interface subroutine abssub1 end subroutine end interface pointer :: abssub1 ! { dg-error "PROCEDURE POINTER attribute conflicts with ABSTRACT attribute" } pointer :: abssub2 abstract interface subroutine abssub2 ! { dg-error "PROCEDURE POINTER attribute conflicts with ABSTRACT attribute" } end subroutine end interface abssub1 => sub ! { dg-error "is not a variable" } abssub2 => sub contains subroutine sub end subroutine end
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |