http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47023

--- Comment #19 from janus at gcc dot gnu.org 2011-10-18 12:03:58 UTC ---
(In reply to comment #18)
> >  * reject proc-pointers for SIZEOF (comment #7)

Example:

use iso_c_binding
procedure(real), pointer :: pp
procedure(real) :: proc
pp => sin
print *,sizeof(proc)    ! (1)
print *,sizeof(pp)      ! (2)
print *,sizeof(pp(0.))  ! (3)
end

Currently this gives the output:

                    1
                    1
                    4

The last one is correct, giving the size of the return value of the called
function. The first one should eventually be rejected. For the second one, it's
not completely clear where the '1' comes from, but it's certainly wrong (in any
possible interpretation).

Reply via email to