delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/09/09/00:15:17

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Newsgroups: comp.os.msdos.djgpp
Subject: Why does read(*,*) not work in gfortran 4.x?
From: Felix <junkemail AT junk DOT com>
Organization: Home
Message-ID: <Xns9F5AF34BB3C7sym00fe34lix@216.151.153.61>
User-Agent: Xnews/5.04.25
Date: 09 Sep 2011 03:54:25 GMT
Lines: 20
NNTP-Posting-Host: 61a29f35.news.astraweb.com
X-Trace: DXC=bKURKf5a?;EjEc;hW[JGKHL?0kYOcDh AT JXeVXUROKY5C@F67:iRmNdJ]TUPS4f?XTCij4UFblJ8SC=d7X5PV^_IHXXAE2?Q2<@BL8inbCYo4]B
Bytes: 1253
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I have compiled the following program on three DJGPP installations:

      program Test
      real first
      write (*,'(a)') 'Program to regurgitate a number'
      write (*,'(a,$)') 'Enter number: '
      read (*,*) first
      write (*,'(a,f10.5)') 'Regurgitated number is', first
      stop
      end

With GCC 4.6.1 and binutils 2.21.1 (or GCC 4.4.2 and binutils 2.19),
this program does not properly execute the 'read (*,*)' statement.
With a considerably older installation of GCC 3.2 (g77 instead of 
gfortran) and binutils 2.13, it does work.

By the way, it does work with GCC 4.4.3 and binutils 2.20.1 on Linux,
so it seems to be a DJGPP compiler quirk.

Felix

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019