public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
@ 2022-12-08 15:58 ` barrowes at alum dot mit.edu
  2022-12-08 16:44 ` jakub at gcc dot gnu.org
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: barrowes at alum dot mit.edu @ 2022-12-08 15:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #4 from Ben Barrowes <barrowes at alum dot mit.edu> ---
It has been a while.

Is there any way to save the temporary preprocessed files in gfortran?

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
  2022-12-08 15:58 ` [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files barrowes at alum dot mit.edu
@ 2022-12-08 16:44 ` jakub at gcc dot gnu.org
  2022-12-08 17:35 ` barrowes at alum dot mit.edu
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-12-08 16:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
If you use test.F90 extension, -save-temps will produce test.f90 with
preprocessed source, that is how it should behave.
Now, for *.F or *.F08 etc. extensions it still creates *.f90, I'd say it should
create
*.f, *.f08 etc. instead.  And finally for the -cpp case where the source
contains an extension that is meant for files that don't need preprocessing,
either we could use a temporary filename, or say append suffix to the filename
instead of removing its suffix and appending a new extension.

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
  2022-12-08 15:58 ` [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files barrowes at alum dot mit.edu
  2022-12-08 16:44 ` jakub at gcc dot gnu.org
@ 2022-12-08 17:35 ` barrowes at alum dot mit.edu
  2022-12-08 17:38 ` jakub at gcc dot gnu.org
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: barrowes at alum dot mit.edu @ 2022-12-08 17:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #6 from Ben Barrowes <barrowes at alum dot mit.edu> ---
There are many cases where people do not use a capital "F", but still have
preprocessor directives in the code. In these cases, no proprocessed file is
written out right now, AFAIK.

So perhaps as you suggest we could add a new suffix to the old filename. Then
test1.f would become test.f.i and test1.f90 would also become test1.f.i, etc.
Having this one rule would be a concise solution and have a guaranteed output
in all cases.

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2022-12-08 17:35 ` barrowes at alum dot mit.edu
@ 2022-12-08 17:38 ` jakub at gcc dot gnu.org
  2022-12-08 17:43 ` barrowes at alum dot mit.edu
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-12-08 17:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
*.i would be definitely wrong, that is for preprocessed C (*.ii is for
preprocessed C++, *.mi for preprocessed ObjC, etc.).

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2022-12-08 17:38 ` jakub at gcc dot gnu.org
@ 2022-12-08 17:43 ` barrowes at alum dot mit.edu
  2022-12-08 22:11 ` kargl at gcc dot gnu.org
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: barrowes at alum dot mit.edu @ 2022-12-08 17:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #8 from Ben Barrowes <barrowes at alum dot mit.edu> ---
Maybe *.fpp ?

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-12-08 17:43 ` barrowes at alum dot mit.edu
@ 2022-12-08 22:11 ` kargl at gcc dot gnu.org
  2022-12-09  1:50 ` barrowes at alum dot mit.edu
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-12-08 22:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #9 from kargl at gcc dot gnu.org ---
(In reply to Ben Barrowes from comment #8)
> Maybe *.fpp ?

We already have too many extensions for Fortran.
How about simply redirecting stdout

gfortran -cpp -E file.f90 > preprocessed.f90

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2022-12-08 22:11 ` kargl at gcc dot gnu.org
@ 2022-12-09  1:50 ` barrowes at alum dot mit.edu
  2022-12-09  2:45 ` sgk at troutmask dot apl.washington.edu
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: barrowes at alum dot mit.edu @ 2022-12-09  1:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #10 from Ben Barrowes <barrowes at alum dot mit.edu> ---
The reason the stdout redirection doesn't work for me is because I want to save
these preprocessed files during a "make" session. When I make, thousands of
fotran files are preprocessed and compiled. How do I save the stdout from each
one into its own directory?

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2022-12-09  1:50 ` barrowes at alum dot mit.edu
@ 2022-12-09  2:45 ` sgk at troutmask dot apl.washington.edu
  2022-12-09 13:25 ` barrowes at alum dot mit.edu
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2022-12-09  2:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #11 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Fri, Dec 09, 2022 at 01:50:56AM +0000, barrowes at alum dot mit.edu wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615
> 
> --- Comment #10 from Ben Barrowes <barrowes at alum dot mit.edu> ---
> The reason the stdout redirection doesn't work for me is because
> I want to save these preprocessed files during a "make" session.
> When I make, thousands of fotran files are preprocessed and compiled.
> How do I save the stdout from each one into its own directory?
> 

% cat > a1.f90
subroutine foo
end subroutine foo
% cp a1.f90 b1.f90
% cp a1.f90 c1.f90
% cp a1.f90 d1.f90
% cat Makefile
FC = gfortran11
FF = -cpp -E
IN = f90
OUT = txt

NAMES = a1 b1 c1 d1

all:
.for i in ${NAMES}
        ${FC} ${FF} $i.${IN} > $i.${OUT}
.endfor
% make 
gfortran11 -cpp -E a1.f90 > a1.txt
gfortran11 -cpp -E b1.f90 > b1.txt
gfortran11 -cpp -E c1.f90 > c1.txt
gfortran11 -cpp -E d1.f90 > d1.txt
% ls
Makefile        a1.txt          b1.txt          c1.txt          d1.txt
a1.f90          b1.f90          c1.f90          d1.f90

The preprocessed files appear in the same directory with its source
source file.  It's trivial matter to have preprocess stuffed into
its own directory.

PS: Having to preprocess thousands of Fortran files into individual
directories seems to be poor software design.

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2022-12-09  2:45 ` sgk at troutmask dot apl.washington.edu
@ 2022-12-09 13:25 ` barrowes at alum dot mit.edu
  2022-12-09 19:34 ` kargl at gcc dot gnu.org
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: barrowes at alum dot mit.edu @ 2022-12-09 13:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #12 from Ben Barrowes <barrowes at alum dot mit.edu> ---
I use these intermediate files during the software analysis process, but then
delete them later. They are useful for me to have.

When I am given a makefile, it is often 1000's loc. I am not sure I want to go
in and modify it such as you suggest below and tell the customer it is for
their own good. I'd rather be able to set a couple of switches to the
preprocessor and get what I want.

gfortran already allows to create a *.d file in each directory for each file.
Is that poor software design as well? And when gfortran files are preprocessed
all into a *.f90 file, except when they are not (see Thomas's email below), is
that poor software design?

ifort allows for the creation of these intermediate preprocessed files,
creating *.i and *.i90 files.

IBM XL allows this as well using the -d switch:
https://www.ibm.com/docs/en/xl-fortran-aix/16.1.0?topic=preprocessor-passing-fortran-files-through-c
And the intermediate filename becomes Ffilename.f*

Can gfortran be modified to have the option to do this as well?

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2022-12-09 13:25 ` barrowes at alum dot mit.edu
@ 2022-12-09 19:34 ` kargl at gcc dot gnu.org
  2022-12-10  1:47 ` barrowes at alum dot mit.edu
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-12-09 19:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
           Priority|P3                          |P5

--- Comment #13 from kargl at gcc dot gnu.org ---
(In reply to Ben Barrowes from comment #12)

> Can gfortran be modified to have the option to do this as well?

Sure, gfortran can be modified.  The nontrivial part is that there are very few
active contributors to gfortran.  I suspect your patch would be much
appreciated.


Until then, you can modify your Makefile with very minor changes to stuff
intermediate files into subdirectories.

% ls
Makefile        a1.f90          b1.f90          c1.f90          d1.f90
% cat Makefile 
FC = gfortran11
PP = preprocessed/
FF = -c -cpp -save-temps -dumpdir ${PP}
IN = f90
NAMES = a1 b1 c1 d1

all:
        mkdir -p ${PP}
.for i in ${NAMES}
        ${FC} ${FF} $i.${IN}
.endfor

clean:
        @rm -rf ${PP} *.o

% make
mkdir -p preprocessed/
gfortran11 -c -cpp -save-temps -dumpdir preprocessed/ a1.f90
gfortran11 -c -cpp -save-temps -dumpdir preprocessed/ b1.f90
gfortran11 -c -cpp -save-temps -dumpdir preprocessed/ c1.f90
gfortran11 -c -cpp -save-temps -dumpdir preprocessed/ d1.f90
% ls
Makefile        a1.o            b1.o            c1.o            d1.o
a1.f90          b1.f90          c1.f90          d1.f90          preprocessed/
% ls preprocessed/
a1.f90  a1.s    b1.f90  b1.s    c1.f90  c1.s    d1.f90  d1.s

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2022-12-09 19:34 ` kargl at gcc dot gnu.org
@ 2022-12-10  1:47 ` barrowes at alum dot mit.edu
  2022-12-10  2:04 ` sgk at troutmask dot apl.washington.edu
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: barrowes at alum dot mit.edu @ 2022-12-10  1:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #14 from Ben Barrowes <barrowes at alum dot mit.edu> ---
Thanks for engaging, and thanks for the suggestion. I might be able to do this
over the winter. Could you give me a hint as to where to look. Which files.

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2022-12-10  1:47 ` barrowes at alum dot mit.edu
@ 2022-12-10  2:04 ` sgk at troutmask dot apl.washington.edu
  2022-12-11 10:29 ` rimvydas.jas at gmail dot com
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2022-12-10  2:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #15 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Sat, Dec 10, 2022 at 01:47:44AM +0000, barrowes at alum dot mit.edu wrote:
> 
> Thanks for engaging, and thanks for the suggestion. I might be able to do this
> over the winter. Could you give me a hint as to where to look. Which files.
> 

I suspect that you should start by understand gcc/fortran/lang-specs.h.
That's where most of the the filename suffixes are defined.  In particular,
this chuck of code

/* Identical to gcc.cc (cpp_options), but omitting %(cpp_unique_options)
   and -fpch-preprocess on -save-temps.  */
#define CPP_ONLY_OPTIONS    "%1 %{m*} %{f*} %{g*:%{!g0:%{g*} \
                             %{!fno-working-directory:-fworking-directory}}} \
                             %{std*&ansi&trigraphs} %{W*&pedantic*} %{w} \
                             %{O*} %{undef}"

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2022-12-10  2:04 ` sgk at troutmask dot apl.washington.edu
@ 2022-12-11 10:29 ` rimvydas.jas at gmail dot com
  2023-12-19 13:29 ` acoplan at gcc dot gnu.org
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: rimvydas.jas at gmail dot com @ 2022-12-11 10:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

Rimvydas (RJ) <rimvydas.jas at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rimvydas.jas at gmail dot com

--- Comment #16 from Rimvydas (RJ) <rimvydas.jas at gmail dot com> ---
Created attachment 54063
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54063&action=edit
rename intermediate extensions to .fi or .fii

Emitting intermediate files using plain foo.f90 form is a very annoying issue
when trying to modernize archaic codebases to be used in current projects and
it really helps when intermediate files could be saved without disturbing used
native build system habitat.  Consider the following:
$ cat bar.F
       SUBROUTINEABINIT PART 2( ARGU
     x                          MENT)
       E N D S   U   B   R   O   U   T   I   N  E
$ gfortran --save-temps -c bar.F
$ gfortran -c bar.s
$ gfortran -c bar.f90
bar.F:1:8:

    1 |        SUBROUTINEABINIT PART 2( ARGU
      |        1
Error: Unclassifiable statement at (1)

This shows that intermediate Fortran source produced cannot be used again
because of fixed/free form differences while assembly file is fine.  There are
N+K build system variants that do crazy and wonderful things like
filtering/substituting flags, redirecting STDERR/STDOUT for cleaner warning
messages, silently moving sources and objects with strange rules, hiding
compilation lines in python scripts, substituting symbol names in assembly
files and even substituting names in source code on the fly to solve symbol
conflicts between contrib codebases using sed(1) or heavy cpp(1).  So sometimes
it is simply easier to modify the compiler and recompile (after all it does not
take long for gcc).
Attached is a simple diff variant that uses F77/F90+ to emit .fi/.fii
intermediate source files accordingly (inspired by what ObjC/ObjC++ do with
intermediates .mi/.mii files).  Such small change really helped to
double/triple crosscheck very complicated project with mixed F77/F90 using
sometimes crazy cpp(1) macros for the "hooks".  Using .fii extension for all
sources of .F90/.F95/.F03/.F08/.Fyz seems like a logical solution.

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2022-12-11 10:29 ` rimvydas.jas at gmail dot com
@ 2023-12-19 13:29 ` acoplan at gcc dot gnu.org
  2023-12-19 19:50 ` anlauf at gcc dot gnu.org
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: acoplan at gcc dot gnu.org @ 2023-12-19 13:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

Alex Coplan <acoplan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |acoplan at gcc dot gnu.org

--- Comment #17 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Just a ping: it would be nice if this could be fixed, I'm currently trying to
debug/reduce a miscompiled benchmark which has *.f90 source files but
-save-temps isn't useful due to this issue.

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2023-12-19 13:29 ` acoplan at gcc dot gnu.org
@ 2023-12-19 19:50 ` anlauf at gcc dot gnu.org
  2023-12-19 20:04 ` jvdelisle at gcc dot gnu.org
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-12-19 19:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #18 from anlauf at gcc dot gnu.org ---
(In reply to Alex Coplan from comment #17)
> Just a ping: it would be nice if this could be fixed, I'm currently trying
> to debug/reduce a miscompiled benchmark which has *.f90 source files but
> -save-temps isn't useful due to this issue.

The patch in comment#16 seems to work and looks good to me, but it appears
to never have been submitted for review.

One could also add a mini-section in invoke.texi by borrowing from
gcc/doc/invoke.texi (-> Developer Options) and add a minimal example
for -save-temps in the context of gfortran use.

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2023-12-19 19:50 ` anlauf at gcc dot gnu.org
@ 2023-12-19 20:04 ` jvdelisle at gcc dot gnu.org
  2023-12-19 20:10 ` anlauf at gcc dot gnu.org
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2023-12-19 20:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot gnu.org

--- Comment #19 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to anlauf from comment #18)
> (In reply to Alex Coplan from comment #17)
> > Just a ping: it would be nice if this could be fixed, I'm currently trying
> > to debug/reduce a miscompiled benchmark which has *.f90 source files but
> > -save-temps isn't useful due to this issue.
> 
> The patch in comment#16 seems to work and looks good to me, but it appears
> to never have been submitted for review.
> 
> One could also add a mini-section in invoke.texi by borrowing from
> gcc/doc/invoke.texi (-> Developer Options) and add a minimal example
> for -save-temps in the context of gfortran use.

It seems simple. Shall we post the patch to make sure we dont get any broader
objections? If none, then we commit.

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2023-12-19 20:04 ` jvdelisle at gcc dot gnu.org
@ 2023-12-19 20:10 ` anlauf at gcc dot gnu.org
  2023-12-20 19:24 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-12-19 20:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #20 from anlauf at gcc dot gnu.org ---
(In reply to Jerry DeLisle from comment #19)
> (In reply to anlauf from comment #18)
> > (In reply to Alex Coplan from comment #17)
> > > Just a ping: it would be nice if this could be fixed, I'm currently trying
> > > to debug/reduce a miscompiled benchmark which has *.f90 source files but
> > > -save-temps isn't useful due to this issue.
> > 
> > The patch in comment#16 seems to work and looks good to me, but it appears
> > to never have been submitted for review.
> > 
> > One could also add a mini-section in invoke.texi by borrowing from
> > gcc/doc/invoke.texi (-> Developer Options) and add a minimal example
> > for -save-temps in the context of gfortran use.
> 
> It seems simple. Shall we post the patch to make sure we dont get any
> broader objections? If none, then we commit.

I'd say let's first give Rimvydas a chance to complete the patch with
a commit message, and to submit to the ML.  He's the author, and he has
submitted patches which he properly signed-off.

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (16 preceding siblings ...)
  2023-12-19 20:10 ` anlauf at gcc dot gnu.org
@ 2023-12-20 19:24 ` cvs-commit at gcc dot gnu.org
  2023-12-28 20:22 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-20 19:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #21 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:ba615557a4c698d27042a5fe058ea6e721a03b12

commit r14-6758-gba615557a4c698d27042a5fe058ea6e721a03b12
Author: Rimvydas Jasinskas <rimvydas.jas@gmail.com>
Date:   Wed Dec 20 03:39:33 2023 +0000

    Fortran: Use non conflicting file extensions for intermediates [PR81615]

    gcc/ChangeLog:

            * doc/invoke.texi: Document the new file extensions

    gcc/fortran/ChangeLog:

            PR fortran/81615
            * lang-specs.h (F951_CPP_OPTIONS): Do not hardcode ".f90" extension
            (F951_CPP_EXTENSION): Use .fi/.fii for fixed/free form sources
            * options.cc (form_from_filename): Handle the new extensions

    Signed-off-by: Rimvydas Jasinskas <rimvydas.jas@gmail.com>

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (17 preceding siblings ...)
  2023-12-20 19:24 ` cvs-commit at gcc dot gnu.org
@ 2023-12-28 20:22 ` cvs-commit at gcc dot gnu.org
  2023-12-29 20:26 ` anlauf at gcc dot gnu.org
  2024-01-02  9:26 ` acoplan at gcc dot gnu.org
  20 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-28 20:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #22 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:2cb93e6686e4af5725d8c919cf19f535a7f3aa33

commit r14-6857-g2cb93e6686e4af5725d8c919cf19f535a7f3aa33
Author: Rimvydas Jasinskas <rimvydas.jas@gmail.com>
Date:   Sat Dec 23 18:59:09 2023 +0000

    Fortran: Add Developer Options mini-section to documentation

    Separate out -fdump-* options to the new section.  Sort by option name.

    While there, document -save-temps intermediates.

    gcc/fortran/ChangeLog:

            PR fortran/81615
            * invoke.texi: Add Developer Options section.  Move '-fdump-*'
            to it.  Add small examples about changed '-save-temps' behavior.

    Signed-off-by: Rimvydas Jasinskas <rimvydas.jas@gmail.com>

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (18 preceding siblings ...)
  2023-12-28 20:22 ` cvs-commit at gcc dot gnu.org
@ 2023-12-29 20:26 ` anlauf at gcc dot gnu.org
  2024-01-02  9:26 ` acoplan at gcc dot gnu.org
  20 siblings, 0 replies; 21+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-12-29 20:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |14.0

--- Comment #23 from anlauf at gcc dot gnu.org ---
The issue should be fixed in gcc-14, and the changed behavior of -save-temps
documented.

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

* [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files
       [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
                   ` (19 preceding siblings ...)
  2023-12-29 20:26 ` anlauf at gcc dot gnu.org
@ 2024-01-02  9:26 ` acoplan at gcc dot gnu.org
  20 siblings, 0 replies; 21+ messages in thread
From: acoplan at gcc dot gnu.org @ 2024-01-02  9:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81615

--- Comment #24 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Thanks a lot for the fix!

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

end of thread, other threads:[~2024-01-02  9:26 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-81615-4@http.gcc.gnu.org/bugzilla/>
2022-12-08 15:58 ` [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files barrowes at alum dot mit.edu
2022-12-08 16:44 ` jakub at gcc dot gnu.org
2022-12-08 17:35 ` barrowes at alum dot mit.edu
2022-12-08 17:38 ` jakub at gcc dot gnu.org
2022-12-08 17:43 ` barrowes at alum dot mit.edu
2022-12-08 22:11 ` kargl at gcc dot gnu.org
2022-12-09  1:50 ` barrowes at alum dot mit.edu
2022-12-09  2:45 ` sgk at troutmask dot apl.washington.edu
2022-12-09 13:25 ` barrowes at alum dot mit.edu
2022-12-09 19:34 ` kargl at gcc dot gnu.org
2022-12-10  1:47 ` barrowes at alum dot mit.edu
2022-12-10  2:04 ` sgk at troutmask dot apl.washington.edu
2022-12-11 10:29 ` rimvydas.jas at gmail dot com
2023-12-19 13:29 ` acoplan at gcc dot gnu.org
2023-12-19 19:50 ` anlauf at gcc dot gnu.org
2023-12-19 20:04 ` jvdelisle at gcc dot gnu.org
2023-12-19 20:10 ` anlauf at gcc dot gnu.org
2023-12-20 19:24 ` cvs-commit at gcc dot gnu.org
2023-12-28 20:22 ` cvs-commit at gcc dot gnu.org
2023-12-29 20:26 ` anlauf at gcc dot gnu.org
2024-01-02  9:26 ` acoplan at gcc dot gnu.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).