public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/35971] ICE on valid code
Date: Sun, 29 Jun 2008 08:58:00 -0000	[thread overview]
Message-ID: <20080629085807.13129.qmail@sourceware.org> (raw)
In-Reply-To: <bug-35971-10259@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from janus at gcc dot gnu dot org  2008-06-29 08:58 -------
The test case in comment #1 does compile for me without any ICE. The test case
in comment #0 is actually invalid, triggering the following error message:

      procedure(abstract_fun) fun
              1
Error: PROCEDURE at (1) must be in a generic interface

One simply has to remove the interface statement from the main program:

program fptr
   use funcs
   use other_fun
   implicit none
   procedure(abstract_fun) fun
   pointer(p,fun)
   type(C_FUNPTR) fp

   fp = get_proc('Hello, world'//achar(0))
   p = transfer(fp,p)
   write(*,'(a)') fun([1,2,3])
end program fptr

With this I also get an ICE.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35971


  parent reply	other threads:[~2008-06-29  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-18  8:21 [Bug fortran/35971] New: " fxcoudert at gcc dot gnu dot org
2008-04-20 21:20 ` [Bug fortran/35971] " tkoenig at gcc dot gnu dot org
2008-06-29  8:58 ` janus at gcc dot gnu dot org [this message]
2008-10-20 12:03 ` [Bug fortran/35971] ICE on valid code with C_FUNPTR and transfer janus at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080629085807.13129.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).