diff options
author | Richard Guenther <rguenther@suse.de> | 2011-05-20 09:35:44 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-05-20 09:35:44 +0000 |
commit | 0ea80a160332d4676919e31a7bdff1d8d7100af0 (patch) | |
tree | 1ca1ea014fa59c5fb0c6b4ef9a6e23a39a9201f6 /gcc | |
parent | fb291a1ea7ed34478ee7a3c3ce7a0bd87915e79e (diff) | |
download | gcc-0ea80a160332d4676919e31a7bdff1d8d7100af0.zip gcc-0ea80a160332d4676919e31a7bdff1d8d7100af0.tar.gz gcc-0ea80a160332d4676919e31a7bdff1d8d7100af0.tar.bz2 |
re PR middle-end/48849 (SPEC CPU 2000/2006 failed to build with LTO)
2011-05-20 Richard Guenther <rguenther@suse.de>
PR middle-end/48849
* gimple.c (gimple_register_canonical_type): Compute TYPE_CANONICAL
of pointer types the same way the middle-end does.
From-SVN: r173939
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gimple.c | 19 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b89b3f9..3bd18b8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2011-05-20 Richard Guenther <rguenther@suse.de> + PR middle-end/48849 + * gimple.c (gimple_register_canonical_type): Compute TYPE_CANONICAL + of pointer types the same way the middle-end does. + +2011-05-20 Richard Guenther <rguenther@suse.de> + * gimple.c (gimple_register_type_1): Do not fiddle with main-variant or pointer-to chains. Delay all fixup to uniquify_nodes. diff --git a/gcc/gimple.c b/gcc/gimple.c index 5b03e15..4c7fbfc 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -4801,6 +4801,25 @@ gimple_register_canonical_type (tree t) if (TYPE_CANONICAL (t)) return TYPE_CANONICAL (t); + /* For pointer and reference types do as the middle-end does - the + canonical type is a pointer to the canonical pointed-to type. */ + if (TREE_CODE (t) == POINTER_TYPE) + { + TYPE_CANONICAL (t) + = build_pointer_type_for_mode + (gimple_register_canonical_type (TREE_TYPE (t)), + TYPE_MODE (t), TYPE_REF_CAN_ALIAS_ALL (t)); + return TYPE_CANONICAL (t); + } + else if (TREE_CODE (t) == REFERENCE_TYPE) + { + TYPE_CANONICAL (t) + = build_reference_type_for_mode + (gimple_register_canonical_type (TREE_TYPE (t)), + TYPE_MODE (t), TYPE_REF_CAN_ALIAS_ALL (t)); + return TYPE_CANONICAL (t); + } + if (gimple_canonical_types == NULL) gimple_canonical_types = htab_create_ggc (16381, gimple_canonical_type_hash, gimple_canonical_type_eq, 0); |