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

import gcc.attributes;

int func(int x)
{
    int nested_function(int y, int z) @noipa
    {
        return y + z;
    }
    return nested_function(x, 0);
}

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

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