public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix PR46504
@ 2010-11-17 15:33 Richard Guenther
  2010-11-18  1:40 ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Guenther @ 2010-11-17 15:33 UTC (permalink / raw)
  To: gcc-patches


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.  */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix PR46504
  2010-11-17 15:33 [PATCH] Fix PR46504 Richard Guenther
@ 2010-11-18  1:40 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2010-11-18  1:40 UTC (permalink / raw)
  To: Richard Guenther; +Cc: gcc-patches

On Wed, Nov 17, 2010 at 6:36 AM, Richard Guenther <rguenther@suse.de> wrote:
>
> 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.
>

This caused:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46525

-- 
H.J.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-18  0:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-17 15:33 [PATCH] Fix PR46504 Richard Guenther
2010-11-18  1:40 ` H.J. Lu

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).