case ADDR_EXPR:
/* See what we are pointing at and look at its alignment. */
exp = TREE_OPERAND (exp, 0);
+ inner = max_align;
+ while (handled_component_p (exp))
+ {
+ /* Fields in a structure can be packed, honour DECL_ALIGN
+ of the FIELD_DECL. For all other references the conservative
+ alignment is the element type alignment. */
+ if (TREE_CODE (exp) == COMPONENT_REF)
+ inner = MIN (inner, DECL_ALIGN (TREE_OPERAND (exp, 1)));
+ else
+ inner = MIN (inner, TYPE_ALIGN (TREE_TYPE (exp)));
+ exp = TREE_OPERAND (exp, 0);
+ }
if (TREE_CODE (exp) == FUNCTION_DECL)
align = FUNCTION_BOUNDARY;
else if (DECL_P (exp))
- align = DECL_ALIGN (exp);
+ align = MIN (inner, DECL_ALIGN (exp));
#ifdef CONSTANT_ALIGNMENT
else if (CONSTANT_CLASS_P (exp))
- align = CONSTANT_ALIGNMENT (exp, align);
+ align = MIN (inner, (unsigned)CONSTANT_ALIGNMENT (exp, align));
#endif
+ else
+ align = MIN (align, inner);
return MIN (align, max_align);
default:
/* For a zero count, we don't care what frame address we return, so frame
pointer elimination is OK, and using the soft frame pointer is OK.
- For a non-zero count, we require a stable offset from the current frame
+ For a nonzero count, we require a stable offset from the current frame
pointer to the previous one, so we must use the hard frame pointer, and
we must disable frame pointer elimination. */
if (count == 0)
TREE_PUBLIC (decl) = 1;
DECL_ARTIFICIAL (decl) = 1;
TREE_NOTHROW (decl) = 1;
+ DECL_VISIBILITY (decl) = VISIBILITY_DEFAULT;
+ DECL_VISIBILITY_SPECIFIED (decl) = 1;
call = build_function_call_expr (decl, arglist);
return expand_call (call, target, ignore);
c1 = TREE_REAL_CST (arg1);
c2 = TREE_REAL_CST (arg2);
+ /* c1.sign := c2.sign. */
real_copysign (&c1, &c2);
return build_real (type, c1);
- c1.sign = c2.sign;
}
/* copysign(X, Y) is fabs(X) when Y is always non-negative.