summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorAnders Magnusson <ragge@cvs.openbsd.org>2007-10-06 13:31:56 +0000
committerAnders Magnusson <ragge@cvs.openbsd.org>2007-10-06 13:31:56 +0000
commit94a4f3ab6abd04fd569dcb13716913bd49bbeb67 (patch)
tree2f5276e50df5458ee2c6c6d240b56488f61d88f7 /usr.bin
parent259ec263b5ce971fd28f910dd04def2f5758c792 (diff)
From master repo:
> Do not try to branch-optimize pointer comparisions, found by Otto M.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/pcc/arch/x86/local.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/pcc/arch/x86/local.c b/usr.bin/pcc/arch/x86/local.c
index 7d26e8d00c2..62688c2b423 100644
--- a/usr.bin/pcc/arch/x86/local.c
+++ b/usr.bin/pcc/arch/x86/local.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: local.c,v 1.5 2007/10/06 13:17:44 otto Exp $ */
+/* $OpenBSD: local.c,v 1.6 2007/10/06 13:31:55 ragge Exp $ */
/*
* Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se).
* All rights reserved.
@@ -148,6 +148,8 @@ clocal(NODE *p)
r = l->n_left->n_left;
if (r->n_type >= FLOAT && r->n_type <= LDOUBLE)
break;
+ if (ISPTR(r->n_type))
+ break; /* no opt for pointers */
if (toolarge(r->n_type, l->n_right->n_lval))
break;
/* Type must be correct */