------- 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
