This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36528] Cray pointer to function mishandled
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jun 2008 16:54:54 -0000
- Subject: [Bug fortran/36528] Cray pointer to function mishandled
- References: <bug-36528-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2008-06-13 16:54 -------
For gfortran documentation, see:
http://gcc.gnu.org/onlinedocs/gfortran/Cray-pointers.html#Cray-pointers
a) If used directly, the tree is wrong (see dump), but it works nonetheless
(I somehow have not to realize this)
b) If used as actual argument, it is completely mishandled. Without explicit
interface, it should be:
myfunc( (void)(*<T4>)(void) pointee)
(i.e. "build_pointer_type (build_function_type (void_type_node, NULL_TREE))")
and with an explicit interface, it should convert pointee to the tree TYPE of
the dummy argument.)
c) TODO: Check whether using the pointee as non-procedure actual argument works
(incl. VALUE attribute and similar things; it probably works.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36528