/* * This benchmark is intended to demonstrate failure of Build #17725 * (and all earlier ones?) to WLF/AWLF the computation of Z. * * The immediate cause is that, under SAA, the shapes of AAA, BBB, and * CCC passed into the CONDFUN are different N_ids, and the * compiler has no way to peek back into the call from main() * to determine that they all represent the same shape. * * * The CONDFUN should show the absence of folding. * */ /* RESULT: with 1 1 */ /* FILTER: no-no */ use Array: {+,*,iota,sum}; int[*] id( int[*] y) { return(y); } bool[*] id( bool[*] y) { return(y); } int main() { AAA = iota(id(50)); BBB = AAA + 1; CCC = AAA + 100; if( id(true)) { ZZZ = AAA + ( BBB * CCC); } else { ZZZ = AAA; } z = sum( ZZZ); z = _sub_SxS_(z, 170375); return(z); }