public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/59662] New: [OOP] TBP subroutine call rejected in contained subroutine
@ 2014-01-03 8:50 sfilippone at uniroma2 dot it
2014-01-03 9:17 ` [Bug fortran/59662] [4.9 Regression] [OOP] TBP subroutine call rejected in connection with BIND(C) janus at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: sfilippone at uniroma2 dot it @ 2014-01-03 8:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59662
Bug ID: 59662
Summary: [OOP] TBP subroutine call rejected in contained
subroutine
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: sfilippone at uniroma2 dot it
Created attachment 31565
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31565&action=edit
testcase
The attached code fails with current trunk with what appears to be an
overzealous check. The code compiles and works fine with 4.8.1.
Commenting the BIND(C) routine call or moving the foobar subroutine outside of
foo masks the problem.
-----------------------------------------------
[sfilippo@jacobi bug36]$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gnu/4.9/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gnu/4.9
--enable-languages=c,c++,fortran --with-gmp=/home/travel/GNUBUILD/gmp
--with-mpfr=/home/travel/GNUBUILD/mpfr --with-mpc=/home/travel/GNUBUILD/mpc
--with-cloog=/home/travel/GNUBUILD/cloog : (reconfigured) ../gcc/configure
--prefix=/usr/local/gnu/4.9 --with-gmp=/home/travel/GNUBUILD/gmp
--with-mpfr=/home/travel/GNUBUILD/mpfr --with-mpc=/home/travel/GNUBUILD/mpc
--with-cloog=/home/travel/GNUBUILD/cloog --enable-languages=c,c++,fortran,lto
--no-create --no-recursion : (reconfigured) ../gcc/configure
--prefix=/usr/local/gnu/4.9 --with-gmp=/home/travel/GNUBUILD/gmp
--with-mpfr=/home/travel/GNUBUILD/mpfr --with-mpc=/home/travel/GNUBUILD/mpc
--with-cloog=/home/travel/GNUBUILD/cloog --enable-languages=c,c++,fortran,lto
--no-create --no-recursion
Thread model: posix
gcc version 4.9.0 20140102 (experimental) (GCC)
[sfilippo@jacobi bug36]$ gfortran -c testcase.f90
testcase.f90:59.22:
call a%mv_to(acsc)
1
Error: 'mv_to_base' at (1) is not a function
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/59662] [4.9 Regression] [OOP] TBP subroutine call rejected in connection with BIND(C)
2014-01-03 8:50 [Bug fortran/59662] New: [OOP] TBP subroutine call rejected in contained subroutine sfilippone at uniroma2 dot it
@ 2014-01-03 9:17 ` janus at gcc dot gnu.org
2014-01-03 9:26 ` janus at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-03 9:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59662
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Known to work| |4.8.1
Keywords| |rejects-valid
Last reconfirmed| |2014-01-03
CC| |janus at gcc dot gnu.org
Ever confirmed|0 |1
Summary|[OOP] TBP subroutine call |[4.9 Regression] [OOP] TBP
|rejected in contained |subroutine call rejected in
|subroutine |connection with BIND(C)
Known to fail| |4.9.0
--- Comment #1 from janus at gcc dot gnu.org ---
Confirmed. There is some strange interaction with BIND(C). Reduced test case:
module base_mod
implicit none
type outer
contains
procedure, nopass :: mv_to_base
end type
contains
subroutine mv_to_base
end subroutine
subroutine foobar
type(outer) :: a
integer :: info
interface
integer function try() bind(c)
end function
end interface
call a%mv_to_base()
info = try()
end subroutine
end module
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/59662] [4.9 Regression] [OOP] TBP subroutine call rejected in connection with BIND(C)
2014-01-03 8:50 [Bug fortran/59662] New: [OOP] TBP subroutine call rejected in contained subroutine sfilippone at uniroma2 dot it
2014-01-03 9:17 ` [Bug fortran/59662] [4.9 Regression] [OOP] TBP subroutine call rejected in connection with BIND(C) janus at gcc dot gnu.org
@ 2014-01-03 9:26 ` janus at gcc dot gnu.org
2014-01-06 11:31 ` janus at gcc dot gnu.org
2014-01-06 11:36 ` janus at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-03 9:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59662
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |janus at gcc dot gnu.org
--- Comment #2 from janus at gcc dot gnu.org ---
This PR is fixed by the patch for PR 59023 posted at:
http://gcc.gnu.org/ml/fortran/2013-12/msg00139.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/59662] [4.9 Regression] [OOP] TBP subroutine call rejected in connection with BIND(C)
2014-01-03 8:50 [Bug fortran/59662] New: [OOP] TBP subroutine call rejected in contained subroutine sfilippone at uniroma2 dot it
2014-01-03 9:17 ` [Bug fortran/59662] [4.9 Regression] [OOP] TBP subroutine call rejected in connection with BIND(C) janus at gcc dot gnu.org
2014-01-03 9:26 ` janus at gcc dot gnu.org
@ 2014-01-06 11:31 ` janus at gcc dot gnu.org
2014-01-06 11:36 ` janus at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-06 11:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59662
--- Comment #3 from janus at gcc dot gnu.org ---
Author: janus
Date: Mon Jan 6 11:31:34 2014
New Revision: 206355
URL: http://gcc.gnu.org/viewcvs?rev=206355&root=gcc&view=rev
Log:
2014-01-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/59023
PR fortran/59662
* resolve.c (resolve_global_procedure): Don't apply to c-binding
procedures.
(gfc_verify_binding_labels): Remove duplicate line.
2014-01-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/59023
* gfortran.dg/bind_c_procs_2.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/bind_c_procs_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/59662] [4.9 Regression] [OOP] TBP subroutine call rejected in connection with BIND(C)
2014-01-03 8:50 [Bug fortran/59662] New: [OOP] TBP subroutine call rejected in contained subroutine sfilippone at uniroma2 dot it
` (2 preceding siblings ...)
2014-01-06 11:31 ` janus at gcc dot gnu.org
@ 2014-01-06 11:36 ` janus at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu.org @ 2014-01-06 11:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59662
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from janus at gcc dot gnu.org ---
Fixed with r206355. Closing.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-06 11:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-03 8:50 [Bug fortran/59662] New: [OOP] TBP subroutine call rejected in contained subroutine sfilippone at uniroma2 dot it
2014-01-03 9:17 ` [Bug fortran/59662] [4.9 Regression] [OOP] TBP subroutine call rejected in connection with BIND(C) janus at gcc dot gnu.org
2014-01-03 9:26 ` janus at gcc dot gnu.org
2014-01-06 11:31 ` janus at gcc dot gnu.org
2014-01-06 11:36 ` janus at gcc dot gnu.org
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).