Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / diagnostic / lang-dump-1.C
blob41768949f12f3e00155e356008b0d0b3090a2887
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).
5 class VExample {
6 public:
7     virtual void methodV1() {}
8     virtual void methodV2() {}
9 };
11 void funcA() {
12     VExample objA;
13     VExample *ptrA = &objA;
15     ptrA->methodV2();
16     ptrA->methodV1();
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 } }