scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 0cc93f139f379604bf0dd01eddfc072d443c9c32
parent 9e448cb7f75cc2ffee10cc1a30230cd2e11141ff
Author: Michael Forney <mforney@mforney.org>
Date:   Fri, 17 Feb 2017 22:06:07 -0800

[cc1] Don't fold OPTR OADDR if it would change the type

Fixes 0093-arrayinit.c and 0095-arrayselector.c.

Diffstat:
Mcc1/fold.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cc1/fold.c b/cc1/fold.c @@ -400,7 +400,7 @@ foldunary(Node *np, Node *l) return NULL; break; case OPTR: - if (op != OADDR) + if (op != OADDR || np->type != l->left->type) return NULL; break; case OADDR: