summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug-2804.c
blob: 70f0f750e9718b9ad84aba81cbbc947c2362377a (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-2804.c
*/

#include <testfwk.h>

#include <limits.h>
#include <stdbool.h>

volatile unsigned long long a;

unsigned long long f(_Bool c)
{
	if(c)
		return(a + (ULLONG_MAX - 2));
	else
		return(a + (ULLONG_MAX - 3));
}

void testBug(void)
{
	a = 0;
	ASSERT(f(true) != f(false));
}