public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Marek Polacek <polacek@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix ctor reference folding (PR middle-end/65554)
Date: Sat, 11 Apr 2015 00:06:00 -0000	[thread overview]
Message-ID: <CAMe9rOo37Wco_TEtHdCCY=oP=4xCNUuHdvAKqajy_OU1wLSFOw@mail.gmail.com> (raw)
In-Reply-To: <20150409182817.GD9798@redhat.com>

On Thu, Apr 9, 2015 at 11:28 AM, Marek Polacek <polacek@redhat.com> 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  <polacek@redhat.com>
>             Jakub Jelinek  <jakub@redhat.com>
>
>         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 <initializer_list>^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 <initializer_list>^M
compilation terminated.^M

FAIL: g++.dg/opt/pr65554.C  -std=gnu++11 (test for excess errors)

-- 
H.J.

  reply	other threads:[~2015-04-11  0:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 18:28 Marek Polacek
2015-04-11  0:06 ` H.J. Lu [this message]
2015-04-11  0:15   ` H.J. Lu
2015-04-11  2:16     ` Marek Polacek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMe9rOo37Wco_TEtHdCCY=oP=4xCNUuHdvAKqajy_OU1wLSFOw@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=polacek@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).