public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31294]  New: Endless loop when compiling a cyclic code
@ 2007-03-21 10:57 burnus at gcc dot gnu dot org
  2007-03-25 22:08 ` [Bug fortran/31294] " tobi at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-03-21 10:57 UTC (permalink / raw)
  To: gcc-bugs

I'm not completely sure that the following code is invalid, but I think it is.
Taken from:
http://home.comcast.net/%7Ekmbtib/Fortran_stuff/cyclic_specs1.f90

g95 prints:
  Error: Circular specification in variable 'ouch' at (1)

NAG f95 compiles it without any warning/error, however. Running it (using all
checks) shows either an empty line or
CHARACTER actual arg LEN=4 shorter than dummy arg LEN=1963731936
which indicates that it is indeed invalid.

Here is the source:
! File: cyclic_specs1.f90
! Public domain 2004 James Van Buskirk
! Leads to internal compiler error in g95
! Windows download of 12/18/04

module cyclic
   implicit none
   contains
      function ouch(x,y)
         implicit character(len(ouch)) (x)
         implicit character(len(x)+1) (y)
         implicit character(len(y)-1) (o)
         intent(in) x,y
         character(len(y)-1) ouch
         integer i

         do i = 1, len(ouch)
            ouch(i:i) = achar(ieor(iachar(x(i:i)),iachar(y(i:i))))
         end do
      end function ouch
end module cyclic

program test
   use cyclic
   implicit none

   write(*,*) ouch('YOW!','     ')
end program test


-- 
           Summary: Endless loop when compiling a cyclic code
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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

* [Bug fortran/31294] Endless loop when compiling a cyclic code
  2007-03-21 10:57 [Bug fortran/31294] New: Endless loop when compiling a cyclic code burnus at gcc dot gnu dot org
@ 2007-03-25 22:08 ` tobi at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: tobi at gcc dot gnu dot org @ 2007-03-25 22:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tobi at gcc dot gnu dot org  2007-03-26 00:07 -------


*** This bug has been marked as a duplicate of 31306 ***


-- 

tobi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

end of thread, other threads:[~2007-03-25 22:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-21 10:57 [Bug fortran/31294] New: Endless loop when compiling a cyclic code burnus at gcc dot gnu dot org
2007-03-25 22:08 ` [Bug fortran/31294] " tobi 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).