[Bug ipa/83983] FAIL: g++.dg/lto/pr83121 (test for LTO warnings, pr83121_0.C line 8)

2018-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83983

Martin Liška  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #14 from Martin Liška  ---
Should be fixed on trunk.

[Bug ipa/83983] FAIL: g++.dg/lto/pr83121 (test for LTO warnings, pr83121_0.C line 8)

2018-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83983

--- Comment #13 from Martin Liška  ---
Author: marxin
Date: Wed Apr 18 20:08:44 2018
New Revision: 259479

URL: https://gcc.gnu.org/viewcvs?rev=259479&root=gcc&view=rev
Log:
Make Wodr warnings stable.

2018-04-18  Martin Liska  

PR ipa/83983
PR ipa/85391
* lto.c (cmp_type_location): New function.
(lto_read_decls): First collect all types, then
sort them according by location before register_odr_type
is called.
2018-04-18  Martin Liska  

PR ipa/83983
PR ipa/85391
* g++.dg/lto/pr83121_1.C (struct Environment): Adjust expected
output.

Modified:
trunk/gcc/lto/ChangeLog
trunk/gcc/lto/lto.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/lto/pr83121_1.C

[Bug ipa/83983] FAIL: g++.dg/lto/pr83121 (test for LTO warnings, pr83121_0.C line 8)

2018-04-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83983

--- Comment #12 from Martin Liška  ---
Author: marxin
Date: Wed Apr 18 20:06:07 2018
New Revision: 259478

URL: https://gcc.gnu.org/viewcvs?rev=259478&root=gcc&view=rev
Log:
Revert r258133.

2018-04-18  Martin Liska  

Revert
2018-03-02  Eric Botcazou  

PR ipa/83983
* ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
arguments if they are comparable.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-devirt.c

[Bug ipa/83983] FAIL: g++.dg/lto/pr83121 (test for LTO warnings, pr83121_0.C line 8)

2018-04-16 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83983

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org

--- Comment #11 from Martin Liška  ---
I worked on that with Honza and we have proper fix. Let me test.

[Bug ipa/83983] FAIL: g++.dg/lto/pr83121 (test for LTO warnings, pr83121_0.C line 8)

2018-03-26 Thread seurer at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83983

seurer at gcc dot gnu.org changed:

   What|Removed |Added

 Target|hppa-unknown-linux-gnu, |hppa-unknown-linux-gnu,
   |arm-none-linux-gnueabihf|arm-none-linux-gnueabihf,
   ||powerpc64*-*-*
 CC||seurer at gcc dot gnu.org
   Host|hppa-unknown-linux-gnu  |hppa-unknown-linux-gnu,
   ||powerpc64*-*-*
  Build|hppa-unknown-linux-gnu  |hppa-unknown-linux-gnu,
   ||powerpc64*-*-*

--- Comment #10 from seurer at gcc dot gnu.org ---
FYI these fail on powerpc64 as well both LE and BE.

FAIL: g++.dg/lto/pr83121  (test for LTO warnings, pr83121_0.C line 8)
FAIL: g++.dg/lto/pr83121  (test for LTO warnings, pr83121_1.C line 2)
FAIL: g++.dg/lto/pr83121  (test for LTO warnings, pr83121_1.C line 3)
FAIL: g++.dg/lto/pr83121 cp_lto_pr83121_0.o-cp_lto_pr83121_1.o link, -O0 -flto

[Bug ipa/83983] FAIL: g++.dg/lto/pr83121 (test for LTO warnings, pr83121_0.C line 8)

2018-03-05 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83983

--- Comment #9 from Eric Botcazou  ---
David, any idea about how to handle this?  Otherwise I'm afraid that the new
LTO warning framework looks rather counter-productive if it makes it easier to
write tests that fail on half of the platforms...

[Bug ipa/83983] FAIL: g++.dg/lto/pr83121 (test for LTO warnings, pr83121_0.C line 8)

2018-03-05 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83983

amker at gcc dot gnu.org changed:

   What|Removed |Added

 CC||amker at gcc dot gnu.org

--- Comment #8 from amker at gcc dot gnu.org ---
(In reply to Eric Botcazou from comment #6)
> > In other words, get_odr_type (t1, true) works on x86 and get_odr_type (t2,
> > true) works on ARM/SPARC, so maybe something like:
> > 
> > Index: ipa-devirt.c
> > ===
> > --- ipa-devirt.c(revision 258068)
> > +++ ipa-devirt.c(working copy)
> > @@ -686,7 +686,10 @@ odr_subtypes_equivalent_p (tree t1, tree t2,
> >  return false;
> >/* Limit recursion: If subtypes are ODR types and we know
> >   that they are same, be happy.  */
> > -  if (!odr_type_p (t1) || !get_odr_type (t1, true)->odr_violated)
> > +  if (!odr_type_p (t1)
> > + || !odr_type_p (t2)
> > + || (!get_odr_type (t1, true)->odr_violated
> > + && !get_odr_type (t2, true)->odr_violated))
> >  return true;
> >  }
> > 
> > is the proper thing to do.
> 
> This brings the missing warnings on SPARC (and presumably Aarch64 too) but
> gives the same order of warnings as on the HP-PA, so the test still formally
> fails.
> 
> In other words, the test is not sufficiently robust as currently written.

Yes, now on AArch64, we have:

/.../build/src/gcc/gcc/testsuite/g++.dg/lto/pr83121_0.C:7:10: warning: type
'struct AsyncHooks' violates the C++ One Definition Rule [-Wodr]^M
/.../build/src/gcc/gcc/testsuite/g++.dg/lto/pr83121_1.C:2:10: note: a different
type is defined in another translation unit^M
/.../build/src/gcc/gcc/testsuite/g++.dg/lto/pr83121_0.C:8:21: note: the first
difference of corresponding definitions is field 'providers_'^M
/.../build/src/gcc/gcc/testsuite/g++.dg/lto/pr83121_1.C:3:21: note: a field of
same name but different type is defined in another translation unit^M
/.../build/src/gcc/gcc/testsuite/g++.dg/lto/pr83121_0.C:7:10: note: array types
have different bounds^M
/.../build/src/gcc/gcc/testsuite/g++.dg/lto/pr83121_0.C:6:8: warning: type
'struct Environment' violates the C++ One Definition Rule [-Wodr]^M
/.../build/src/gcc/gcc/testsuite/g++.dg/lto/pr83121_1.C:1:8: note: a different
type is defined in another translation unit^M
/.../build/src/gcc/gcc/testsuite/g++.dg/lto/pr83121_0.C:10:14: note: the first
difference of corresponding definitions is field 'async_hooks_'^M
/.../build/src/gcc/gcc/testsuite/g++.dg/lto/pr83121_1.C:5:14: note: a field of
same name but different type is defined in another translation unit^M
/.../build/src/gcc/gcc/testsuite/g++.dg/lto/pr83121_0.C:7:10: note: type
'struct AsyncHooks' itself violates the C++ One Definition Rule^M
/.../build/src/gcc/gcc/testsuite/g++.dg/lto/pr83121_1.C:2:10: note: the
incompatible type is defined here^M

FAIL: g++.dg/lto/pr83121  (test for LTO warnings, pr83121_0.C line 8)
FAIL: g++.dg/lto/pr83121  (test for LTO warnings, pr83121_1.C line 2)
FAIL: g++.dg/lto/pr83121  (test for LTO warnings, pr83121_1.C line 3)
FAIL: g++.dg/lto/pr83121 cp_lto_pr83121_0.o-cp_lto_pr83121_1.o link, -O0 -flto

[Bug ipa/83983] FAIL: g++.dg/lto/pr83121 (test for LTO warnings, pr83121_0.C line 8)

2018-03-02 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83983

--- Comment #7 from Eric Botcazou  ---
Author: ebotcazou
Date: Fri Mar  2 09:57:43 2018
New Revision: 258133

URL: https://gcc.gnu.org/viewcvs?rev=258133&root=gcc&view=rev
Log:
PR ipa/83983
* ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
arguments if they are comparable.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-devirt.c

[Bug ipa/83983] FAIL: g++.dg/lto/pr83121 (test for LTO warnings, pr83121_0.C line 8)

2018-03-01 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83983

Eric Botcazou  changed:

   What|Removed |Added

  Component|testsuite   |ipa

--- Comment #6 from Eric Botcazou  ---
> In other words, get_odr_type (t1, true) works on x86 and get_odr_type (t2,
> true) works on ARM/SPARC, so maybe something like:
> 
> Index: ipa-devirt.c
> ===
> --- ipa-devirt.c(revision 258068)
> +++ ipa-devirt.c(working copy)
> @@ -686,7 +686,10 @@ odr_subtypes_equivalent_p (tree t1, tree t2,
>  return false;
>/* Limit recursion: If subtypes are ODR types and we know
>   that they are same, be happy.  */
> -  if (!odr_type_p (t1) || !get_odr_type (t1, true)->odr_violated)
> +  if (!odr_type_p (t1)
> + || !odr_type_p (t2)
> + || (!get_odr_type (t1, true)->odr_violated
> + && !get_odr_type (t2, true)->odr_violated))
>  return true;
>  }
> 
> is the proper thing to do.

This brings the missing warnings on SPARC (and presumably Aarch64 too) but
gives the same order of warnings as on the HP-PA, so the test still formally
fails.

In other words, the test is not sufficiently robust as currently written.