https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78524
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |ada --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> --- case tcc_reference: /* If this contains a PLACEHOLDER_EXPR, it is the thing we want to modify. Otherwise, we treat it like a variable. */ if (CONTAINS_PLACEHOLDER_P (exp)) { tree val_type = TREE_TYPE (TREE_OPERAND (exp, 1)); tree val = (max_p ? TYPE_MAX_VALUE (type) : TYPE_MIN_VALUE (type)); return max_size (convert (get_base_type (val_type), val), true); } possibly misses a convert (type, ...) around the return value. At least that fixes it for me.