* g++.dg/pr49718.C: Add "-mno-explicit-relocs" for alpha*-*-* targets.
[official-gcc.git] / gcc / testsuite / g++.dg / pr49718.C
blobcd79c9a4eee763586a9f370bddac12b68d6600f5
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -finstrument-functions" } */
3 /* { dg-additional-options "-mno-explicit-relocs" { target alpha*-*-* } } */
4 /* { dg-final { scan-assembler-times "__cyg_profile_func_enter" 1} } */
6 #define NOINSTR __attribute__((no_instrument_function))
8 struct t
10    public:
11        /* Function code should be instrumented */
12        __attribute__((noinline)) t() {}
14        /* Function t::a() should not be instrumented */
15        NOINSTR void a(){
16        }
17        /* Function t::b() should not be instrumented */
18        void NOINSTR b(){
19        }
20        /* Function t::c() should not be instrumented */
21        void c() NOINSTR {
22        }
23        /* Function t::d() should not be instrumented */
24        void d() NOINSTR;
27 void t::d()
31 /* Function call_all_functions() should not be instrumented */
32 struct t call_all_functions() __attribute__((no_instrument_function));
33 struct t call_all_functions()
35        struct t a;     /* Constructor not inlined */
36        a.a();          /* Inlined t::a() should not be instrumented */
37        a.b();          /* Inlined t::b() should not be instrumented */
38        a.c();          /* Inlined t::c() should not be instrumented */
39        a.d();          /* Inlined t::d() should not be instrumented */
40        return a;