From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1269 invoked by alias); 16 May 2011 15:32:49 -0000 Received: (qmail 1235 invoked by uid 22791); 16 May 2011 15:32:47 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-ey0-f175.google.com (HELO mail-ey0-f175.google.com) (209.85.215.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 16 May 2011 15:32:32 +0000 Received: by eye27 with SMTP id 27so1471288eye.20 for ; Mon, 16 May 2011 08:32:31 -0700 (PDT) Received: by 10.14.20.14 with SMTP id o14mr1710113eeo.156.1305559951195; Mon, 16 May 2011 08:32:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.14.119.144 with HTTP; Mon, 16 May 2011 08:32:10 -0700 (PDT) In-Reply-To: <4DD13487.50606@gjlay.de> References: <4DBECC84.4080701@gjlay.de> <20110502161844.GN23480@codesourcery.com> <4DC3FD8C.1060004@gjlay.de> <4DD13487.50606@gjlay.de> From: Denis Chertykov Date: Mon, 16 May 2011 17:31:00 -0000 Message-ID: Subject: Re: [Patch,AVR]: Fix PR45099 To: Georg-Johann Lay Cc: Nathan Froyd , gcc-patches@gcc.gnu.org, Anatoly Sokolov , Eric Weddington Content-Type: text/plain; charset=UTF-8 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg01145.txt.bz2 2011/5/16 Georg-Johann Lay : > Denis Chertykov schrieb: >> 2011/5/6 Georg-Johann Lay : >>> Nathan Froyd schrieb: >>>> On Mon, May 02, 2011 at 05:23:48PM +0200, Georg-Johann Lay wrote: >>>>> PR45099 is an extension that gives an error when a fixed register is >>>>> needed to pass a parameter to a function. >>>>> >>>>> Because the program will show malfunction when such code is generated, >>>>> anyway, I think an error is more appropriate than a warning (as >>>>> proposed in the PR). >>>> This seems like something that should be handled by common code. >>>> >>>> -Nathan >>> Yes, I agree. However, common code it too complicated for me to run >>> tests for, so I restrict myself to avr backend. >>> >>> Until such a test will find its way into common code, it might still >>> be useful in avr backend. I think this has quite low priority for >>> other targets because global registers are not very common in, e.g. i386. >>> >> >> I think that better to have this patch. >> So, I approve it. > > Ok, applied it as it was: > http://gcc.gnu.org/viewcvs?view=revision&revision=173791 > >> George, please make a working testcase against the trunk and post a >> GCC core bug. > > How should such a testcase look like, and for what target? This is > highly target and ABI dependent. Moreover, the patch above just tests > for argument registers, not return registers. > > Basically, I think of someone is hacking with global registers, he > must know what he is doing. There will always be cases where global > regs might violate some things if one is not careful. Ok. Denis.