summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr84670-4.c
blob: 036055081827443a74cdbc587229bbe4b39e5b67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-O2 -fwrapv" } */
/* { dg-require-effective-target ptr_eq_long } */

char *a;
int b(void)
{
  long d;
  if (a) {
      char c;
      while ((c = *a) && !((unsigned)c - '0' <= 9) && c != ',' && c != '-'
	     && c != '+')
	++a;
      d = (long)a;
  }
  if (*a)
    return d;
}