From: zhaopingsun on
gcc -MM x.cpp can create header file dependent for CPP
so I try gfortran -MM x.for ,but I got nothing
even when I use gfortran -M x.for ,I got Segmentation fault

Is there any other method create a dependent file for fortran file?
From: FX on
> so I try gfortran -MM x.for, but I got nothing
> even when I use gfortran -M x.for, I got Segmentation fault

In current gfortran, -M is an option that says where module files should
be stored, which explains your first case. There was a bug handling the
case where the user doesn't specify any directory (using "-M" alone)
which you seem to experience, and has been fixed in 4.3.0 IIRC.

> Is there any other method create a dependent file for fortran file?

Not in currently released versions. It is planned for 4.4, as well as a
complete under-the-hood rework of preprocessing (allowing for more
control about the preprocessing style and options).

--
FX