This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Silence merge warnings on artiical types
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, Ilya Verbin <iverbin at gmail dot com>, gcc-patches at gcc dot gnu dot org, rguenther at suse dot de, jason at redhat dot com
- Date: Mon, 30 Mar 2015 19:23:21 +0200
- Subject: Re: Silence merge warnings on artiical types
- Authentication-results: sourceware.org; auth=none
- References: <20150330030257 dot GA71352 at kam dot mff dot cuni dot cz> <20150330153641 dot GA64930 at msticlxl57 dot ims dot intel dot com> <20150330170639 dot GD93920 at kam dot mff dot cuni dot cz> <20150330172102 dot GI1746 at tucnak dot redhat dot com>
> On Mon, Mar 30, 2015 at 07:06:39PM +0200, Jan Hubicka wrote:
> > > On Mon, Mar 30, 2015 at 05:02:57 +0200, Jan Hubicka wrote:
> > > > * lto-symtab.c (lto_symtab_merge_decls_2): Silence warnings on
> > > > artificial decls.
> > >
> > > Shouldn't this patch fix libgomp.c++/target-3.C in an offloading-enabled
> > > configuration? It still fails...
> > >
> > > libgomp/testsuite/libgomp.c++/../libgomp.c/target-2.c:27:13: warning: type 'struct .omp_data_s.7' violates one definition rule [-Wodr]
> > > #pragma omp parallel for reduction(+:s)
> > > ^
> > > #pragma omp parallel for reduction(+:s)
> > > ^
> > > double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
> > > ^
> > > double b[3 * x], c[3 * x], d[3 * x], e[3 * x];
> > > ^
> >
> > No, that is an different warning. Why those types are different? Is this a full warning output?
>
> .omp_data_s.7 is a name of a really unnamed struct (DECL_NAMELESS) and also
> DECL_ARTIFICIAL, contains compiler generated fields and should never be
> checked for ODR violations.
>
> I wonder if you have any DECL_ARTIFICIAL structs you want to warn on, if
> yes, then at least ignore DECL_NAMELESS ones.
Jason probably knows better, but I think only real C++ types comply the One Defintion
Type and should be merged. Anything we create artifically in compiler is probably
not covered by this.
Honza
>
> Jakub