Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gcc.dg/pr45570.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/gcc.dg/pr45570.c Fri Oct 27 22:46:09 2017 +0900 @@ -0,0 +1,28 @@ +/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */ +/* { dg-options "-O3 -fselective-scheduling2 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -ftracer" } */ +void +parser_get_next_char (char c, int qm, char *p) +{ + int quote_mode = 0; + for (; *p; p++) + { + if (qm) + { + if (quote_mode == 0 && *p == '"' && *(p - 1)) + { + quote_mode = 1; + continue; + } + if (quote_mode && *p == '"' && *(p - 1)) + quote_mode = 0; + } + if (quote_mode == 0 && *p == c && *(p - 1)) + break; + } +} + +void +parser_get_next_parameter (char *p) +{ + parser_get_next_char (':', 1, p); +}