This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33037] TRANSFER should warn on mismatched sizes
- 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: 11 Jan 2008 14:02:24 -0000
- Subject: [Bug fortran/33037] TRANSFER should warn on mismatched sizes
- References: <bug-33037-13164@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from burnus at gcc dot gnu dot org 2008-01-11 14:02 -------
For the following ill-defined program, also a warning should be printed. It
comes from PR 34537 and had before an ICE. NAG f95 prints "Intrinsic TRANSFER
has partly undefined result".
program main
implicit none
character(len=8), target :: t
character(len=8), pointer :: p
p => t
call test(p)
print *, t
contains
subroutine test(a)
character(len=8),pointer :: a
a = transfer('Sample',a)
end subroutine test
end program main
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33037