This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: New regression on ARM Linux
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Earnshaw <Richard dot Earnshaw at foss dot arm dot com>
- Cc: Richard Biener <rguenther at suse dot de>, Richard Biener <richard dot guenther at gmail dot com>, Alan Lawrence <Alan dot Lawrence at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Tue, 31 Mar 2015 12:32:15 +0200
- Subject: Re: New regression on ARM Linux
- Authentication-results: sourceware.org; auth=none
- References: <55193E77 dot 3040401 at arm dot com> <55193EFB dot 6030009 at arm dot com> <alpine dot LSU dot 2 dot 11 dot 1503301501070 dot 31545 at zhemvz dot fhfr dot qr> <alpine dot LSU dot 2 dot 11 dot 1503301509150 dot 31545 at zhemvz dot fhfr dot qr> <55197DAE dot 1050004 at arm dot com> <16A8C5AA-994C-4FA3-BC25-8547166DC13C at suse dot de> <CAFiYyc1MOL8AAwtVhvYDYmSSo+MdGi2FFi-6ELfRxdsvDxtSew at mail dot gmail dot com> <551A6C46 dot 7010305 at foss dot arm dot com> <alpine dot LSU dot 2 dot 11 dot 1503311200090 dot 31545 at zhemvz dot fhfr dot qr> <551A729F dot 3090200 at foss dot arm dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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