| 1 |
// { dg-do compile } |
| 2 |
// { dg-options "-O -fno-toplevel-reorder -fno-inline -fipa-cp -fipa-cp-clone -fkeep-inline-functions" } |
| 3 |
|
| 4 |
template < typename Derived > struct AnyMatrixBase |
| 5 |
{ |
| 6 |
}; |
| 7 |
|
| 8 |
struct Matrix Random (); |
| 9 |
|
| 10 |
struct Matrix:AnyMatrixBase < Matrix > |
| 11 |
{ |
| 12 |
void bar () |
| 13 |
{ |
| 14 |
throw; |
| 15 |
} |
| 16 |
void foo (Matrix other) |
| 17 |
{ |
| 18 |
bar (); |
| 19 |
Matrix (AnyMatrixBase < Matrix > (Random ())); |
| 20 |
} |
| 21 |
template |
| 22 |
< typename OtherDerived > Matrix (AnyMatrixBase < OtherDerived > other) |
| 23 |
{ |
| 24 |
foo (other); |
| 25 |
} |
| 26 |
}; |
| 27 |
|
| 28 |
Matrix x (Random ()); |
| 29 |
|