diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-25 14:05:28 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-25 14:05:28 +0000 |
commit | ea74f76f37533dce30120bd711f7ae38036f3a49 (patch) | |
tree | 5be829b0ffed7290b19e398a7f2b7765810a510d /gcc/gimple.c | |
parent | 3d0669bc4c7809951a75d70eadcbfa5d8e3e45db (diff) | |
download | gcc-ea74f76f37533dce30120bd711f7ae38036f3a49.tar.gz |
2010-08-25 Richard Guenther <rguenther@suse.de>
PR lto/44562
* lto-streamer.c (lto_record_common_node): Do not mess with
TYPE_CANONICAL when not in lto.
* gimple.c (gimple_register_type): Likewise.
* gcc.dg/graphite/id-27.c: New testcase.
* gcc.dg/lto/20100825-1_0.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163545 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 9d5c61bcecf..50b2eab4c52 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -4215,8 +4215,9 @@ gimple_register_type (tree t) gcc_assert (TYPE_P (t)); /* In TYPE_CANONICAL we cache the result of gimple_register_type. - It is initially set to NULL during LTO streaming. */ - if (TYPE_CANONICAL (t)) + It is initially set to NULL during LTO streaming. + But do not mess with TYPE_CANONICAL when not in WPA or link phase. */ + if (in_lto_p && TYPE_CANONICAL (t)) return TYPE_CANONICAL (t); /* Always register the main variant first. This is important so we @@ -4282,12 +4283,14 @@ gimple_register_type (tree t) TYPE_NEXT_REF_TO (t) = NULL_TREE; } - TYPE_CANONICAL (t) = new_type; + if (in_lto_p) + TYPE_CANONICAL (t) = new_type; t = new_type; } else { - TYPE_CANONICAL (t) = t; + if (in_lto_p) + TYPE_CANONICAL (t) = t; *slot = (void *) t; } |