https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71002
--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Mon May 30 14:00:18 2016 New Revision: 236879 URL: https://gcc.gnu.org/viewcvs?rev=236879&root=gcc&view=rev Log: 2016-05-30 Richard Biener <rguent...@suse.de> Backport from mainline 2016-05-11 Richard Biener <rguent...@suse.de> PR middle-end/71002 * alias.c (reference_alias_ptr_type): Preserve alias-set zero if the langhook insists on it. * fold-const.c (make_bit_field_ref): Add arg for the original reference and preserve its alias-set. (decode_field_reference): Take exp by reference and adjust it to the original memory reference. (optimize_bit_field_compare): Adjust callers. (fold_truth_andor_1): Likewise. * g++.dg/torture/pr71002.C: New testcase. 2016-05-13 Jakub Jelinek <ja...@redhat.com> PR bootstrap/71071 * fold-const.c (fold_checksum_tree): Allow modification of TYPE_ALIAS_SET during folding. * gcc.dg/pr71071.c: New test. Added: branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr71002.C branches/gcc-6-branch/gcc/testsuite/gcc.dg/pr71071.c Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/alias.c branches/gcc-6-branch/gcc/fold-const.c branches/gcc-6-branch/gcc/testsuite/ChangeLog