------- Comment #16 from rguenth at gcc dot gnu dot org  2010-04-30 15:17 
-------
(In reply to comment #15)
> > ... without -fwhole-file.  But all IPA optimizations rely on that, so it's
> > critical that -fwhole-file is enabled.
> 
> -fwhole-file works only at the file level, i.e., if proc_ptr_comp_12.f90 is
> split as:
> 
> [macbook] f90/bug% cat aa.f90
> ! { dg-do run }
> !
> ! PR 40646: [F03] array-valued procedure pointer components
> !
> ! Original test case by Charlie Sharpsteen <ch...@sharpsteen.net>
> ! Modified by Janus Weil <ja...@gcc.gnu.org>
> 
> module bugTestMod
>   implicit none
>   type:: boundTest
>     procedure(returnMat), pointer, nopass:: test
>   end type boundTest
> contains
>   function returnMat( a, b ) result( mat )
>     integer:: a, b
>     double precision, dimension(a,b):: mat 
>     mat = 1d0
>   end function returnMat
> end module bugTestMod
> 
> [macbook] f90/bug% cat bb.f90
> program bugTest
>   use bugTestMod

As far as I understand this use statement causes GFortran to read in the
bytecode from the .mod file and combine the files again to a single
translation unit.  So this split is in fact not a split.


-- 


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

Reply via email to