This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/45396] Apply front-end pass also for arrays



------- Comment #1 from burnus at gcc dot gnu dot org  2010-08-24 10:29 -------
Stupid example: Change either a == a to "a /= a" and .true. to .false. -- or
ANY to ALL. Otherwise the example does not make sense (even though it is
valid).


If one is there, one could also optimize the following:

logical :: ll
if (ALL ( [.false. , ll])) call unreachable()
end

As the single .false. makes the whole expression .false.; similarly for ANY and
.true. and for PRODUCT with an element of value 0 (though, one needs to take
case of DIM is present). 

Currently, the middle end optimizes this - though there might be cases when an
early FE optimization could help - e.g. if DIM is present as then a RTL call
could happen.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45396


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]