aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/constexpr-shift.c
blob: df01b74e8dc1c60bcb28b09431e0bbea01678807 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#define __is_constexpr(x) \
        (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))

static void test(int x) {
	static int b[] = {
		[__builtin_choose_expr(__is_constexpr(1 << 1), 1, x)] = 0,
	};
}

/*
 * check-name: constexpr-shift
 */