On Wed, Nov 13, 2019 at 10:08:23PM +0100, Jan Hubicka wrote: > PR c++/92421 > * ipa-prop.c (update_indirect_edges_after_inlining): > Mark parameter as used. > * ipa-inline.c (recursive_inlining): Reset node cache > after inlining. > (inline_small_functions): Remove checking ifdef. > * ipa-inline-analysis.c (do_estimate_edge_time): Verify > cache consistency. > * g++.dg/torture/pr92421.C: New testcase.
The testcase FAILs everywhere: FAIL: g++.dg/torture/pr92421.C -O0 (test for excess errors) FAIL: g++.dg/torture/pr92421.C -O1 (test for excess errors) FAIL: g++.dg/torture/pr92421.C -O2 (test for excess errors) ... FAIL: g++.dg/torture/pr92421.C -O0 (test for excess errors) Excess errors: /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:112:3: warning: no return statement in function returning non-void [-Wreturn-type] /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:121:3: warning: no return statement in function returning non-void [-Wreturn-type] /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:166:10: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:166:37: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:172:10: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:174:1: warning: no return statement in function returning non-void [-Wreturn-type] /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:60:10: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:60:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:62:10: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:62:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:71:8: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:71:32: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/gcc/gcc/testsuite/g++.dg/torture/pr92421.C:47:7: warning: 'q::bb(char*, long int, char*, long int)::bf::bf(long int)' used but never defined I've fixed all the -Wwrite-strings warnings, all but one -Wreturn-type warnings (the one spot left made the ICE go away with unfixed g++ at -O3), the undefined bf ctor warning, tested on x86_64-linux, verified unfixed g++ still ICEs, committed to trunk as obvious: 2019-11-14 Jakub Jelinek <ja...@redhat.com> PR ipa/92421 * g++.dg/torture/pr92421.C: Add -Wno-return-type to dg-additional-options. Avoid -Wwrite-string warnings, most of -Wreturn-type warnings, define bf ctor. Use struct instead of class with public: at the start. --- gcc/testsuite/g++.dg/torture/pr92421.C.jj 2019-11-14 01:56:41.682884599 +0100 +++ gcc/testsuite/g++.dg/torture/pr92421.C 2019-11-14 01:55:26.968004306 +0100 @@ -1,55 +1,49 @@ -/* { dg-do compile } */ +// PR ipa/92421 +// { dg-do compile } +// { dg-additional-options "-Wno-return-type" } + typedef long a; void *b, *c; template <typename, typename> class d {}; template <typename e, typename f> bool operator!=(d<e, f>, d<e, f>); -class g { -public: - g(char *); +struct g { + g(const char *); }; -class j { -public: +struct j { j(); void h(); void i(); void aj(); }; -class m { -public: +struct m { m(bool); }; -class n { -public: +struct n { operator a(); }; -class o { -public: +struct o { long am(); }; -class H { -public: +struct H { class p {}; virtual bool accept(const char *, unsigned long, p *, bool); }; -class q : H { -public: - class r { - public: +struct q : H { + struct r { enum at { au, av, aw }; }; enum { ax }; - virtual void ay(char *, int, const char *, r::at, char *); + virtual void ay(const char *, int, const char *, r::at, const char *); virtual bool az(const g &, unsigned = ax); virtual bool ba(const int &, p *, bool); void bb(char *bc, long bd, char *, long be) { - class bf : public p { - public: - bf(long); + struct bf : public p { + bf(long) {} } bg(be); accept(bc, bd, &bg, true); } }; -class s { +struct s { q *bi; bool bj(); }; @@ -109,6 +103,7 @@ template <class bk> class t : q { while (kit != df) ; cx(); + return false; } bool az(const g &, unsigned) { t dj; @@ -157,8 +152,7 @@ template <class bk> class t : q { O db[6]; bool bp; }; -class w : q { -public: +struct w : q { void dn(); bool l() { m(true); @@ -171,4 +165,5 @@ public: bool s::bj() { bi->az(""); new t<w>; + return false; } Jakub