Patchwork [Fortran] PR52916 - fix TREE_PUBLIC() = 0 for module procedures

login
register
mail settings
Submitter Tobias Burnus
Date April 15, 2012, 5:34 p.m.
Message ID <4F8B068B.3030507@net-b.de>
Download mbox | patch
Permalink /patch/152675/
State New
Headers show

Comments

Tobias Burnus - April 15, 2012, 5:34 p.m.
H.J. Lu wrote:
> The testcase failed with
>
> /export/gnu/import/git/gcc-test-ia32/src-trunk/gcc/testsuite/gfortran.dg/public_private_module_4.f90:11.4:^M
> ^M
> use m^M
>      1^M
> Fatal Error: Can't open module file 'm.mod' for reading at (1): No
> such file or directory^M
> compiler exited with status 1

Ups. Seemingly, the mod files in the testsuite/gfortran.dg got picked 
up. Additional sources are appended after the main source - rather than 
the other way round.

I intent to fix it with the following patch.

Thanks for testing!

Tobias

Patch

Index: public_private_module_3.f90
===================================================================
--- public_private_module_3.f90 (Revision 186467)
+++ public_private_module_3.f90 (Arbeitskopie)
@@ -1,7 +1,6 @@ 
-! { dg-do compile }
+! { dg-do link }
+! { dg-additional-sources public_private_module_4.f90 }
  !
-! To be used by public_private_module_4.f90
-!
  ! PR fortran/52916
  ! Cf. PR fortran/40973
  !
Index: public_private_module_4.f90
===================================================================
--- public_private_module_4.f90 (Revision 186467)
+++ public_private_module_4.f90 (Arbeitskopie)
@@ -1,6 +1,7 @@ 
-! { dg-do link }
-! { dg-additional-sources public_private_module_3.f90 }
+! { dg-do compile  { target skip-all-targets } }
  !
+! To be used by public_private_module_3.f90
+!
  ! PR fortran/52916
  ! Cf. PR fortran/40973
  !