> On Thu, Jan 18, 2018 at 04:59:01PM +0100, Jan Hubicka wrote:
> > this patch ICE where the profile in cgraph mismatch profile in BB. This is
> > becuase
> > of expansion of speculative devirtualization where we get some roundoff
> > issues.
> >
> > Bootstrapped/regtested x86_64-linux, comitted.
> > Honza
> >
> > PR ipa/83619
> > * g++.dg/torture/pr83619.C: New testcase.
> > * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
> > frequencies.
> > --- testsuite/g++.dg/torture/pr83619.C (revision 0)
> > +++ testsuite/g++.dg/torture/pr83619.C (working copy)
> ...
>
> This testcase FAILs everywhere:
> /.../gcc/gcc/testsuite/g++.dg/torture/pr83619.C: In static member function
> 'static void i::j< <template-parameter-1-1> >::c(e*)':
> /.../gcc/gcc/testsuite/g++.dg/torture/pr83619.C:25:8: warning: invalid use of
> incomplete type 'class e'
> /.../gcc/gcc/testsuite/g++.dg/torture/pr83619.C:8:7: note: forward
> declaration of 'class e'
> FAIL: g++.dg/torture/pr83619.C -O0 (test for excess errors)
> Excess errors:
> /.../gcc/gcc/testsuite/g++.dg/torture/pr83619.C:25:8: warning: invalid use of
> incomplete type 'class e'
>
> The following patch tweaks it so that it doesn't emit the warning, yet still
> ICEs before your cgraph.c change and PASSes after it.
> Tested on x86_64-linux and i686-linux, ok for trunk?
>
> 2018-01-18 Jakub Jelinek <[email protected]>
>
> PR ipa/83619
> * g++.dg/torture/pr83619.C (e): Define before first use instead of
> forward declaration.
Oops, sorry. I had corrected version somewhere. The change is OK.
Honz
>
> --- gcc/testsuite/g++.dg/torture/pr83619.C.jj 2018-01-18 21:11:54.865206861
> +0100
> +++ gcc/testsuite/g++.dg/torture/pr83619.C 2018-01-18 23:51:32.693482293
> +0100
> @@ -5,7 +5,9 @@ class d
> public:
> virtual unsigned c ();
> };
> -class e;
> +class e : public d
> +{
> +};
> class i
> {
> void h ();
> @@ -33,9 +35,6 @@ public:
> l (int);
> k *operator-> ();
> };
> -class e : public d
> -{
> -};
> class m final : e
> {
> unsigned c ();
>
> Jakub