summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/attr_alwaysinline1.d
blob: 8fbe25cdfc1fe4cdaba982ebe5a6fe3534aee168 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// { dg-do compile }
// { dg-options "-O0" }

import gcc.attributes;

int func()
{
    int nested_function() @always_inline
    {
        return 13;
    }
    return nested_function();
}

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

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