This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47023] C_Sizeof: Rejects valid code
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Oct 2011 12:19:54 +0000
- Subject: [Bug fortran/47023] C_Sizeof: Rejects valid code
- Auto-submitted: auto-generated
- References: <bug-47023-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47023
--- Comment #21 from janus at gcc dot gnu.org 2011-10-18 12:19:54 UTC ---
The question is also how SIZEOF should act on data pointers:
use iso_c_binding
integer(2) :: i
integer(2), pointer :: p
print *,sizeof(i)
print *,sizeof(p)
end
Output:
2
2
Should it give the size of the pointer itself, or the size of the object it
points to?