[Bug middle-end/79756] [5/6/7 Regression] ICE in execute_todo, at passes.c:2011

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Wed Mar 1 18:43:00 GMT 2017


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

--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Wed, 1 Mar 2017, rguenth at gcc dot gnu.org wrote:

> but note that convert_vector_to_array_for_subscript will return
> VIEW_CONVERT_EXPR <array-type> (MAYBE_CONST (...)) then.  Maybe proper
> operation is to instead return

Returning that is fine.  The following principles apply:

* Anything inside a C_MAYBE_CONST_EXPR must already have been fully 
folded.

* Anything wrapped around a C_MAYBE_CONST_EXPR must be handled in 
c_fully_fold_internal with recursion to its operands, to avoid a 
C_MAYBE_CONST_EXPR ending up nested inside the output of 
c_fully_fold_internal.

VIEW_CONVERT_EXPR is handled in c_fully_fold_internal, so it's OK to wrap 
one around a C_MAYBE_CONST_EXPR.


More information about the Gcc-bugs mailing list