From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NjzNe-0003P5-Ga for qemu-devel@nongnu.org; Tue, 23 Feb 2010 13:21:10 -0500 Received: from [199.232.76.173] (port=43984 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NjzNd-0003Ot-4y for qemu-devel@nongnu.org; Tue, 23 Feb 2010 13:21:09 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NjzNc-0004pv-GI for qemu-devel@nongnu.org; Tue, 23 Feb 2010 13:21:08 -0500 Received: from mail-ew0-f218.google.com ([209.85.219.218]:40669) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NjzNc-0004pp-6H for qemu-devel@nongnu.org; Tue, 23 Feb 2010 13:21:08 -0500 Received: by ewy10 with SMTP id 10so229177ewy.16 for ; Tue, 23 Feb 2010 10:21:07 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 23 Feb 2010 19:21:00 +0100 Message-Id: <1266949260-24974-1-git-send-email-pbonzini@redhat.com> In-Reply-To: References: Subject: [Qemu-devel] [PATCH] declare saved_env_reg as volatile List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: jay.foad@gmail.com This ensures that the compiler does not move it away from the "env = env1;" assignment. Fixes a miscompilation on gcc 4.4, reported by Jay Foad. Cc: Signed-off-by: Paolo Bonzini --- cpu-exec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 51aa416..8721684 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -215,7 +215,7 @@ static void cpu_handle_debug_exception(CPUState *env) int cpu_exec(CPUState *env1) { - host_reg_t saved_env_reg; + volatile host_reg_t saved_env_reg; int ret, interrupt_request; TranslationBlock *tb; uint8_t *tc_ptr; -- 1.6.6