* [Bug fortran/32580] iso_c_binding c_f_procpointer
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
@ 2007-07-02 7:37 ` jv244 at cam dot ac dot uk
2007-07-02 14:57 ` kargl at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-07-02 7:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jv244 at cam dot ac dot uk 2007-07-02 07:37 -------
Fixing this bug would likely allow to compile/link the full CP2K (including the
bit that depends on the ISO_C_BINDING)
--
jv244 at cam dot ac dot uk changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |29975
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
2007-07-02 7:37 ` [Bug fortran/32580] " jv244 at cam dot ac dot uk
@ 2007-07-02 14:57 ` kargl at gcc dot gnu dot org
2007-07-04 18:29 ` [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers burnus at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-07-02 14:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from kargl at gcc dot gnu dot org 2007-07-02 14:57 -------
Resolution of this bug requires the PROCEDURE POINTER feature
from Fortran 2003. Janus Weil, a Google SoC participant, is
working on this feature.
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-07-02 14:57:40
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
2007-07-02 7:37 ` [Bug fortran/32580] " jv244 at cam dot ac dot uk
2007-07-02 14:57 ` kargl at gcc dot gnu dot org
@ 2007-07-04 18:29 ` burnus at gcc dot gnu dot org
2007-10-16 4:32 ` jv244 at cam dot ac dot uk
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-07-04 18:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2007-07-04 18:29 -------
Clean up from my Bind(C) notes: The following should give an error such as:
Error: 'fptr' argument of 'c_f_procpointer' intrinsic at (1) must be a
PROCEDURE POINTER
use iso_c_binding
type(c_funptr) :: cfunptr
real, pointer :: myFunc
call c_f_procpointer(cfunptr, myFunc)
end
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Summary|iso_c_binding |iso_c_binding
|c_f_procpointer |c_f_procpointer / procedure
| |pointers
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
` (2 preceding siblings ...)
2007-07-04 18:29 ` [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers burnus at gcc dot gnu dot org
@ 2007-10-16 4:32 ` jv244 at cam dot ac dot uk
2007-10-16 6:46 ` burnus at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-10-16 4:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jv244 at cam dot ac dot uk 2007-10-16 04:32 -------
(In reply to comment #2)
> Resolution of this bug requires the PROCEDURE POINTER feature
> from Fortran 2003. Janus Weil, a Google SoC participant, is
> working on this feature.
>
SoC is over, I assume this has been put on ice ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
` (3 preceding siblings ...)
2007-10-16 4:32 ` jv244 at cam dot ac dot uk
@ 2007-10-16 6:46 ` burnus at gcc dot gnu dot org
2007-10-16 8:31 ` jv244 at cam dot ac dot uk
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-10-16 6:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2007-10-16 06:46 -------
(In reply to comment #4)
> SoC is over, I assume this has been put on ice ?
Yes, there was unfortunately no patch before GCC entered stage 3 (12 September)
and in stage 3 merging new features is allowed. (Besides, there is not yet a
ready patch for procedure pointers.)
In any case, before GCC 4.4 enters stage 1, at least the core developers will
concentrate on fixing bugs.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
` (4 preceding siblings ...)
2007-10-16 6:46 ` burnus at gcc dot gnu dot org
@ 2007-10-16 8:31 ` jv244 at cam dot ac dot uk
2007-10-16 11:26 ` burnus at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-10-16 8:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jv244 at cam dot ac dot uk 2007-10-16 08:30 -------
(In reply to comment #5)
> (In reply to comment #4)
> > SoC is over, I assume this has been put on ice ?
>
> Yes, there was unfortunately no patch before GCC entered stage 3 (12 September)
> and in stage 3 merging new features is allowed. (Besides, there is not yet a
> ready patch for procedure pointers.)
> In any case, before GCC 4.4 enters stage 1, at least the core developers will
> concentrate on fixing bugs.
>
Since adding c_f_procpointer might change the fortran runtime library, will
this addition be OK for 4.4 ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
` (5 preceding siblings ...)
2007-10-16 8:31 ` jv244 at cam dot ac dot uk
@ 2007-10-16 11:26 ` burnus at gcc dot gnu dot org
2008-05-24 17:52 ` jaydub66 at gmail dot com
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-10-16 11:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from burnus at gcc dot gnu dot org 2007-10-16 11:26 -------
> Since adding c_f_procpointer might change the fortran runtime library, will
> this addition be OK for 4.4 ?
Additions of functions is no problem; also modifying functions
arguments/functionality is no problem. However, obsolete (i.e. unused)
functions remain in the library (for old programs).
If the function interface is changed, the old function remains in the library
(with the old version number) and the new version of the function is added.
If symbol versioning is supported (e.g. under Linux), old programs continue to
work flawlessly with new libraries.
Thus: Library interface changes before 4.3.0 is released are nice, because one
will not need to carry obsolete functions along; otherwise the development is
not hampered at all. For procedure pointers, I expect that one doesn't need to
touch the library at at all (but I might be wrong).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
` (6 preceding siblings ...)
2007-10-16 11:26 ` burnus at gcc dot gnu dot org
@ 2008-05-24 17:52 ` jaydub66 at gmail dot com
2008-05-25 12:14 ` jv244 at cam dot ac dot uk
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jaydub66 at gmail dot com @ 2008-05-24 17:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jaydub66 at gmail dot com 2008-05-24 17:52 -------
I have a patch which can handle this test case, see
http://gcc.gnu.org/ml/fortran/2008-05/msg00296.html
It's not complete yet, and some details need to be fixed, but the basic
functionality is there. I hope it can be committed to trunk quite soon.
Cheers,
Janus
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
` (7 preceding siblings ...)
2008-05-24 17:52 ` jaydub66 at gmail dot com
@ 2008-05-25 12:14 ` jv244 at cam dot ac dot uk
2008-05-29 11:29 ` burnus at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jv244 at cam dot ac dot uk @ 2008-05-25 12:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jv244 at cam dot ac dot uk 2008-05-25 12:13 -------
> It's not complete yet, and some details need to be fixed, but the basic
> functionality is there. I hope it can be committed to trunk quite soon.
that would be great... I really hope this will be enough to enable the
-D__LIBINT bits of CP2K.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
` (8 preceding siblings ...)
2008-05-25 12:14 ` jv244 at cam dot ac dot uk
@ 2008-05-29 11:29 ` burnus at gcc dot gnu dot org
2008-06-02 15:33 ` burnus at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-05-29 11:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from burnus at gcc dot gnu dot org 2008-05-29 11:29 -------
Move comment from PR 36325, see also
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/bb371413b5cbe3d7
The following is regarded as valid and did not work with one of the last
versions of proc pointer patches:
abstract interface
subroutine a
end subroutine
end interface
procedure(a),pointer :: x
procedure(x) :: y
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
` (9 preceding siblings ...)
2008-05-29 11:29 ` burnus at gcc dot gnu dot org
@ 2008-06-02 15:33 ` burnus at gcc dot gnu dot org
2008-07-02 19:55 ` janus at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-06-02 15:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from burnus at gcc dot gnu dot org 2008-06-02 15:32 -------
Another link dump:
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/ff7ae6c7a7860bca/60213205751117d4
Some of the test cases should be checked when the proc pointer patch is ready
to ensure all are passed. (Forward carrying this link from PR 36322 which is
about to be fixed.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
` (10 preceding siblings ...)
2008-06-02 15:33 ` burnus at gcc dot gnu dot org
@ 2008-07-02 19:55 ` janus at gcc dot gnu dot org
2008-07-02 20:20 ` janus at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: janus at gcc dot gnu dot org @ 2008-07-02 19:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from janus at gcc dot gnu dot org 2008-07-02 19:54 -------
Subject: Bug 32580
Author: janus
Date: Wed Jul 2 19:53:37 2008
New Revision: 137386
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137386
Log:
2008-07-02 Janus Weil <janus@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/32580
* gfortran.h (struct gfc_symbol): New member "proc_pointer".
* check.c (gfc_check_associated,gfc_check_null): Implement
procedure pointers.
* decl.c (match_procedure_decl): Ditto.
* expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
* interface.c (compare_actual_formal): Ditto.
* match.h: Ditto.
* match.c (gfc_match_pointer_assignment): Ditto.
* parse.c (parse_interface): Ditto.
* primary.c (gfc_match_rvalue,match_variable): Ditto.
* resolve.c (resolve_fl_procedure): Ditto.
* symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
* trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
create_function_arglist): Ditto.
* trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
2008-07-02 Janus Weil <janus@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
PR fortran/32580
* gfortran.dg/c_f_pointer_tests_3.f90: Updated.
* gfortran.dg/proc_decl_1.f90: Updated.
* gfortran.dg/proc_ptr_1.f90: New.
* gfortran.dg/proc_ptr_2.f90: New.
* gfortran.dg/proc_ptr_3.f90: New.
* gfortran.dg/proc_ptr_4.f90: New.
* gfortran.dg/proc_ptr_5.f90: New.
* gfortran.dg/proc_ptr_6.f90: New.
* gfortran.dg/proc_ptr_7.f90: New.
* gfortran.dg/proc_ptr_8.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/proc_ptr_1.f90 (with props)
trunk/gcc/testsuite/gfortran.dg/proc_ptr_2.f90 (with props)
trunk/gcc/testsuite/gfortran.dg/proc_ptr_3.f90 (with props)
trunk/gcc/testsuite/gfortran.dg/proc_ptr_4.f90 (with props)
trunk/gcc/testsuite/gfortran.dg/proc_ptr_5.f90 (with props)
trunk/gcc/testsuite/gfortran.dg/proc_ptr_6.f90 (with props)
trunk/gcc/testsuite/gfortran.dg/proc_ptr_7.c
trunk/gcc/testsuite/gfortran.dg/proc_ptr_7.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_8.c
trunk/gcc/testsuite/gfortran.dg/proc_ptr_8.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/check.c
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/expr.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/interface.c
trunk/gcc/fortran/match.c
trunk/gcc/fortran/match.h
trunk/gcc/fortran/parse.c
trunk/gcc/fortran/primary.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/symbol.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/c_f_pointer_tests_3.f90
trunk/gcc/testsuite/gfortran.dg/proc_decl_1.f90
Propchange: trunk/gcc/testsuite/gfortran.dg/proc_ptr_1.f90
('svn:executable' added)
Propchange: trunk/gcc/testsuite/gfortran.dg/proc_ptr_2.f90
('svn:executable' added)
Propchange: trunk/gcc/testsuite/gfortran.dg/proc_ptr_3.f90
('svn:executable' added)
Propchange: trunk/gcc/testsuite/gfortran.dg/proc_ptr_4.f90
('svn:executable' added)
Propchange: trunk/gcc/testsuite/gfortran.dg/proc_ptr_5.f90
('svn:executable' added)
Propchange: trunk/gcc/testsuite/gfortran.dg/proc_ptr_6.f90
('svn:executable' added)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
` (11 preceding siblings ...)
2008-07-02 19:55 ` janus at gcc dot gnu dot org
@ 2008-07-02 20:20 ` janus at gcc dot gnu dot org
2008-07-02 20:20 ` janus at gcc dot gnu dot org
2008-07-03 13:44 ` jv244 at cam dot ac dot uk
14 siblings, 0 replies; 16+ messages in thread
From: janus at gcc dot gnu dot org @ 2008-07-02 20:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from janus at gcc dot gnu dot org 2008-07-02 20:19 -------
Fixed with rev 137386. Btw I have also tried compiling the whole CP2K, which
seems to work fine.
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2007-07-02 14:57:40 |2008-07-02 20:19:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
` (12 preceding siblings ...)
2008-07-02 20:20 ` janus at gcc dot gnu dot org
@ 2008-07-02 20:20 ` janus at gcc dot gnu dot org
2008-07-03 13:44 ` jv244 at cam dot ac dot uk
14 siblings, 0 replies; 16+ messages in thread
From: janus at gcc dot gnu dot org @ 2008-07-02 20:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from janus at gcc dot gnu dot org 2008-07-02 20:19 -------
Closing.
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug fortran/32580] iso_c_binding c_f_procpointer / procedure pointers
2007-07-02 7:20 [Bug fortran/32580] New: iso_c_binding c_f_procpointer jv244 at cam dot ac dot uk
` (13 preceding siblings ...)
2008-07-02 20:20 ` janus at gcc dot gnu dot org
@ 2008-07-03 13:44 ` jv244 at cam dot ac dot uk
14 siblings, 0 replies; 16+ messages in thread
From: jv244 at cam dot ac dot uk @ 2008-07-03 13:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from jv244 at cam dot ac dot uk 2008-07-03 13:43 -------
(In reply to comment #13)
> Fixed with rev 137386. Btw I have also tried compiling the whole CP2K, which
> seems to work fine.
>
I've also checked that gfortran now appears to compile correctly the procedure
pointer part of CP2K. That's great... many thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32580
^ permalink raw reply [flat|nested] 16+ messages in thread