On Mon, 25 Sep 2017, Martin Jambor wrote:
> --- a/gcc/tree-sra.c
> +++ b/gcc/tree-sra.c
> @@ -1542,19 +1542,20 @@ compare_access_positions (const void *a, const void
> *b)
> && TREE_CODE (f2->type) != COMPLEX_TYPE
> && TREE_CODE (f2->type) != VECTOR_TYPE)
> return -
On Thu, Sep 21, 2017 at 08:27:31PM +0300, Alexander Monakov wrote:
> Hi,
>
> The compare_access_positions qsort comparator lacks transitivity, although
> somewhat surprisingly this issue didn't manifest on 64-bit x86 bootstraps.
> The first invalid comparison step is here (tree-sra.c:1545):
>
>
On Thu, 21 Sep 2017, Richard Sandiford wrote:
> LGTM FWIW, but isn't there also the problem that the TYPE_PRECISION
> test fails to stabilise the sort if you have two integral types with
> the same precision?
Yes, but that's a pre-existing issue, so I didn't change it in the patch.
I think GCC bro
Alexander Monakov writes:
> diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
> index 163b7a2d03b..4f9a8802aeb 100644
> --- a/gcc/tree-sra.c
> +++ b/gcc/tree-sra.c
> @@ -1542,19 +1542,17 @@ compare_access_positions (const void *a, const void
> *b)
> && TREE_CODE (f2->type) != COMPLEX_TYPE
Hi,
The compare_access_positions qsort comparator lacks transitivity, although
somewhat surprisingly this issue didn't manifest on 64-bit x86 bootstraps.
The first invalid comparison step is here (tree-sra.c:1545):
/* Put the integral type with the bigger precision first. */
else if