Re: Fix gnat.dg/lto20.adb XPASS

2018-02-02 Thread Jan Hubicka
> > 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

Re: Fix gnat.dg/lto20.adb XPASS

2018-02-02 Thread Eric Botcazou
> 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

Re: Fix gnat.dg/lto20.adb XPASS

2018-01-31 Thread Eric Botcazou
> 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

Re: Fix gnat.dg/lto20.adb XPASS

2018-01-31 Thread Jan Hubicka
> > 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:

Re: Fix gnat.dg/lto20.adb XPASS

2018-01-31 Thread Richard Biener
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

Re: Fix gnat.dg/lto20.adb XPASS

2018-01-31 Thread Eric Botcazou
> 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. >

Re: Fix gnat.dg/lto20.adb XPASS

2018-01-31 Thread Eric Botcazou
> 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

Fix gnat.dg/lto20.adb XPASS

2018-01-30 Thread Rainer Orth
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.