summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr31127.c
blob: f45b10ed5bb64531f39c61020a91411a667c04f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O2" } */

void ParseStringSidToSid(char *s, int* p) {
    int i = 0;

    while (*s) {
        while (*s && *s != '-')
            s++;
        if (*s== '-')
            s++;

        p[i++] = *s;
    }
}