[Bug tree-optimization/106912] [13 Regression] ICE in vect_transform_loops, at tree-vectorizer.cc:1032 since r13-1575-gcf3a120084e94614

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 8 17:30:26 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106912

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Sure, the FUNCTION_TYPE can be shared, so shouldn't be overwritten in place,
but can be copied with TREE_READONLY cleared on the copy.
So, if we for whatever reason need to clear const flag on some functions, after
clearing TREE_READONLY on the node->decl we'd also need to update the TREE_TYPE
to a version without TREE_READONLY set (so that say if new calls are created
they don't get wrong fntype) and then walk all call edges to that function,
updating gimple_call_fntype to the updated type if it was equal to the old
TREE_TYPE, or to a copy with TREE_READONLY cleared if it has TREE_READONLY set
on the FUNCTION/METHOD_TYPE).


More information about the Gcc-bugs mailing list