From: Andris Organization: Pavenis To: djgpp AT delorie DOT com, "Bob Chapman" Subject: Re: gcc-3.x and file suffix .r (RATFOR) bug? Date: Tue, 22 Oct 2002 13:13:50 +0300 User-Agent: KMail/1.4.7 References: <200210220127 DOT 38891 DOT pavenis AT lanet DOT lv> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Message-Id: <200210221313.50536.pavenis@lanet.lv> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g9MADT216998 Reply-To: djgpp AT delorie DOT com On Tuesday 22 October 2002 07:18, Bob Chapman wrote: > > > > > > Note a difference in the invocation of ratfor, specifically the '/' > > instead > > > > of '\' preceding the name of the temporary file. > > > 2.95.3 "-o c:\windows\temp\ccKLY2yb.f" > > > 3.2 "-o c:\windows\temp/ccDRh6nH.f" > > > > > > [As is probably obvious, I have TEMP=c:\windows\temp] > > > > I see. But I don't know anything about ratfor, so I cannot tell more. > > Please experiment with ratfor command line options to see what works > > and what not, to see what has to be changed. > > > > Andris > > From the PD Ratfor man page: > >RATFOR(1) PD Ratfor in C RATFOR(1) > > > >NAME > > ratfor77 - ratfor preprocessor for fortran77 > > > >SYNOPSIS > > ratfor [-l n] [-C] [-o output] input > > > >PARAMETERS > > -l n user sets starting label n > > > > -o output > > specify output file, otherwise it is stdout > > > > -C keep comments in (useful for compiler directives) > > At first I thought the problem might be the forward slash '/' in the > specification for the temporary file for the gcc 3.2 case. > > However, this version of ratfor uses a 'getopt' that functions like the > 'getopt' in . Consequently, it needs to have the options precede > the input filename. > > Looking at the '-v' output, it can be seen that the 2.95 g77 invoked ratfor > > as follows: > > c:/djgpp/bin/ratfor.exe -o c:\windows\temp\ccKLY2yb.f test.r > > which tells ratfor to take input from 'test.r' and to send the translated > output to temporary file 'c:\windows\temp\ccKLY2yb.f ' instead of stdout. > > The 3.2 g77 invoked ratfor in a similar fashion: > > c:/djgpp/bin/ratfor.exe test.r -o c:\windows\temp/ccDRh6nH.f It seems to be bug in GCC. You may consider submitting a bug report for GCC (see http://gcc.gnu.org/bugs.html). Also You can try my build of 2002/09/26 development version of GCC (note it's a development version and it is not really tested, so it may miscompile sources or behave in some some other weird way, use at Your own risk. At least it was able to bootstrap itself ...), which I patched to swap command line arguments for ratfor (file gcc/f/lang_specs.h) at: http://hal.astr.lu.lv/pub/djgpp/gcc/3.3-20020926/ (I don't have gcc-3.2 build directory tree on machine and also time to do a bootstrapping). > > but, here the input filename precedes the output option and ratfor's > 'getopt' terminates before parsing the 'output' option and the output > defaults to stdout. > > Although I still haven't had time to install Red Hat 8.0 and check the 3.2 > g77 there -- it appears likely that the problem is generic to GCC 3.x. It seems so. > (1) I can change the version of ratfor I'm using to look at all the args > but do you think a GCC bug report is warranted? You may consider submitting a bug report for GCC (see http://gcc.gnu.org/bugs.html). Also You can try my build of 2002/09/26 development version of GCC (note it's a development version and it is not really tested, so it may miscompile sources or behave in some some other weird way, use at Your own risk. At least it was able to bootstrap itself ...), which I patched to swap command line arguments for ratfor (file gcc/f/lang_specs.h) at: http://hal.astr.lu.lv/pub/djgpp/gcc/3.3-20020926/ (I don't have gcc-3.2 build directory tree on machine and also time to do a bootstrapping). Please tell me if these binaries fixes this problem. Andris