On Tue, Mar 31, 2015 at 11:10:39AM +0100, Richard Earnshaw wrote: > >>> That is, > >>> > >>> typedef int myint __attribute__((aligned(8))); > >>> > >>> int main() > >>> { > >>> myint i = 1; > >>> int j = 2; > >>> __builtin_printf("%d %d\n", i, j); > >>> } > >>> > >>> or > >>> > >>> myint i; > >>> int j; > >>> myint *p = &i; > >>> int *q = &j; > >>> > >>> int main() > >>> { > >>> __builtin_printf("%d %d", *p, *q); > >>> }
Note that starting with r221348, gcc fails to profiledbootstrap on armv7hl-linux-gnueabi. I'd hope it is the same thing. To middle-end, all integral type conversions that differ just in alignment are useless - for INTEGRAL_TYPE_P all useless_type_conversion_p cares about is sign and precision. So, if arm has a weirdo ABI that wants to pass aligned types differently (why, I'd say it is just a bug in the ABI), then for named arguments it really has to look at the function type - the type of the argument, rather than the passed in value's type, and for varargs it would be best if it remembered such thing early (in the FEs), because the middle-end can change things any time, with or without Richard B.'s recent SRA change. Jakub