public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Fix PR46504
Date: Wed, 17 Nov 2010 15:33:00 -0000	[thread overview]
Message-ID: <alpine.LNX.2.00.1011171533230.23074@zhemvz.fhfr.qr> (raw)


When introducing canonical type merging I forgot about the interaction
with regular type merging.  The following patch makes sure that we
have only merging leaders as canonical types.

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.

Richard.

2010-11-17  Richard Guenther  <rguenther@suse.de>

	PR lto/46504
	* gimple.c (gimple_register_canonical_type): Make sure to only
	make type leaders canonical types.

Index: gcc/gimple.c
===================================================================
*** gcc/gimple.c	(revision 166860)
--- gcc/gimple.c	(working copy)
*************** gimple_register_canonical_type (tree t)
*** 4398,4403 ****
--- 4398,4407 ----
    if (TYPE_CANONICAL (t))
      return TYPE_CANONICAL (t);
  
+   /* Always register the type itself first so that the canonical type
+      will be the one we merge to as well.  */
+   t = gimple_register_type (t);
+ 
    /* Always register the main variant first.  This is important so we
       pick up the non-typedef variants as canonical, otherwise we'll end
       up taking typedef ids for structure tags during comparison.  */

             reply	other threads:[~2010-11-17 14:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17 15:33 Richard Guenther [this message]
2010-11-18  1:40 ` H.J. Lu

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=alpine.LNX.2.00.1011171533230.23074@zhemvz.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    /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).