This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g77 bug? "I/O recursion" -- very annoying


I just noticed someting that was definitely not present in earlier
versions of libf2c (eg., in that supplied with 0.5.19.1). If you 
interrupt a program while it's doing I/O, it acts quite unreasonably. 
Here's an example:

==== 
% ./g77-io-bug
 At the following prompt either enter an integer
  or hit control-c to see what happens
Enter an integer or Hit Ctrl-C now: Interrupt
I/O recursion: I/O started while already doing I/O
apparent state: unit 5 (unnamed)
last format: list io
lately reading sequential formatted external IO
Abort (core dumped)
==== 

Here's the code:
=======================

	program annoyance
c
	integer i
c
	write (*,*) 'At the following prompt either enter an integer'
	write (*,*) ' or hit control-c to see what happens'
	write (*,'(A$)') 'Enter an integer or Hit Ctrl-C now: '
	read (*,*) i
	write (*,*) 'Number is ', i
	stop
	end
=======================

I can reproduce this behaviour under i386-linux-gnulibc1 and
i386-cygwin32.

Anybody know what caused this?

Regards,
Mumit -- khan@xraylith.wisc.edu
http://www.xraylith.wisc.edu/~khan/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]