public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/19352] New: Recursive IO functions are not allowed
@ 2005-01-09 22:50 pinskia at gcc dot gnu dot org
  2005-01-09 22:53 ` [Bug fortran/19352] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-09 22:50 UTC (permalink / raw)
  To: gcc-bugs

In this is both a fortran and a libfortran problem.

Take the following code and try to run it and you will get an internal error:
module mymod
contains
  function mystring ()
    character(len=4) :: mystring
    write (unit=mystring,fmt='(A)') 'aaaa'
  end function mystring
end module mymod

program main
  use mymod
  write (unit=*,fmt='(A)') mystring()
end program main

-- 
           Summary: Recursive IO functions are not allowed
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug fortran/19352] Recursive IO functions are not allowed
  2005-01-09 22:50 [Bug fortran/19352] New: Recursive IO functions are not allowed pinskia at gcc dot gnu dot org
@ 2005-01-09 22:53 ` pinskia at gcc dot gnu dot org
  2005-01-10  1:28 ` [Bug fortran/19352] Recursive IO functions are not allowed (F2003) pbrook at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-09 22:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-09 22:53 -------
If I remember correctly to fix this correctly you also need to fix PR 14943.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |14943
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-01-09 22:53:28
               date|                            |


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


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

* [Bug fortran/19352] Recursive IO functions are not allowed (F2003)
  2005-01-09 22:50 [Bug fortran/19352] New: Recursive IO functions are not allowed pinskia at gcc dot gnu dot org
  2005-01-09 22:53 ` [Bug fortran/19352] " pinskia at gcc dot gnu dot org
@ 2005-01-10  1:28 ` pbrook at gcc dot gnu dot org
  2005-01-12  8:19 ` Thomas dot Koenig at online dot de
  2005-03-22  4:15 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2005-01-10  1:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pbrook at gcc dot gnu dot org  2005-01-10 01:28 -------
This is a f2003 feature, and not legal f95.

http://gcc.gnu.org/ml/fortran/2005-01/msg00091.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
           Keywords|wrong-code                  |
            Summary|Recursive IO functions are  |Recursive IO functions are
                   |not allowed                 |not allowed (F2003)


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


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

* [Bug fortran/19352] Recursive IO functions are not allowed (F2003)
  2005-01-09 22:50 [Bug fortran/19352] New: Recursive IO functions are not allowed pinskia at gcc dot gnu dot org
  2005-01-09 22:53 ` [Bug fortran/19352] " pinskia at gcc dot gnu dot org
  2005-01-10  1:28 ` [Bug fortran/19352] Recursive IO functions are not allowed (F2003) pbrook at gcc dot gnu dot org
@ 2005-01-12  8:19 ` Thomas dot Koenig at online dot de
  2005-03-22  4:15 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-12  8:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Thomas dot Koenig at online dot de  2005-01-12 08:19 -------
I think the error message can be improved.

Disallowing recursive I/O is not an "internal error".

What about "Calling I/O from function in I/O list not allowed" ?

-- 


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


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

* [Bug fortran/19352] Recursive IO functions are not allowed (F2003)
  2005-01-09 22:50 [Bug fortran/19352] New: Recursive IO functions are not allowed pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-01-12  8:19 ` Thomas dot Koenig at online dot de
@ 2005-03-22  4:15 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-22  4:15 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |20585
              nThis|                            |


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


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

end of thread, other threads:[~2005-03-22  4:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-09 22:50 [Bug fortran/19352] New: Recursive IO functions are not allowed pinskia at gcc dot gnu dot org
2005-01-09 22:53 ` [Bug fortran/19352] " pinskia at gcc dot gnu dot org
2005-01-10  1:28 ` [Bug fortran/19352] Recursive IO functions are not allowed (F2003) pbrook at gcc dot gnu dot org
2005-01-12  8:19 ` Thomas dot Koenig at online dot de
2005-03-22  4:15 ` pinskia 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).