| 1 |
// { dg-do compile } |
| 2 |
// { dg-additional-options "-fdump-lang-raw" } |
| 3 |
// Check if dump file contains OBJ_TYPE_REF with additional fields (information about called virtual method). |
| 4 |
|
| 5 |
class VExample { |
| 6 |
public: |
| 7 |
virtual void methodV1() {} |
| 8 |
virtual void methodV2() {} |
| 9 |
}; |
| 10 |
|
| 11 |
void funcA() { |
| 12 |
VExample objA; |
| 13 |
VExample *ptrA = &objA; |
| 14 |
|
| 15 |
ptrA->methodV2(); |
| 16 |
ptrA->methodV1(); |
| 17 |
} |
| 18 |
|
| 19 |
// { dg-final { scan-lang-dump-times {obj_type_ref[^\n]*type:} 2 raw } } |
| 20 |
// { dg-final { scan-lang-dump-times {obj_type_ref[^\n]*expr:} 2 raw } } |
| 21 |
// { dg-final { scan-lang-dump-times {obj_type_ref[^\n]*obj :} 2 raw } } |
| 22 |
// { dg-final { scan-lang-dump-times {obj_type_ref[^\n]*\n[^\n]*tok :} 2 raw } } |