This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36437] F2008: Support c_sizeof // Simplify argument to [c_]sizeof
- 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: 4 Jun 2008 20:19:46 -0000
- Subject: [Bug fortran/36437] F2008: Support c_sizeof // Simplify argument to [c_]sizeof
- References: <bug-36437-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-04 20:19 -------
Created an attachment (id=15720)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15720&action=view)
Incomplete patch
Fortran 2008 supports c_sizeof which is identical to gfortran's sizeof.
This patch does the following:
- Implements c_sizeof (one line in intrinsic.c)
- Fixes argument (sizeof(x) not sizeof(i)) - intrinsic.c
- Document new option - intrinsic.texi
- trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Don't create
{
integer(kind=8) bytes.1;
i = 4;
}
in the simple case but simply "i = 4".
- simplify.c: Add gfc_simplify_sizeof:
This partially works, is currently quite hacky and fails for substrings.
TODO: Fix the last item.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36437