From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 29B4C384D3D8; Fri, 9 Dec 2022 19:34:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 29B4C384D3D8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1670614494; bh=j4S5TQYwQrCdN1Y4DWNQqaDhVAMyHjoaExyDEv2grpc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=j/ySEcH2WeERuGYAreC8Khh25hjGvwLZRnxS33TIPaZzxjWf8sWSn3A4vht2rJ2ey 41vCZnLeoRvDO6RPCxy8Qwmiehxp1l9WkLOBm7ceiWJZZ8MdD76m4hw7PSKRfe3GTt jHhRmGH4hk1mhcro2HB+IS0TSNmwKd11lvrcJJA0= From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/81615] save-temps and gfortran produces *.f90 files instead of *.i or *i90 files Date: Fri, 09 Dec 2022 19:34:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: kargl at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P5 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_severity priority Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D81615 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=20 FC =3D gfortran11 PP =3D preprocessed/ FF =3D -c -cpp -save-temps -dumpdir ${PP} IN =3D f90 NAMES =3D 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 preprocesse= d/ % ls preprocessed/ a1.f90 a1.s b1.f90 b1.s c1.f90 c1.s d1.f90 d1.s=