https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114922
Bug ID: 114922
Summary: fsyntax-only need the modules
Product: gcc
Version: 13.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: axel.ehr...@tu-clausthal.de
Target Milestone: ---
Created attachment 58087
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58087&action=edit
Short Example for this problem
I encounter the following problem with gfortran: When I try to compile a file
(such as the one attached) with the options -c -fsyntax-only,
that is
"gfortran -c -fsyntax-only syntax-only_test.f90"
I receive the following error message:
--
syntax-only_test.f90:2:5:
2 | use module
| 1
Fatal Error: Cannot open module file 'module.mod' for reading at (1): No such
file or directory
compilation terminated.
---
One purpose of the option "-fsyntax-only" is to create the module files (.mod),
however, without doing the compilation that would require module files. The
observed behaviour appears like a bug in gfortran.
I used
https://aoterodelaroza.github.io/devnotes/modern-fortran-makefiles/
to look how i can solve the problem with the depends of mod files.
Best regards,
Axel