g77 assumed array patch [was: fortran regression]

Richard Henderson rth@cygnus.com
Mon Dec 15 23:18:00 GMT 1997


On Thu, Dec 11, 1997 at 06:53:48PM -0500, Craig Burley wrote:
> What I believe I *wanted* to do, long ago, is have g77 simply
> leave the *upper* bound unspecified, i.e. a NULL_TREE, and
> have the back end simply cope.  That would be an explicitly
> documented way to say "upper bound not specified, may be as
> high as the corresponding actual-argument's upper bound".
> 
> But it wasn't then, and might not be now, easy to teach the
> back end about this construct.  If it is now, that would be
> my suggestion -- it's a trivial change in the g77 front end,
> but if someone can implement the back-end changes to cope with
> a NULL_TREE in the "upper" part of a build_range_type call.

The following patch implements this suggestion.

It compiles the null test case

      subroutine star(aap, noot)                
      dimension aap(*)                                        
      end                                       

well enough; I'm about to sick it on SpecFP (which is actually my main
impetus to fix this -- I want to see how well my giv patch works ;-)
So we'll see how well it does on real code soon enough.

I believe I've gotten all of the cases elsewhere in the compiler that
were assuming an upper bound existed.  I may have missed some, and I
may have changed some that could not possibly be called on a range type.
Someone else ought to look through and verify that.


r~


More information about the Gcc mailing list