Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933612Ab0KOTW2 (ORCPT ); Mon, 15 Nov 2010 14:22:28 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:39942 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756811Ab0KOTW1 (ORCPT ); Mon, 15 Nov 2010 14:22:27 -0500 MIME-Version: 1.0 In-Reply-To: <20101115191248.GY29412@tyan-ft48-01.lab.bos.redhat.com> References: <20101115085605.GE2583@sunsite.ms.mff.cuni.cz> <20101115100331.GG2583@sunsite.ms.mff.cuni.cz> <20101115105446.GD7269@basil.fritz.box> <20101115111642.GU29412@tyan-ft48-01.lab.bos.redhat.com> <4CE17098.8090000@xs4all.nl> <4CE17C4B.1070305@xs4all.nl> <20101115185848.GI2583@sunsite.ms.mff.cuni.cz> <20101115191248.GY29412@tyan-ft48-01.lab.bos.redhat.com> From: Linus Torvalds Date: Mon, 15 Nov 2010 11:21:30 -0800 Message-ID: Subject: Re: gcc 4.5.1 / as 2.20.51.0.11 miscompiling drivers/char/i8k.c ? To: Jakub Jelinek Cc: Jim Bos , Andi Kleen , James Cloos , Linux Kernel Mailing List , Andreas Schwab , Michael Matz , Dave Korn , Richard Guenther , gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1105 Lines: 29 On Mon, Nov 15, 2010 at 11:12 AM, Jakub Jelinek wrote: > > Ah, the problem is that memory_identifier_string is only initialized in > ipa-reference.c's initialization, so it can be (and is in this case) NULL in > ipa-pure-const.c. Ok. And I guess you can verify that all versions of gcc do this correctly for "asm volatile"? Because since we'll have to work around this problem in the kernel, I suspect the simplest solution is to remove the "+m" that causes register pressure problems, and then use "asm volatile" to work around the const-function bug. And add a large comment about why "asm volatile" is probably always a good idea when you have a memory clobber and don't have any other visible memory modifications. I do wonder if this explains some of the problems we had with the bitop asms too. Hmm? Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/