public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32323]  New: Accepts invalid vector subscript actual argument for intent(out) dummy argument
@ 2007-06-13 16:30 terry at chem dot gu dot se
  2007-06-13 18:04 ` [Bug fortran/32323] " burnus at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: terry at chem dot gu dot se @ 2007-06-13 16:30 UTC (permalink / raw)
  To: gcc-bugs

[tjf@fkpc167]$ cat run.f90
module mod
implicit none
contains
subroutine aa(v)
integer,dimension(:),intent(out)::v
write(*,*)size(v)
v=0
end subroutine aa
end module mod

program ff
use mod
implicit none
integer,dimension(10)::w
w=1
call aa(w((/3,2,1/)))
write(*,*)w
end

[tjf@fkpc167]$ gfortran -v -Wall -W --std=f95 --pedantic -O -fbounds-check
run.f90
Driving: gfortran -v -Wall -W -std=f95 -pedantic -O -fbounds-check run.f90
-lgfortranbegin -lgfortran -lm -shared-libgcc
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --disable-multilib --enable-languages=fortran
Thread model: posix
gcc version 4.2.0 20070501 (prerelease)
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/f951 run.f90 -quiet
-dumpbase run.f90 -mtune=generic -auxbase run -O -Wall -W -pedantic -std=f95
-version -fbounds-check -I
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/finclude -o /tmp/ccFuwYwj.s
GNU F95 version 4.2.0 20070501 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.2.0 20070501 (prerelease).
GGC heuristics: --param ggc-min-expand=89 --param ggc-min-heapsize=112193
 as --traditional-format -V -Qy -o /tmp/ccIcA5Sy.o /tmp/ccFuwYwj.s
GNU assembler version 2.17.50 (x86_64-linux-gnu) using BFD version 2.17.50
20070103 Ubuntu
 /usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/collect2 --eh-frame-hdr
-m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2
/usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/crtbegin.o
-L/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.2.0
-L/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/../../.. /tmp/ccIcA5Sy.o
-lgfortranbegin -lgfortran -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/crtend.o
/usr/lib/../lib64/crtn.o
[tjf@fkpc167]$ ./a.out
           3
           1           1           1           1           1           1       
   1           1           1           1



For those that care, both ifort and g95 correctly identify this as invalid
code.

(Maybe I can get one right today!  ;-)


-- 
           Summary: Accepts invalid vector subscript actual argument for
                    intent(out) dummy argument
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: terry at chem dot gu dot se
  GCC host triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32323


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-06-13 20:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-13 16:30 [Bug fortran/32323] New: Accepts invalid vector subscript actual argument for intent(out) dummy argument terry at chem dot gu dot se
2007-06-13 18:04 ` [Bug fortran/32323] " burnus at gcc dot gnu dot org
2007-06-13 19:31 ` patchapp at dberlin dot org
2007-06-13 20:13 ` burnus at gcc dot gnu dot org
2007-06-13 20:15 ` burnus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).