From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2865 invoked by alias); 1 Dec 2014 11:00:19 -0000 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 Received: (qmail 2848 invoked by uid 89); 1 Dec 2014 11:00:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f51.google.com Received: from mail-oi0-f51.google.com (HELO mail-oi0-f51.google.com) (209.85.218.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 01 Dec 2014 11:00:16 +0000 Received: by mail-oi0-f51.google.com with SMTP id e131so7224836oig.38 for ; Mon, 01 Dec 2014 03:00:15 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.182.130.162 with SMTP id of2mr34646055obb.52.1417431614984; Mon, 01 Dec 2014 03:00:14 -0800 (PST) Received: by 10.76.174.2 with HTTP; Mon, 1 Dec 2014 03:00:14 -0800 (PST) In-Reply-To: <3887233.jQSJCmu5YU@polaris> References: <3887233.jQSJCmu5YU@polaris> Date: Mon, 01 Dec 2014 11:00:00 -0000 Message-ID: Subject: Re: [patch] Fix ICE on unaligned record field From: Richard Biener To: Eric Botcazou , Martin Jambor Cc: GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00015.txt.bz2 On Fri, Nov 28, 2014 at 5:20 PM, Eric Botcazou wrote: > Hi, > > the attached Ada testcase triggers an assertion in the RTL expander for the > address operator because the operator has been applied to a non-byte-aligned > record field. The problematic ADDR_EXPR is built by ipa_modify_call_arguments > which has a hole when get_addr_base_and_unit_offset returns NULL_TREE: the > variable offset case is handled but not the non-byte-aligned case, which can > rountinely happen in Ada, hence the proposed fix. > > Tested on x86_64-suse-linux, OK for the mainline? Umm. So you are doing a possibly aggregate copy here? Or how are we sure we are dealing with a register op only? (the function is always a twisted maze to me...) That said - I suppose this is called from IPA-SRA? In that case, can't we please avoid doing the transform in the first place? Thanks, Richard. > > 2014-11-28 Eric Botcazou > > * ipa-prop.c (ipa_modify_call_arguments): Properly deal with unaligned > aggregate parameters passed by value. > > > 2014-11-28 Eric Botcazou > > * gnat.dg/specs/pack12.ads: New test. > > > -- > Eric Botcazou