From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Henderson To: Craig Burley Cc: egcs@cygnus.com Subject: g77 assumed array patch [was: fortran regression] Date: Mon, 15 Dec 1997 23:18:00 -0000 Message-id: <19971215230724.05958@dot.cygnus.com> References: <199712112353.SAA07152@melange.gnu.org> X-SW-Source: 1997-12/msg00889.html 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~