Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755288Ab0KOKYu (ORCPT ); Mon, 15 Nov 2010 05:24:50 -0500 Received: from mail-iw0-f174.google.com ([209.85.214.174]:37027 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753735Ab0KOKYt (ORCPT ); Mon, 15 Nov 2010 05:24:49 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=n633cfSUpVT4EvzQjGbeB6rED5I9LporZ3NnrDRsJ3Vfw2Ay4cfZWPHfu5kJVLA2wI I4vlMrNBzhGoqg2UD7Ce5dHHHYK+FxyBgR9rxxCo3U8P2pO1agesqHdgLbNS6XoQEFdZ w2hrkpdrw+/e2+qx5de/D5g+eSsupUFB9Po/4= MIME-Version: 1.0 In-Reply-To: <20101115085605.GE2583@sunsite.ms.mff.cuni.cz> References: <87k4kospnd.fsf@basil.nowhere.org> <877hgorrj1.fsf@basil.nowhere.org> <4CD843DC.10106@gmail.com> <20101109134816.GB29433@basil.fritz.box> <4CD97A3D.1040602@xs4all.nl> <20101115085605.GE2583@sunsite.ms.mff.cuni.cz> Date: Mon, 15 Nov 2010 11:24:48 +0100 Message-ID: Subject: Re: gcc 4.5.1 / as 2.20.51.0.11 miscompiling drivers/char/i8k.c ? From: Richard Guenther To: Jakub Jelinek Cc: Linus Torvalds , James Cloos , Linux Kernel Mailing List , Andreas Schwab , Andi Kleen , Michael Matz , Dave Korn , gcc@gcc.gnu.org, Jim Bos 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: 1481 Lines: 32 On Mon, Nov 15, 2010 at 9:56 AM, Jakub Jelinek wrote: > On Sun, Nov 14, 2010 at 07:21:50PM -0800, Linus Torvalds wrote: >> So when Richard Gunther says "a memory clobber doesn't cover automatic >> storage", to me that very clearly spells "gcc is buggy as hell". >> Because automatic storage with its address taken _very_ much gets >> clobbered by things like memset etc. If the compiler doesn't >> understand that, the compiler is just broken. > > I'll leave the discussion about meaning of "memory" clobber aside to > Richard, Of course GCC handles memset just fine. Note that I was refering to non-address taken automatic storage for "memory" (even though when double-checking the current implementation GCC even thinks that all address-taken memory is clobbered by asms as soon as they have at least one memory operand or a "memory" clobber). It's just that in future we might want to improve this and I think not covering non-address taken automatic storage for "memory" is sensible. And I see that you don't see address-taken automatic storage as a sensible choice to exclude from "memory", and I have noted that. Btw, I still haven't seen an testcase for the actual problem we are talking about. Richard. -- 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/