> > Ah, right. The patch oversimplifies this. We need to do sth like
> > TREE_CODE (t1) == ARRAY_TYPE && ! TYPE_NONALIASED_COMPONENT (t1) && ...
> > right?
>
> Right. Any objection to me applying this?
Not form my side - lto-symtab change makes sense to me.
With LTO all array types have canoni
> Ah, right. The patch oversimplifies this. We need to do sth like
> TREE_CODE (t1) == ARRAY_TYPE && ! TYPE_NONALIASED_COMPONENT (t1) && ...
> right?
Right. Any objection to me applying this?
lto/
PR lto/83954
* lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
> OK, so you think the test above should check
> && (!TYPE_NONALIASED_COMPONENT (t1) || TYPE_STRUCTURAL_EQUALITY_P (t1))
> && (!TYPE_NONALIASED_COMPONENT (t2) || TYPE_STRUCTURAL_EQUALITY_P (t2))
I'm not sure about TYPE_STRUCTURAL_EQUALITY_P (does it matter in LTO mode?)
but, yes, TYPE_NONALIASE
> > 2018-01-30 Jan Hubicka
> >
> >gcc:
> >PR lto/83954
> >* lto-symtab.c (warn_type_compatibility_p): Silence false positive
> >for type match warning on arrays of pointers.
> >
> >gcc/testsuite:
> >PR lto/83954
> >* gcc.dg/lto/pr83954.h:
On Wed, Jan 31, 2018 at 12:02 PM, Eric Botcazou wrote:
>> 2018-01-30 Jan Hubicka
>>
>>gcc:
>>PR lto/83954
>>* lto-symtab.c (warn_type_compatibility_p): Silence false positive
>>for type match warning on arrays of pointers.
>>
>>gcc/testsuite:
>>PR
> 2018-01-30 Jan Hubicka
>
>gcc:
>PR lto/83954
>* lto-symtab.c (warn_type_compatibility_p): Silence false positive
>for type match warning on arrays of pointers.
>
>gcc/testsuite:
>PR lto/83954
>* gcc.dg/lto/pr83954.h: New testcase.
>
> The original warning was
>
> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gnat.dg/lto20_pkg.ads:7:13:
> warning: type of 'lto20_pkg__proc' does not match original declaration
> [-Wlto-type-mismatch]
>
> so just removing the dg-excess-errors seems the right thing to do.
> Tested with the appropriat
This patch
2018-01-30 Jan Hubicka
gcc:
PR lto/83954
* lto-symtab.c (warn_type_compatibility_p): Silence false positive
for type match warning on arrays of pointers.
gcc/testsuite:
PR lto/83954
* gcc.dg/lto/pr83954.h: New testcase.
* gcc.