diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-11-14 02:02:16 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-11-14 02:02:16 +0100 |
commit | 3e7cf2e6c0ee30b83aa158b7bd2b2eb9a686c1c3 (patch) | |
tree | 247aff047f32465ad8ba8e8ffc9538fe848793b9 /gcc | |
parent | 49084d390a9dcc0425dcac07a7cb3cfc2f8d6a27 (diff) | |
download | gcc-3e7cf2e6c0ee30b83aa158b7bd2b2eb9a686c1c3.zip gcc-3e7cf2e6c0ee30b83aa158b7bd2b2eb9a686c1c3.tar.gz gcc-3e7cf2e6c0ee30b83aa158b7bd2b2eb9a686c1c3.tar.bz2 |
re PR ipa/92421 (ICE in inline_small_functions, at ipa-inline.c:2001 since r277759)
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.
From-SVN: r278192
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/torture/pr92421.C | 45 |
2 files changed, 26 insertions, 25 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 3fa1208..d480dac 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2019-11-14 Jakub Jelinek <jakub@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. + * g++.dg/cpp0x/alias-decl-pr92206-3.C: Require effective target c++14 rather than c++11. diff --git a/gcc/testsuite/g++.dg/torture/pr92421.C b/gcc/testsuite/g++.dg/torture/pr92421.C index 7adf53f..2146e94 100644 --- a/gcc/testsuite/g++.dg/torture/pr92421.C +++ b/gcc/testsuite/g++.dg/torture/pr92421.C @@ -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; } |