From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5918 invoked by alias); 19 Oct 2009 17:43:21 -0000 Received: (qmail 5803 invoked by uid 22791); 19 Oct 2009 17:43:20 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mtagate6.de.ibm.com (HELO mtagate6.de.ibm.com) (195.212.17.166) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 19 Oct 2009 17:43:15 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate6.de.ibm.com (8.13.1/8.13.1) with ESMTP id n9JHhDqx004713 for ; Mon, 19 Oct 2009 17:43:13 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n9JHhCfa2953246 for ; Mon, 19 Oct 2009 19:43:12 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n9JHhCIi025050 for ; Mon, 19 Oct 2009 19:43:12 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n9JHhBIP025038; Mon, 19 Oct 2009 19:43:11 +0200 Message-Id: <200910191743.n9JHhBIP025038@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 19 Oct 2009 19:43:11 +0200 Subject: Re: m32c support for named addr spaces branch To: richard.guenther@gmail.com (Richard Guenther) Date: Mon, 19 Oct 2009 17:45:00 -0000 From: "Ulrich Weigand" Cc: dj@redhat.com (DJ Delorie), gcc-patches@gcc.gnu.org In-Reply-To: <84fc9c000910190735k5bda29bav9002e1f011d0cec6@mail.gmail.com> from "Richard Guenther" at Oct 19, 2009 04:35:38 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2009-10/txt/msg01228.txt.bz2 Richard Guenther wrote: > On Mon, Oct 19, 2009 at 4:24 PM, Ulrich Weigand wrote: > > I'm not sure POINTERS_EXTEND_UNSIGNED is the correct test here; the offset > > is not itself a pointer type. What if the offset actually *is* a negative > > value of a smaller, signed type? > > If the above is expanding a POINTER_PLUS_EXPR then the offset > needs to be extended as _signed_ always, independent of the > sign of sizetype which is the type of the offset (as sizetypes > are always sign-extended). It's not a POINTER_PLUS_EXPR as such; we're expanding a component access as handled by get_inner_reference here. But it seems this still results in an offset of type "sizetype". It may be the problem is indeed that in DJ's situation, sizetype is a 16-bit integer type, while (__far) pointers are of a wider type. Is this supposed to be supported? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com