[Patch, fortran] Simplify lbound for array subcomponents

Mikael Morin mikael.morin@sfr.fr
Mon Apr 27 11:18:00 GMT 2015


Hello,

while reviewing Thomas' bound simplification patch, I noticed that the
{l,u}bound simplification code wasn't handling array subcomponents.
Fixed by the attached patch, regression tested.  OK for trunk?

Mikael





-------------- next part --------------
2015-04-27  Mikael Morin  <mikael@gcc.gnu.org>

	* simplify.c (simplify_bound_dim): Tighten the check for array fullness
	by also checking for absence of subreference.
	(simplify_bound): Don't skip simplification if the array
	has subreferences.
	(simplify_cobound): Same.

2015-04-27  Mikael Morin  <mikael@gcc.gnu.org>

	* gfortran.dg/bound_simplify_4.f90: New.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bound_simplify.diff
Type: text/x-patch
Size: 1178 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20150427/ed46f379/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bound_simplification_4.f90
Type: text/x-fortran
Size: 965 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20150427/ed46f379/attachment-0001.bin>


More information about the Fortran mailing list