From 94a4f3ab6abd04fd569dcb13716913bd49bbeb67 Mon Sep 17 00:00:00 2001 From: Anders Magnusson Date: Sat, 6 Oct 2007 13:31:56 +0000 Subject: From master repo: > Do not try to branch-optimize pointer comparisions, found by Otto M. --- usr.bin/pcc/arch/x86/local.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 */ -- cgit v1.2.3