Fix coding style and add a new test-case (PR lto/85405).
2018-04-17 Martin Liska <mliska@suse.cz> PR lto/85405 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing in message, remote space in between '_G' and '('. 2018-04-17 Martin Liska <mliska@suse.cz> PR lto/85405 * g++.dg/lto/pr85405b_0.C: New test. * g++.dg/lto/pr85405b_1.C: New test. From-SVN: r259431
This commit is contained in:
parent
7044c89cfd
commit
1236cd6666
5 changed files with 40 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2018-04-17 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR lto/85405
|
||||
* ipa-devirt.c (odr_types_equivalent_p): Remove trailing
|
||||
in message, remote space in between '_G' and '('.
|
||||
|
||||
2018-04-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/85281
|
||||
|
|
|
@ -1590,7 +1590,7 @@ odr_types_equivalent_p (tree t1, tree t2, bool warn, bool *warned,
|
|||
if (DECL_BIT_FIELD (f1) != DECL_BIT_FIELD (f2))
|
||||
{
|
||||
warn_odr (t1, t2, f1, f2, warn, warned,
|
||||
G_ ("one field is bitfield while other is not "));
|
||||
G_("one field is bitfield while other is not"));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2018-04-17 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR lto/85405
|
||||
* g++.dg/lto/pr85405b_0.C: New test.
|
||||
* g++.dg/lto/pr85405b_1.C: New test.
|
||||
|
||||
2018-04-17 Martin Liska <mliska@suse.cz>
|
||||
|
||||
PR lto/85405
|
||||
|
|
18
gcc/testsuite/g++.dg/lto/pr85405b_0.C
Normal file
18
gcc/testsuite/g++.dg/lto/pr85405b_0.C
Normal file
|
@ -0,0 +1,18 @@
|
|||
// { dg-lto-do link }
|
||||
// { dg-lto-options {{-fPIC -shared -flto}} }
|
||||
|
||||
class VclReferenceBase { // { dg-lto-warning "7: type 'struct VclReferenceBase' violates the C\\+\\+ One Definition Rule" }
|
||||
int mnRefCnt;
|
||||
int mbDisposed : 3;
|
||||
virtual ~VclReferenceBase();
|
||||
};
|
||||
class a;
|
||||
class b {
|
||||
a &e;
|
||||
bool c();
|
||||
};
|
||||
class B {
|
||||
VclReferenceBase d;
|
||||
};
|
||||
class a : B {};
|
||||
bool b::c() { return false; }
|
9
gcc/testsuite/g++.dg/lto/pr85405b_1.C
Normal file
9
gcc/testsuite/g++.dg/lto/pr85405b_1.C
Normal file
|
@ -0,0 +1,9 @@
|
|||
class VclReferenceBase {
|
||||
int mnRefCnt;
|
||||
int mbDisposed: 7; // { dg-lto-message "19: a field of same name but different type is defined in another translation unit" }
|
||||
|
||||
protected:
|
||||
virtual ~VclReferenceBase();
|
||||
};
|
||||
class : VclReferenceBase {
|
||||
} a;
|
Loading…
Add table
Reference in a new issue