summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug-3254.c
blob: 1b6f2a56d33d8d1a204d48c03a32c5f5568fdaac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
   bug-3254.c. A bug in _Generic handling of implicitly assigned intrinsic named address spaces.
 */

#include <testfwk.h>

int i;

void f(void)
{
    i = _Generic(&i, int * : 1, long * : 2); // Failed to compile this line due to &i being __near int *.
}


void testBug(void)
{
	f();
    ASSERT(i == 1);
}