Feature regression in gcc: -M option not available in gcc-gfortran-4.4

Solution Unverified - Updated -

Issue

  • Feature regression in gcc: -M option not available in gcc-gfortran-4.4
  • To reproduce the problem, create the following files:
  • mtest.F:

#include "mtest.h"
        x(1) = 2
        print 10, x(1)
10     format(' Hello World, x(1) =', i5)
        end

  • mtest.h:

        integer x(10)

  • Run the following command:

root@gncc mtest # gcc -M mtest.F

  • The output with gcc-4.4 is:

f951: warning: command line option "-M" is valid for C/C++/Java/ObjC/ObjC++ but not for Fortran

  • This was not the case with RHEL-5 and earlier:

root@gncc mtest # gcc -M mtest.F
mtest.o: mtest.F mtest.h

Environment

  • Red Hat Enterprise Linux 6
  • gcc-gfortran

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.