Commit 3e7cf2e6 by Jakub Jelinek Committed by Jakub Jelinek

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
parent 49084d39
2019-11-14 Jakub Jelinek <jakub@redhat.com> 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 * g++.dg/cpp0x/alias-decl-pr92206-3.C: Require effective target c++14
rather than c++11. rather than c++11.
......
/* { dg-do compile } */ // PR ipa/92421
// { dg-do compile }
// { dg-additional-options "-Wno-return-type" }
typedef long a; typedef long a;
void *b, *c; void *b, *c;
template <typename, typename> class d {}; template <typename, typename> class d {};
template <typename e, typename f> bool operator!=(d<e, f>, d<e, f>); template <typename e, typename f> bool operator!=(d<e, f>, d<e, f>);
class g { struct g {
public: g(const char *);
g(char *);
}; };
class j { struct j {
public:
j(); j();
void h(); void h();
void i(); void i();
void aj(); void aj();
}; };
class m { struct m {
public:
m(bool); m(bool);
}; };
class n { struct n {
public:
operator a(); operator a();
}; };
class o { struct o {
public:
long am(); long am();
}; };
class H { struct H {
public:
class p {}; class p {};
virtual bool accept(const char *, unsigned long, p *, bool); virtual bool accept(const char *, unsigned long, p *, bool);
}; };
class q : H { struct q : H {
public: struct r {
class r {
public:
enum at { au, av, aw }; enum at { au, av, aw };
}; };
enum { ax }; 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 az(const g &, unsigned = ax);
virtual bool ba(const int &, p *, bool); virtual bool ba(const int &, p *, bool);
void bb(char *bc, long bd, char *, long be) { void bb(char *bc, long bd, char *, long be) {
class bf : public p { struct bf : public p {
public: bf(long) {}
bf(long);
} bg(be); } bg(be);
accept(bc, bd, &bg, true); accept(bc, bd, &bg, true);
} }
}; };
class s { struct s {
q *bi; q *bi;
bool bj(); bool bj();
}; };
...@@ -109,6 +103,7 @@ template <class bk> class t : q { ...@@ -109,6 +103,7 @@ template <class bk> class t : q {
while (kit != df) while (kit != df)
; ;
cx(); cx();
return false;
} }
bool az(const g &, unsigned) { bool az(const g &, unsigned) {
t dj; t dj;
...@@ -157,8 +152,7 @@ template <class bk> class t : q { ...@@ -157,8 +152,7 @@ template <class bk> class t : q {
O db[6]; O db[6];
bool bp; bool bp;
}; };
class w : q { struct w : q {
public:
void dn(); void dn();
bool l() { bool l() {
m(true); m(true);
...@@ -171,4 +165,5 @@ public: ...@@ -171,4 +165,5 @@ public:
bool s::bj() { bool s::bj() {
bi->az(""); bi->az("");
new t<w>; new t<w>;
return false;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment