2 /* { dg-do compile } */
4 typedef __PTRDIFF_TYPE__
ptrdiff_t;
11 static ptrdiff_t b
= p
- (p
- 1); /* { dg-bogus "integer overflow in expression" } */
12 static ptrdiff_t c
= (p
- 1) - p
; /* { dg-bogus "integer overflow in expression" } */
13 static ptrdiff_t d
= (p
- 2) - (p
- 1);/* { dg-bogus "integer overflow in expression" } */
14 static ptrdiff_t e
= (p
- 1) - (p
- 2);/* { dg-bogus "integer overflow in expression" } */
15 a
[0] = p
- (p
- 1); /* { dg-bogus "integer overflow in expression" } */
16 a
[1] = (p
- 1) - p
; /* { dg-bogus "integer overflow in expression" } */
17 a
[2] = (p
- 2) - (p
- 1); /* { dg-bogus "integer overflow in expression" } */
18 a
[3] = (p
- 1) - (p
- 2); /* { dg-bogus "integer overflow in expression" } */