[Bug c/91107] __attribute__((pure)) to function with non-const pointers
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 8 10:00:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91107
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
This function isn't pure. GCC would optimize
dest[0] = 0.;
array_division (n, dest, src1, src2);
return dest[0];
to return 0.0 since pure functions are assumed to not write to (global) memory.
More information about the Gcc-bugs
mailing list