1 /* { dg-do compile } */
2 /* { dg-options "-O -fdump-tree-optimized" } */
3 
f(int * p,int * q)4 int f(int *p, int *q){
5   __SIZE_TYPE__ n = q - p;
6   return n == 0;
7 }
8 
g(int * p,int * q)9 int g(int *p, int *q){
10   __PTRDIFF_TYPE__ n = q - p;
11   return n <= 2;
12 }
13 
h(long * p,long * q)14 int h(long *p, long *q){
15   __SIZE_TYPE__ n = q - p;
16   return n == (__SIZE_TYPE__)(-1)/2;
17 }
18 
19 /* { dg-final { scan-tree-dump-not "== 0" "optimized" } } */
20 /* { dg-final { scan-tree-dump "<= 8" "optimized" { target { int32 } } } } */
21 /* { dg-final { scan-tree-dump "return 0" "optimized" } } */
22