This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30955] New: intrinsic: FGET
- From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Feb 2007 00:10:33 -0000
- Subject: [Bug fortran/30955] New: intrinsic: FGET
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
subroutine = {
name = 'fget';
arg = 'count';
arg = 'status'; /* optional */
call = 'CALL fget(count = char)';
call = 'CALL fget(count = char, status = int_1)';
call = 'CALL fget(count = char, status = int_2)';
call = 'CALL fget(count = char, status = int_4)';
call = 'CALL fget(count = char, status = int_8)';
};
1. The argument name of the first dummy argument name is "count", documented is
"c. Neither one is very descriptive for fget, IMO plain "c" is better than
"count"
2. The first argument shall accept only CHARACTER, but CHARACTER(*) is also
allowed:
$> cat fget.f90
character(len=10) :: s
s = '0123456789'
CALL fget(s)
write(*,*) s
end
$> gfortran-svn fget.f90 && ./a.out
x
x
I.e. the string is cleared and the first character is set to the input.
This also "works" with substrings, e.g. s(3:6).
In my eyes I would consider the blanking the bug, not that a string is allowed.
Consistent behaviour should overwrite the first character, not ALL of them.
3. The optional status argument accepts variables of type default integer only.
--
Summary: intrinsic: FGET
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dfranke at gcc dot gnu dot org
OtherBugsDependingO 30932
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30955