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