re PR middle-end/71002 (-fstrict-aliasing breaks Boost's short string optimization...
authorRichard Biener <rguenther@suse.de>
Wed, 11 May 2016 10:24:11 +0000 (10:24 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 11 May 2016 10:24:11 +0000 (10:24 +0000)
commitebc1b29edb3428dd18e76cba8626625bfb184f1d
treec56af27e777a33142ec5005ae7600ac16297fad4
parent98ccd1d7ab1d9a0c99cce0d1c05ddcda3659dd26
re PR middle-end/71002 (-fstrict-aliasing breaks Boost's short string optimization implementation)

2016-05-11  Richard Biener  <rguenther@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.
* gimplify.c (gimplify_expr): Adjust in-SSA form test.

* g++.dg/torture/pr71002.C: New testcase.

From-SVN: r236117
gcc/ChangeLog
gcc/alias.c
gcc/fold-const.c
gcc/gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr71002.C [new file with mode: 0644]