aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/eval/asm-degen.c
blob: 5f3191597de5139f98015707d0d6a15a02511575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifdef __CHECKER__
#define __percpu __attribute__((noderef))
#else
#define __percpu
#endif

static __percpu int var;
static __percpu int arr[4];

static void foo(void)
{
	asm("" :: "r" (var));
}

static void bar(void)
{
	asm("" :: "r" (arr));
}

static void baz(void)
{
	asm("" :: "m" (var));
}

static void qux(void)
{
	asm("" :: "m" (arr));
}

/*
 * check-name: asm-degen
 * check-known-to-fail
 *
 * check-error-start
eval/asm-degen.c:12:24: warning: dereference of noderef expression
 * check-error-end
 */