summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/attr_noinline1.d
blob: 51fffe52e7872abeea0a2358bdc30fb101c6efff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do compile }
// { dg-options "-O2 -finline-functions -fno-ipa-icf" }

import gcc.attributes;

extern int t();

void func()
{
    void nested_function() @noinline
    {
        t();
    }
    nested_function();
}

@noinline int var = 0; // { dg-warning ".noinline. attribute ignored" }

// { dg-final { scan-assembler "nested_function" } }