public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31304]  New: REPEAT argument NCOPIES is not converted as it should
@ 2007-03-21 23:55 fxcoudert at gcc dot gnu dot org
  2007-03-21 23:55 ` [Bug fortran/31304] " fxcoudert at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-03-21 23:55 UTC (permalink / raw)
  To: gcc-bugs

The NCOPIES argument of REPEAT is not converted to the integer king the library
expects (kind=4), which can lead to segfaults. I changed that code recently, so
I'll fix it. I'll probably take this opportunity to have the front-end actually
emit an error if the NCOPIES argument is larger than a fixed value.

$ cat repeat.f90
   implicit none

   integer(kind=1) i
   real(kind=8) r
   character(len=2) s1, s2

   i = 1
   r = 1
   s1 = '42'
   r = nearest(r,r)
   s2 = repeat(s1,i)
end
$ gfortran repeat.f90 && ./a.out
Segmentation fault


-- 
           Summary: REPEAT argument NCOPIES is not converted as it should
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: fxcoudert at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org


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


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

end of thread, other threads:[~2007-04-03 21:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-21 23:55 [Bug fortran/31304] New: REPEAT argument NCOPIES is not converted as it should fxcoudert at gcc dot gnu dot org
2007-03-21 23:55 ` [Bug fortran/31304] " fxcoudert at gcc dot gnu dot org
2007-03-30 10:00 ` fxcoudert at gcc dot gnu dot org
2007-03-31 11:29 ` fxcoudert at gcc dot gnu dot org
2007-04-03 21:05 ` fxcoudert at gcc dot gnu dot org
2007-04-03 21:07 ` fxcoudert 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).