From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21193 invoked by alias); 13 Jun 2008 16:55:39 -0000 Received: (qmail 20788 invoked by uid 48); 13 Jun 2008 16:54:54 -0000 Date: Fri, 13 Jun 2008 16:55:00 -0000 Message-ID: <20080613165454.20787.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/36528] Cray pointer to function mishandled In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-06/txt/msg00859.txt.bz2 ------- 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)(*)(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