Commit 9e37582d by Jakub Jelinek Committed by Jakub Jelinek

re PR bootstrap/71071 (ICE --enable-checking=fold : fold check: original tree changed by fold)

	PR bootstrap/71071
	* fold-const.c (fold_checksum_tree): Allow modification
	of TYPE_ALIAS_SET during folding.

	* gcc.dg/pr71071.c: New test.

From-SVN: r236222
parent 23cb7266
2016-05-13 Jakub Jelinek <jakub@redhat.com> 2016-05-13 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/71071
* fold-const.c (fold_checksum_tree): Allow modification
of TYPE_ALIAS_SET during folding.
* config/i386/i386.c (ix86_compute_frame_layout, ix86_expand_prologue, * config/i386/i386.c (ix86_compute_frame_layout, ix86_expand_prologue,
ix86_expand_split_stack_prologue): Use HOST_WIDE_INT_C macro. ix86_expand_split_stack_prologue): Use HOST_WIDE_INT_C macro.
(ix86_split_to_parts): Likewise. Fix up formatting. (ix86_split_to_parts): Likewise. Fix up formatting.
......
...@@ -12130,7 +12130,8 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx, ...@@ -12130,7 +12130,8 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx,
|| TYPE_REFERENCE_TO (expr) || TYPE_REFERENCE_TO (expr)
|| TYPE_CACHED_VALUES_P (expr) || TYPE_CACHED_VALUES_P (expr)
|| TYPE_CONTAINS_PLACEHOLDER_INTERNAL (expr) || TYPE_CONTAINS_PLACEHOLDER_INTERNAL (expr)
|| TYPE_NEXT_VARIANT (expr))) || TYPE_NEXT_VARIANT (expr)
|| TYPE_ALIAS_SET_KNOWN_P (expr)))
{ {
/* Allow these fields to be modified. */ /* Allow these fields to be modified. */
tree tmp; tree tmp;
...@@ -12140,6 +12141,7 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx, ...@@ -12140,6 +12141,7 @@ fold_checksum_tree (const_tree expr, struct md5_ctx *ctx,
TYPE_POINTER_TO (tmp) = NULL; TYPE_POINTER_TO (tmp) = NULL;
TYPE_REFERENCE_TO (tmp) = NULL; TYPE_REFERENCE_TO (tmp) = NULL;
TYPE_NEXT_VARIANT (tmp) = NULL; TYPE_NEXT_VARIANT (tmp) = NULL;
TYPE_ALIAS_SET (tmp) = -1;
if (TYPE_CACHED_VALUES_P (tmp)) if (TYPE_CACHED_VALUES_P (tmp))
{ {
TYPE_CACHED_VALUES_P (tmp) = 0; TYPE_CACHED_VALUES_P (tmp) = 0;
......
2016-05-13 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/71071
* gcc.dg/pr71071.c: New test.
2016-05-13 Uros Bizjak <ubizjak@gmail.com> 2016-05-13 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/vect/tree-vect.h (check_vect): Handle AVX2, * gcc.dg/vect/tree-vect.h (check_vect): Handle AVX2,
......
/* PR bootstrap/71071 */
/* { dg-do compile } *
/* { dg-options "-O2" } */
struct S { unsigned b : 1; } a;
void
foo ()
{
if (a.b)
;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment