This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: fix for the multiple-decl problem - please test
On Saturday 27 December 2008 19:54:31 Andrew Pinski wrote:
> On Sat, Dec 27, 2008 at 1:45 PM, Daniel Franke <franke.daniel@gmail.com>
wrote:
> > On Saturday 27 December 2008 19:34:01 you wrote:
> >> > With -O1, there is no note about an "invalid sum of incoming
> >> > frequencies".
> >> > Does this ring a bell anywhere? Richard?
> >>
> >> Yes the p var_decl was not merged so the middle-end thinks they are
> >> two different variables and just props the first value.
> >
> > Hi Andrew,
> >
> > is there anything I can or should do about it?
>
> Yes global variables also have the multiple-decl issue and not just
> functions :). You need to merge them too.
You are right, unfortunately.
Same with COMMON:
common /global/ p
integer :: p
p = 1
CALL set_p()
IF (p /= 42) CALL ABORT()
END
SUBROUTINE set_p()
common /global/ p
p = 42
END SUBROUTINE
> With your patch the polyhedron test gas_dyn.f90 gives an ICE at -O1
> and above:
>
> [ibook-dhum] lin/test% gfc -O1 gas_dyn.f90
> gas_dyn.f90: In function 'readin':
> gas_dyn.f90:1572: internal compiler error: Bus error
Maybe the same as above?
Daniel