summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/target_attr_8.c
blob: 00ebd8c250762013d5a2c682177beec20998face (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O2 -save-temps" } */

/* bar has a subset set of the architectural flags of bam.
   Inlining should be allowed.  */

__attribute__ ((target ("arch=armv8-a+nocrc")))
static int
bar (int a)
{
  return a - 6;
}

__attribute__ ((target ("arch=armv8-a+crc")))
int
bam (int a)
{
  return a - bar (a);
}


/* { dg-final { scan-assembler-not "bl.*bar" } } */