From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55358 invoked by alias); 11 Apr 2015 00:06:36 -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 55336 invoked by uid 89); 11 Apr 2015 00:06:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vn0-f41.google.com Received: from mail-vn0-f41.google.com (HELO mail-vn0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 11 Apr 2015 00:06:34 +0000 Received: by vnbf190 with SMTP id f190so9675235vnb.1 for ; Fri, 10 Apr 2015 17:06:32 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.106.197 with SMTP id f188mr411000oic.128.1428710792394; Fri, 10 Apr 2015 17:06:32 -0700 (PDT) Received: by 10.76.54.14 with HTTP; Fri, 10 Apr 2015 17:06:32 -0700 (PDT) In-Reply-To: <20150409182817.GD9798@redhat.com> References: <20150409182817.GD9798@redhat.com> Date: Sat, 11 Apr 2015 00:06:00 -0000 Message-ID: Subject: Re: [PATCH] Fix ctor reference folding (PR middle-end/65554) From: "H.J. Lu" To: Marek Polacek Cc: GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00487.txt.bz2 On Thu, Apr 9, 2015 at 11:28 AM, Marek Polacek wrote: > This test was failing at -O due to non-trivial conversion at assignment. > The reason is that gimple_fold_builtin_memory_op created invalid GIMPLE, > because fold_ctor_reference called via fold_const_aggregate_ref was > discarding a cast, so it returned a different type than it got. Fixed by > dropping useless type conversions only. > > It also fixes a stale comment that I noticed. > > Bootstrapped/regtested on x86_64-linux. Preapproved by Jakub on IRC, > applying to trunk. > > 2015-04-09 Marek Polacek > Jakub Jelinek > > PR middle-end/65554 > * gimple-fold.c (gimple_fold_builtin_memory_op): Update comment. > (fold_ctor_reference): Use STRIP_USELESS_TYPE_CONVERSION instead > of STRIP_NOPS. > > * g++.dg/opt/pr65554.C: New test. > The testcase failed for 32-bit target: /export/gnu/import/git/gcc-test-ia32/src-trunk/gcc/testsuite/g++.dg/opt/pr65554.C:47:30: fatal error: definition of std::initializer_list does not match #include ^M compilation terminated.^M compiler exited with status 1 output is: /export/gnu/import/git/gcc-test-ia32/src-trunk/gcc/testsuite/g++.dg/opt/pr65554.C:47:30: fatal error: definition of std::initializer_list does not match #include ^M compilation terminated.^M FAIL: g++.dg/opt/pr65554.C -std=gnu++11 (test for excess errors) -- H.J.