Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / gcc.dg / pointer-arith-10.c
blob35e2b11ef96b74408a27cfa3ed15091d92348383
1 /* { dg-do compile } */
2 /* { dg-options "-fdump-tree-original" } */
4 char *foo(char *p, __UINTPTR_TYPE__ i)
6 return (char *)i + (__UINTPTR_TYPE__)p;
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" } } */
13 /* And also that we don't swap the operands. */
14 /* { dg-final { scan-tree-dump-not "return p +" "original" } } */