http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51904
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-19 16:50:33 UTC --- Fails: gcc version 4.6.0 20100828 (experimental) [trunk revision 163612] (GCC) Works: gcc version 4.6.0 20100716 (experimental) [trunk revision 162255] (GCC) (Note: The builds might have local patches.) I think it's due to the patch Rev. 162648 of 2010-07-28 http://gcc.gnu.org/viewcvs?view=revision&revision=162648 That patch tries to compile-time simplify SIZE but also changes for nonconstant-bound arrays, e.g., SIZE(X ** 2) to SIZE(X). Possibly the additional resolution only happens if also a symtree is available? That would be a change to gfc_build_intrinsic_call. If one replaces print *, size(f*x) by i = size(f*x) print *, i the program works and one finds in the dump: i = (integer(kind=4)) MAX_EXPR <(D.1879->dim[0].ubound - D.1879->dim[0].lbound) + 1, 0>;