summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug-2981.c
blob: b800728efe4b95c61db1a6bc513942d6bca6d469 (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
/*
   bug-3132.c
   A bug in the handling of inlined function call in a comma operator inside a for condition (code failed to compile)
 */

#include <testfwk.h>

volatile int i;

static inline void iRestore(void)
{
	i++;
}

int m(void) {
    for(unsigned char td = 1; td; td = 0, iRestore());
    return 0;
}

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