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.
-/* { 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();
};
while (kit != df)
;
cx();
+ return false;
}
bool az(const g &, unsigned) {
t dj;
O db[6];
bool bp;
};
-class w : q {
-public:
+struct w : q {
void dn();
bool l() {
m(true);
bool s::bj() {
bi->az("");
new t<w>;
+ return false;
}