aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/attr_optimize3.d
blob: 2a9ad1230366c2ec705d68fd10dba415a38d3cbe (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 "-O0 -fdump-tree-optimized-raw" }

import gcc.attributes;

double notfast(double x)
{
    return x * x * x * x * x * x * x * x;
}

// { dg-final { scan-tree-dump-times "mult_expr, _" 7 "optimized" } }

@fastmath
static double fast(double x)
{
    return x * x * x * x * x * x * x * x;
}

// { dg-final { scan-tree-dump-times "mult_expr, powmult_" 3 "optimized" } }