------- Comment #5 from dfranke at gcc dot gnu dot org 2010-05-09 18:31 -------
This improved at some point. We still create the temporary array, but the
optimizer got smarter:
$> gfortran-svn -O3 -fdump-tree-optimized -Warray-temporaries -c pr33341.f90
pr33341.f90:5.8:
foo = all((/ a, b, c /) /= d)
1
Warning: Creating array temporary at (1)
$> cat pr33341.f90.142t.optimized
;; Function foo (foo_)
foo (integer(kind=4) & restrict a, integer(kind=4) & restrict b,
integer(kind=4) & restrict c, integer(kind=4) & restrict d)
{
logical(kind=4) test.0;
integer(kind=4) D.1525;
integer(kind=4) D.1533;
integer(kind=4) D.1532;
integer(kind=4) D.1531;
<bb 2>:
D.1531_7 = *a_6(D);
D.1532_11 = *b_10(D);
D.1533_15 = *c_14(D);
D.1525_17 = *d_16(D);
if (D.1531_7 == D.1525_17)
goto <bb 5>;
else
goto <bb 3>;
<bb 3>:
if (D.1532_11 == D.1525_17)
goto <bb 5>;
else
goto <bb 4>;
<bb 4>:
test.0_32 = D.1533_15 != D.1525_17;
<bb 5>:
# test.0_1 = PHI <0(2), 0(3), test.0_32(4)>
return test.0_1;
}
Should we keep the PR open to (eventually) eliminate the temporary or does this
count as fixed?
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33341