public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/36112]  New: Bounds-checking on character length not working for array-constructors
@ 2008-05-02 19:05 d at domob dot eu
  2008-05-03  6:15 ` [Bug fortran/36112] " burnus at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: d at domob dot eu @ 2008-05-02 19:05 UTC (permalink / raw)
  To: gcc-bugs

Bounds-checking for correct character length in array-constructors without
F2003 typespec (all strings are required to have the same length) does not work
sometimes, for instance the code

  call test ("this is long")
contains
  subroutine test(s)
    character(len=*) :: s
    character(len=128) :: arr(2)
    arr = (/ s, "abc" /)
  end subroutine test
end

Should give a runtime-error when compiled with "-fbounds-check" and run but it
doesn't; swapping the array constructor to be

arr = (/ "abc", s /)

does, however (which is presumably correct).


-- 
           Summary: Bounds-checking on character length not working for
                    array-constructors
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: d at domob dot eu


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


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

end of thread, other threads:[~2008-06-18 13:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-02 19:05 [Bug fortran/36112] New: Bounds-checking on character length not working for array-constructors d at domob dot eu
2008-05-03  6:15 ` [Bug fortran/36112] " burnus at gcc dot gnu dot org
2008-05-03 13:32 ` d at domob dot eu
2008-05-03 13:35 ` d at domob dot eu
2008-05-03 14:46 ` d at domob dot eu
2008-05-03 18:27 ` d at domob dot eu
2008-05-04 11:24 ` d at domob dot eu
2008-06-17 20:25 ` domob at gcc dot gnu dot org
2008-06-17 20:26 ` domob at gcc dot gnu dot org
2008-06-18 13:56 ` domob 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).