diff options
author | Ben Cheng <bccheng@google.com> | 2014-05-17 17:03:43 -0700 |
---|---|---|
committer | Ben Cheng <bccheng@google.com> | 2014-05-17 17:12:35 -0700 |
commit | 8c493ead6366b552adee796de296936b78f34c5a (patch) | |
tree | 4936e52fb9b84edbcd9293bd321027413d1835bf /gcc-4.9/gcc/c-family | |
parent | 9750bde7e561731ce8a07cdbd0165a688e74a696 (diff) | |
download | toolchain_gcc-8c493ead6366b552adee796de296936b78f34c5a.tar.gz toolchain_gcc-8c493ead6366b552adee796de296936b78f34c5a.tar.bz2 toolchain_gcc-8c493ead6366b552adee796de296936b78f34c5a.zip |
[4.9] Refresh GCC 4.9 to the 20140514 snapshot.
For critical bug fixes including devirtualization and codegen.
Change-Id: I8138d3dc408fc12db5eecb01d2753d39219712f2
Diffstat (limited to 'gcc-4.9/gcc/c-family')
-rw-r--r-- | gcc-4.9/gcc/c-family/ChangeLog | 16 | ||||
-rw-r--r-- | gcc-4.9/gcc/c-family/c-common.c | 15 | ||||
-rw-r--r-- | gcc-4.9/gcc/c-family/c-opts.c | 6 |
3 files changed, 36 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/c-family/ChangeLog b/gcc-4.9/gcc/c-family/ChangeLog index 805ba9ca8..4f277de68 100644 --- a/gcc-4.9/gcc/c-family/ChangeLog +++ b/gcc-4.9/gcc/c-family/ChangeLog @@ -1,3 +1,19 @@ +2014-05-06 Richard Biener <rguenther@suse.de> + + * c-opts.c (c_common_post_options): For -freestanding, + -fno-hosted and -fno-builtin disable pattern recognition + if not enabled explicitely. + +2014-04-22 Richard Biener <rguenther@suse.de> + + Backport from mainline + 2014-04-14 Richard Biener <rguenther@suse.de> + Marc Glisse <marc.glisse@inria.fr> + + PR c/60819 + * c-common.c (convert_vector_to_pointer_for_subscript): Properly + apply may-alias the scalar pointer type when applicable. + 2014-04-22 Release Manager * GCC 4.9.0 released. diff --git a/gcc-4.9/gcc/c-family/c-common.c b/gcc-4.9/gcc/c-family/c-common.c index 03731b4b8..f7f2bb3e3 100644 --- a/gcc-4.9/gcc/c-family/c-common.c +++ b/gcc-4.9/gcc/c-family/c-common.c @@ -11770,8 +11770,21 @@ convert_vector_to_pointer_for_subscript (location_t loc, c_common_mark_addressable_vec (*vecp); type = build_qualified_type (TREE_TYPE (type), TYPE_QUALS (type)); - type = build_pointer_type (type); type1 = build_pointer_type (TREE_TYPE (*vecp)); + bool ref_all = TYPE_REF_CAN_ALIAS_ALL (type1); + if (!ref_all + && !DECL_P (*vecp)) + { + /* If the original vector isn't declared may_alias and it + isn't a bare vector look if the subscripting would + alias the vector we subscript, and if not, force ref-all. */ + alias_set_type vecset = get_alias_set (*vecp); + alias_set_type sset = get_alias_set (type); + if (!alias_sets_must_conflict_p (sset, vecset) + && !alias_set_subset_of (sset, vecset)) + ref_all = true; + } + type = build_pointer_type_for_mode (type, ptr_mode, ref_all); *vecp = build1 (ADDR_EXPR, type1, *vecp); *vecp = convert (type, *vecp); } diff --git a/gcc-4.9/gcc/c-family/c-opts.c b/gcc-4.9/gcc/c-family/c-opts.c index e162e49a1..29e9a355b 100644 --- a/gcc-4.9/gcc/c-family/c-opts.c +++ b/gcc-4.9/gcc/c-family/c-opts.c @@ -851,6 +851,12 @@ c_common_post_options (const char **pfilename) if (flag_objc_exceptions && !flag_objc_sjlj_exceptions) flag_exceptions = 1; + /* If -ffreestanding, -fno-hosted or -fno-builtin then disable + pattern recognition. */ + if (!global_options_set.x_flag_tree_loop_distribute_patterns + && flag_no_builtin) + flag_tree_loop_distribute_patterns = 0; + /* -Woverlength-strings is off by default, but is enabled by -Wpedantic. It is never enabled in C++, as the minimum limit is not normative in that standard. */ |