[Bug fortran/96018] [9/10/11 Regression] Optimization issue with external HDF5 library
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 6 14:24:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96018
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |needs-bisection
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
So on trunk I get with -O2 (with or without -fno-inline)
> ./a.out
write text
write text
3d works
write text
4d does not
and with -O0
> ./a.out
write text
write text
3d works
write text
write text
4d does not
where write_4d is optimized to
write_4d ()
{
<bb 2> [local count: 1073741824]:
# .MEM_22 = VDEF <.MEM_1(D)>
call_side_effect (); [tail call]
# VUSE <.MEM_22>
return;
}
the interesting fact is that inner_4d is computed "pure" (no side-effects)
while inner_3d is not and this is so from the start so done by the FE.
More information about the Gcc-bugs
mailing list