This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/48858] Incorrect error for same binding label on two generic interface specifics
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 07 Jan 2012 22:30:44 +0000
- Subject: [Bug fortran/48858] Incorrect error for same binding label on two generic interface specifics
- Auto-submitted: auto-generated
- References: <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