1 /* We used to ICE as we did not mark a Vop for rename as
2    we changed a function call to a normal modify statement
3    while folding exp(0.0); */
4 
5 double exp(double);
6 void f0(void);
7 void f(double);
8 typedef struct Parser {
9     int x;
10     char *s;
11 } Parser;
pop(Parser * p)12 static double pop(Parser *p) {
13     if (p->s[0] <= 0) {
14 	f0();
15 	return 0;
16     }
17     --p->x;
18     return 0;
19 }
evalFactor(Parser * p)20 static void evalFactor(Parser *p) {
21     while (p->x)
22 	f(exp(pop(p)));
23 }
evalTerm(Parser * p)24 static void evalTerm(Parser *p) {
25     while (p->s[0])
26 	evalFactor(p);
27 }
evalExpression(Parser * p)28 static void evalExpression(Parser *p) {
29     evalTerm(p);
30     while (p->s[0])
31 	evalTerm(p);
32 }
evalPrimary(Parser * p)33 void evalPrimary(Parser *p) {
34     if (p->s)
35 	return;
36     evalExpression(p);
37 }
38 
39