Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.c-torture/compile/pr16808.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* We used to ICE as we did not mark a Vop for rename as we changed a function call to a normal modify statement while folding exp(0.0); */ double exp(double); void f0(void); void f(double); typedef struct Parser { int x; char *s; } Parser; static double pop(Parser *p) { if (p->s[0] <= 0) { f0(); return 0; } --p->x; return 0; } static void evalFactor(Parser *p) { while (p->x) f(exp(pop(p))); } static void evalTerm(Parser *p) { while (p->s[0]) evalFactor(p); } static void evalExpression(Parser *p) { evalTerm(p); while (p->s[0]) evalTerm(p); } void evalPrimary(Parser *p) { if (p->s) return; evalExpression(p); }