This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR tree-opt/33616: ICE on callee-copied constructor arguments
> Well, the comment is still above a check for CONSTANT_CLASS_P:
>
> /* If we are taking the address of a constant and are at the top level,
> we have to use output_constant_def since we can't call force_const_mem
> at top level. */
> /* ??? This should be considered a front-end bug. We should not be
> generating ADDR_EXPR of something that isn't an LVALUE. The only
> exception here is STRING_CST. */
> if (CONSTANT_CLASS_P (exp))
> return XEXP (expand_expr_constant (exp, 0, modifier), 0);
>
> and if I were reading that without the ???, I'd be wondering why we're
> taking tha address of things like INTEGER_CSTs. I think it's useful
> to have a comment that says we aren't really doing so out of choice.
My understanding is that the comment was primarly aimed at CONSTRUCTORs,
because I doubt that we take the address of INTEGER_CSTs, but OK.
--
Eric Botcazou