------- Comment #64 from burnus at gcc dot gnu dot org  2010-07-24 11:31 -------
Reduced a tiny bit more. If one swaps "one" and "two" (functions or use) it
works - if one swaps both, it fails again. Wild guess: gfortran does not
properly walk the tree.

Failure with -fwhole-file:
  /tmp/ccN7F1tB.o: In function `__mod_MOD_four':
  test.f90:(.text+0x3): undefined reference to `one_'


SUBROUTINE one ( )
END SUBROUTINE one

SUBROUTINE two ( )
END SUBROUTINE two

MODULE mod
CONTAINS
  SUBROUTINE three ( )
    CALL two ( )
  END SUBROUTINE three
  SUBROUTINE four ( )
      CALL one ( )
  END SUBROUTINE four
END MODULE mod
END


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu dot
                   |                            |org
         AssignedTo|pault at gcc dot gnu dot org|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011

Reply via email to