This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47531] New: SHAPE misses KIND= support
- 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: Sat, 29 Jan 2011 08:26:50 +0000
- Subject: [Bug fortran/47531] New: SHAPE misses KIND= support
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47531
Summary: SHAPE misses KIND= support
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
James Van Buskirk realized at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/0c4d885e9afec063
that gfortran's SHAPE misses KIND= support.
http://gcc.gnu.org/onlinedocs/gfortran/SHAPE.html
RESULT = SHAPE(SOURCE)
F2008:
13.7.149 SHAPE (SOURCE [, KIND])
write(*,*) shape(weevil,C_INTPTR_T)
1
Error: Too many arguments in call to 'shape' at (1)
program bug1
use ISO_C_BINDING
implicit none
real,allocatable :: weevil(:,:)
write(*,*) achar(64,C_CHAR)
write(*,*) char(64,C_CHAR)
write(*,*) iachar('A',C_INTPTR_T)
write(*,*) ichar('A',C_INTPTR_T)
write(*,*) len('A',C_INTPTR_T)
write(*,*) len_trim('A',C_INTPTR_T)
allocate(weevil(2,2))
weevil = 42
write(*,*) ceiling(weevil,C_INTPTR_T)
write(*,*) floor(weevil,C_INTPTR_T)
write(*,*) shape(weevil,C_INTPTR_T)
write(*,*) storage_size(weevil,C_INTPTR_T)
end program bug1