diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-06-07 23:30:58 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-06-07 21:30:58 +0000 |
commit | ccb5ad373f204cc5690dabd1298503fde739a8ed (patch) | |
tree | 99c2edf394ef8a6f40706dc42eb4d7f0f1f7b48d /gcc/lto | |
parent | d7b35f22be0a732140022245c766fa323f1a768d (diff) | |
download | gcc-ccb5ad373f204cc5690dabd1298503fde739a8ed.zip gcc-ccb5ad373f204cc5690dabd1298503fde739a8ed.tar.gz gcc-ccb5ad373f204cc5690dabd1298503fde739a8ed.tar.bz2 |
alias.c (get_alias_set): Be ready for TYPE_CANONICAL of ptr_type_node to not be ptr_to_node.
* alias.c (get_alias_set): Be ready for TYPE_CANONICAL
of ptr_type_node to not be ptr_to_node.
* tree.c (gimple_types_compatible_p): Do not match TREE_CODE of
TREE_TYPE of pointers.
* gimple-expr.c (useless_type_conversion): Reorder the check for
function pointers and TYPE_CANONICAL.
* lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of
pointers.
* gfortran.dg/lto/bind_c-1_0.f90: New testcase.
* gfortran.dg/lto/bind_c-1_1.c: New testcase.
* gcc.dg/lto/c-compatible-types_0.c: Rename to ...
* gcc.dg/lto/c-compatible-types-1_0.c: this one; fix template
* gcc.dg/lto/c-compatible-types_1.c: Rename to ...
* gcc.dg/lto/c-compatible-types-1_1.c: this one; harden for
-fshort-enum.
From-SVN: r224201
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto/lto.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 5ba6a4f..d9dffef 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2015-06-06 Jan Hubicka <hubicka@ucw.cz> + + * lto.c (hash_canonical_type): Do not hash TREE_CODE of TREE_TYPE of + pointers. + 2015-06-05 Aldy Hernandez <aldyh@redhat.com> * lto-lang.c (lto_write_globals): Remove. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 735a2e7..b93e512 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -337,12 +337,12 @@ hash_canonical_type (tree type) if (TREE_CODE (type) == COMPLEX_TYPE) hstate.add_int (TYPE_UNSIGNED (type)); - /* For pointer and reference types, fold in information about the type - pointed to but do not recurse to the pointed-to type. */ + /* Fortran standard define C_PTR type that is compatible with every + C pointer. For this reason we need to glob all pointers into one. + Still pointers in different address spaces are not compatible. */ if (POINTER_TYPE_P (type)) { hstate.add_int (TYPE_ADDR_SPACE (TREE_TYPE (type))); - hstate.add_int (TREE_CODE (TREE_TYPE (type))); } /* For integer types hash only the string flag. */ |