This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30372] New: kill intrinsic doesn't diagnose invalid argument kinds
- From: "brooks 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 Jan 2007 20:33:35 -0000
- Subject: [Bug fortran/30372] New: kill intrinsic doesn't diagnose invalid argument kinds
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The kill intrinsic is only implemented in libgfortran for STATUS arguments of
types INTEGER(4) and INTEGER(8). However, the implementation in
gfc_resolve_kill_sub will attempt to link to implementations for any kind that
it's given, rather than reporting an error. Thus, the following little code
produces a rather unhelpful link-time error instead:
program kill2
integer(kind=1) this
call kill(99999, 0, this)
end
debian-gfortran:~/test> ../bin-trunk/bin/gfortran kill2.f90 -o kill2
/tmp/ccKohBjB.o(.text+0x3d): In function `MAIN__':
: undefined reference to `_gfortran_kill_i1_sub'
collect2: ld returned 1 exit status
This could be fixed with extra checks in check.c: gfc_resolve_kill_sub.
--
Summary: kill intrinsic doesn't diagnose invalid argument kinds
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: brooks at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30372