public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/48858] Incorrect error for same binding label on two generic interface specifics
Date: Sat, 07 Jan 2012 22:31:00 -0000	[thread overview]
Message-ID: <bug-48858-4-W6f25JEImZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48858-4@http.gcc.gnu.org/bugzilla/>

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic, wrong-code

--- Comment #11 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-07 22:30:44 UTC ---
(In reply to comment #9)
> we might need to handle also COMMON /foo/

Example for a now (F2008) valid programs:

a) Currently rejected - but shouldn't since F2008

use iso_c_binding
contains
subroutine one()
  bind(C, name="com1") :: /foo/
  integer(c_int) :: a
  common /foo/ a
end subroutine
subroutine two()
  bind(C, name="com2") :: /foo/
  integer(c_long) :: a
  common /foo/ a
end subroutine two
end

b) For the following program no error is printed - but one gets:
  Warnung: Named COMMON block 'foo' at (1) shall be
           of the same size as elsewhere (4 vs 8 bytes)
which is surprising as one should generate one common block with assembler name
"foo_" and one with assembler name "com1".

Currently only one is generated (which has either the name "com1" or "foo_"):

use iso_c_binding
contains
subroutine one()
  bind(C, name="com1") :: /foo/
  integer(c_int) :: a
  common /foo/ a
end subroutine
subroutine two()
  integer(c_long) :: a
  common /foo/ a
end subroutine two
end


  parent reply	other threads:[~2012-01-07 22:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03 21:59 [Bug fortran/48858] New: " longb at cray dot com
2011-05-03 21:51 ` [Bug fortran/48858] " longb at cray dot com
2011-05-04  8:24 ` burnus at gcc dot gnu.org
2011-05-04 22:43 ` longb at cray dot com
2011-05-06 18:18 ` burnus at gcc dot gnu.org
2011-05-06 18:39 ` burnus at gcc dot gnu.org
2011-05-22 14:41 ` burnus at gcc dot gnu.org
2011-07-24 19:19 ` dfranke at gcc dot gnu.org
2011-07-24 19:57 ` burnus at gcc dot gnu.org
2012-01-07 22:15 ` burnus at gcc dot gnu.org
2012-01-07 22:18 ` burnus at gcc dot gnu.org
2012-01-07 22:31 ` burnus at gcc dot gnu.org [this message]
2012-06-25 15:38 ` burnus at gcc dot gnu.org
2012-11-13 18:15 ` juno.krahn at nih dot gov
2013-05-20 20:09 ` burnus at gcc dot gnu.org
2013-05-20 20:10 ` burnus at gcc dot gnu.org
2013-05-20 20:14 ` burnus at gcc dot gnu.org
2013-05-22  9:17 ` burnus at gcc dot gnu.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=bug-48858-4-W6f25JEImZ@http.gcc.gnu.org/bugzilla/ \
    --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).