public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/16118] New: Preprocessed source error with -xf77-cpp-input
@ 2004-06-21 17:56 edwardss at whl dot co dot uk
  2004-07-11 16:01 ` [Bug fortran/16118] " tobi at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: edwardss at whl dot co dot uk @ 2004-06-21 17:56 UTC (permalink / raw)
  To: gcc-bugs

An error occurs when specifying that fixed form source should be pre-processed
as follows:

> gfortran -save-temps -c foo.F

Keeps the preprocessed foo.f in the current directory, but

> gfortran -save-temps -xf77-cpp-input -c foo.f

does not keep the intermediate .f file in /tmp.

-- 
           Summary: Preprocessed source error with -xf77-cpp-input
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: edwardss at whl dot co dot uk
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug fortran/16118] Preprocessed source error with -xf77-cpp-input
  2004-06-21 17:56 [Bug fortran/16118] New: Preprocessed source error with -xf77-cpp-input edwardss at whl dot co dot uk
@ 2004-07-11 16:01 ` tobi at gcc dot gnu dot org
  2004-08-14  7:43 ` [Bug driver/16118] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-07-11 16:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-07-11 16:01 -------
For me, it keeps the temporary file in the local directory. Do you mean it
should keep it in /tmp or is that a pasto?

[tobi@marktplatz tests]$ rm preproc.[fso]
[tobi@marktplatz tests]$ gfortran -save-temps -xf77-cpp-input -c preproc.F
[tobi@marktplatz tests]$ ls preproc.*
preproc.f  preproc.F  preproc.o  preproc.s
[tobi@marktplatz tests]$ rm preproc.[fso]
[tobi@marktplatz tests]$ gfortran -save-temps -c preproc.F
[tobi@marktplatz tests]$ ls preproc.*
preproc.f  preproc.F  preproc.o  preproc.s
[tobi@marktplatz tests]$


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tobi at gcc dot gnu dot org
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug driver/16118] Preprocessed source error with -xf77-cpp-input
  2004-06-21 17:56 [Bug fortran/16118] New: Preprocessed source error with -xf77-cpp-input edwardss at whl dot co dot uk
  2004-07-11 16:01 ` [Bug fortran/16118] " tobi at gcc dot gnu dot org
@ 2004-08-14  7:43 ` pinskia at gcc dot gnu dot org
  2004-12-28  4:24 ` cvs-commit at gcc dot gnu dot org
  2004-12-28 14:45 ` roger at eyesopen dot com
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-14  7:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-14 07:43 -------
Confirmed, note the file name has to be name with a lowercase .f so the driver will not override the file.

I think the same issue is with .s and -xassembler-with-cpp also.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
          Component|fortran                     |driver
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-14 07:43:07
               date|                            |


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


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

* [Bug driver/16118] Preprocessed source error with -xf77-cpp-input
  2004-06-21 17:56 [Bug fortran/16118] New: Preprocessed source error with -xf77-cpp-input edwardss at whl dot co dot uk
  2004-07-11 16:01 ` [Bug fortran/16118] " tobi at gcc dot gnu dot org
  2004-08-14  7:43 ` [Bug driver/16118] " pinskia at gcc dot gnu dot org
@ 2004-12-28  4:24 ` cvs-commit at gcc dot gnu dot org
  2004-12-28 14:45 ` roger at eyesopen dot com
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-28  4:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-12-28 04:24 -------
Subject: Bug 16118

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	sayle@gcc.gnu.org	2004-12-28 04:24:33

Modified files:
	gcc            : ChangeLog 
	gcc/doc        : invoke.texi 

Log message:
	PR driver/16118
	* doc/invoke.texi: Document the interaction between -save-temps
	and -x.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6963&r2=2.6964
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/invoke.texi.diff?cvsroot=gcc&r1=1.562&r2=1.563



-- 


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


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

* [Bug driver/16118] Preprocessed source error with -xf77-cpp-input
  2004-06-21 17:56 [Bug fortran/16118] New: Preprocessed source error with -xf77-cpp-input edwardss at whl dot co dot uk
                   ` (2 preceding siblings ...)
  2004-12-28  4:24 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-28 14:45 ` roger at eyesopen dot com
  3 siblings, 0 replies; 5+ messages in thread
From: roger at eyesopen dot com @ 2004-12-28 14:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From roger at eyesopen dot com  2004-12-28 14:45 -------
The consensus amongst GCC developers is that it would be incorrect/unsafe to
preserve the ".f" file in the shared system /tmp area.  The only reason that
the preprocessed .f file is being placed in /tmp, is to avoid overwriting the
user's source file foo.f in the current directory.  The appropriate solution,
as I've now documented in the GCC manual, is that when explicitly using "-x",
if you require a particular intermediate file from -save-temps, you need to
ensure that it's file name doesn't conflict with the input source name.

In your example, the input source file could be renamed foo.F (as you suggest),
or foo.for, or foo.fpp etc... or perhaps placed in a different subdirectory.

Although not a bug, this PR could potentially be considered an "enhancement
request", but the difficultly of generating a unique file name in the current
directory and informing the user of it's location, would be a technically
complex work-around for what would be considered by many a "user error".
The "-x" and "--language" command line options should be used with care and
are far less preferrable to using the "conventional" file extensions for the
various source file formats.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


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


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

end of thread, other threads:[~2004-12-28 14:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-21 17:56 [Bug fortran/16118] New: Preprocessed source error with -xf77-cpp-input edwardss at whl dot co dot uk
2004-07-11 16:01 ` [Bug fortran/16118] " tobi at gcc dot gnu dot org
2004-08-14  7:43 ` [Bug driver/16118] " pinskia at gcc dot gnu dot org
2004-12-28  4:24 ` cvs-commit at gcc dot gnu dot org
2004-12-28 14:45 ` roger at eyesopen dot com

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).