GCC Bugzilla has been upgraded from version 4.4.9 to 5.0rc3. If you see any problem, please report it to bug 64968.
Bug 38415 - procedure pointer assignment to abstract interface
Summary: procedure pointer assignment to abstract interface
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: janus
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2008-12-05 18:03 UTC by janus
Modified: 2008-12-06 12:18 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-12-05 18:48:50


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description janus 2008-12-05 18:03:27 UTC
The following program is currently accepted, although it is invalid:

 abstract interface
   subroutine bar(a)
     integer :: a
   end subroutine bar
 end interface
 procedure(bar), pointer :: foo
 foo => bar
end

This problem was found by Tobias.
Comment 1 janus 2008-12-05 18:48:50 UTC
Btw ifort 11 accepts this, while the g95 version I have (from Sep. 5 2008) gives an ICE.
Comment 2 janus 2008-12-06 12:17:13 UTC
Subject: Bug 38415

Author: janus
Date: Sat Dec  6 12:15:49 2008
New Revision: 142520

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142520
Log:
2008-12-06  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/38415
	* expr.c (gfc_check_pointer_assign): Added a check for abstract
	interfaces in procedure pointer assignments, removed check involving
	gfc_compare_interfaces until PR38290 is fixed completely.


2008-12-06  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/38415
	* gfortran.dg/proc_ptr_2.f90: Extended.
	* gfortran.dg/proc_ptr_11.f90: Modified.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/expr.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_11.f90
    trunk/gcc/testsuite/gfortran.dg/proc_ptr_2.f90

Comment 3 janus 2008-12-06 12:18:53 UTC
Fixed with r142520. Closing.