1 /* PR sanitizer/81281 */
2 
3 void
foo(unsigned p,unsigned a,unsigned b)4 foo (unsigned p, unsigned a, unsigned b)
5 {
6   unsigned q = p + 7;
7   if (a - (1U + __INT_MAX__) >= 2)
8     __builtin_unreachable ();
9   int d = p + b;
10   int c = p + a;
11   if (c - d != __INT_MAX__)
12     __builtin_abort ();
13 }
14 
15 void
bar(unsigned p,unsigned a)16 bar (unsigned p, unsigned a)
17 {
18   unsigned q = p + 7;
19   if (a - (1U + __INT_MAX__) >= 2)
20     __builtin_unreachable ();
21   int c = p;
22   int d = p + a;
23   if (c - d != -__INT_MAX__ - 1)
24     __builtin_abort ();
25 }
26 
27 int
main()28 main ()
29 {
30   foo (-1U, 1U + __INT_MAX__, 1U);
31   bar (-1U, 1U + __INT_MAX__);
32   return 0;
33 }
34