On Tue, Nov 06, 2012 at 12:58:07AM +0100, Martin Jambor wrote: > 2012-11-05 Martin Jambor <mjam...@suse.cz> > > PR tree-optimization/53787 > * ipa-cp.c (ipcp_value_source): New field offset. ...
Is this supposed to do something about Fortran array descriptors where some fields in the descriptors have known constant values in the caller? Say subroutine bar (a, b, n) integer :: a(n), b(n) call foo (a, b) contains subroutine foo (a, b) integer :: a(:), b(:) a = b end subroutine end -O2 -fno-inline (there could be thousands of better testcases though, this one doesn't look at too many fields). With your patch foo.1899.constprop.0 is created, but I don't see any immediate other effects. Certainly e.g. _2 = a_1(D)->dim[0].stride; if (_2 != 0) remains till *.optimized dump, even when in the caller it is set to 1. I guess for Fortran being able to optimize on constant (or even better constant one) stride would be very worthwhile. Jakub