This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49802] [F2003, F2008] Wrong code with VALUE, F2008: VALUE with arrays/DIMENSION
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Jul 2011 10:21:38 +0000
- Subject: [Bug fortran/49802] [F2003, F2008] Wrong code with VALUE, F2008: VALUE with arrays/DIMENSION
- Auto-submitted: auto-generated
- References: <bug-49802-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49802
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-07-21 10:21:22 UTC ---
(In reply to comment #3)
> by_value (character(kind=1)[1:_y] y, integer(kind=4) _y)
Technically, it makes sense that it does not work: The caller passes <m>+<n>
bytes: sizeof(str) and sizeof(strlen); in this example: 10 bytes for str and 4
bytes for the length (value: 10). How should the poor callee know which bytes
belong to the string length?
That's different to printf(char *format, ...): There one first knows what to
expect before the unknown data comes.