Add a test for PR ipa/63814

PR ipa/63814
	* g++.dg/ipa/pr63814.C: New test.

From-SVN: r218268
This commit is contained in:
H.J. Lu 2014-12-02 12:47:29 +00:00 committed by H.J. Lu
parent ffc510234e
commit 88936a2bfd
2 changed files with 34 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR ipa/63814
* g++.dg/ipa/pr63814.C: New test.
2014-12-02 Wilco Dijkstra <wilco.dijkstra@arm.com>
* gcc.target/aarch64/remat1.c: New testcase.

View File

@ -0,0 +1,29 @@
// { dg-do run { target fpic } }
// { dg-options "-O3 -fpic" }
struct CBase {
virtual void BaseFunc () {}
};
struct MMixin {
virtual void * MixinFunc (int, int) = 0;
};
struct CExample: CBase, public MMixin
{
void *MixinFunc (int arg, int arg2)
{
return this;
}
};
void *test (MMixin & anExample)
{
return anExample.MixinFunc (0, 0);
}
int main ()
{
CExample c;
return (test (c) != &c);
}