1 /* { dg-do compile } */
2 /* { dg-options "-fdump-tree-original" } */
3
foo(char * p,__UINTPTR_TYPE__ i)4 char *foo(char *p, __UINTPTR_TYPE__ i)
5 {
6 return (char *)i + (__UINTPTR_TYPE__)p;
7 }
8
9 /* Check that we use a POINTER_PLUS_EXPR, not something like
10 return (char *) ((sizetype) p + (sizetype) i); */
11 /* { dg-final { scan-tree-dump-not "sizetype.*sizetype" "original" } } */
12
13 /* And also that we don't swap the operands. */
14 /* { dg-final { scan-tree-dump-not "return p +" "original" } } */
15