Commit 6df46f59 by Richard Biener Committed by Richard Biener

re PR tree-optimization/87117 (ICE in…

re PR tree-optimization/87117 (ICE in eliminate_dom_walker::eliminate_cleanup(bool) at gcc/gcc/tree-ssa-sccvn.c:5431 since r263875)

2018-08-28  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/87117
	* tree-ssa-operands.c (add_stmt_operand): STRING_CST may
	get virtual operands.
	(get_expr_operands): Handle STRING_CST like other decls.

	* gcc.dg/lvalue-5.c: New testcase.

From-SVN: r263908
parent 36066262
2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117
* tree-ssa-operands.c (add_stmt_operand): STRING_CST may
get virtual operands.
(get_expr_operands): Handle STRING_CST like other decls.
2018-08-28 Martin Liska <mliska@suse.cz> 2018-08-28 Martin Liska <mliska@suse.cz>
* tree.h: Update documentation of fndecl_built_in_p * tree.h: Update documentation of fndecl_built_in_p
......
2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117
* gcc.dg/lvalue-5.c: New testcase.
2018-08-27 Jeff Law <law@redhat.com> 2018-08-27 Jeff Law <law@redhat.com>
PR tree-optimization/87110 PR tree-optimization/87110
......
/* Test assignment to elements of a string literal is a warning, not /* Test assignment to elements of a string literal is a warning, not
an error. PR 27676. */ an error. PR 27676. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-pedantic-errors" } */ /* { dg-options "-O -pedantic-errors" } */
void void
f (void) f (void)
......
...@@ -515,7 +515,7 @@ add_stmt_operand (struct function *fn, tree *var_p, gimple *stmt, int flags) ...@@ -515,7 +515,7 @@ add_stmt_operand (struct function *fn, tree *var_p, gimple *stmt, int flags)
{ {
tree var = *var_p; tree var = *var_p;
gcc_assert (SSA_VAR_P (*var_p)); gcc_assert (SSA_VAR_P (*var_p) || TREE_CODE (*var_p) == STRING_CST);
if (is_gimple_reg (var)) if (is_gimple_reg (var))
{ {
...@@ -740,6 +740,7 @@ get_expr_operands (struct function *fn, gimple *stmt, tree *expr_p, int flags) ...@@ -740,6 +740,7 @@ get_expr_operands (struct function *fn, gimple *stmt, tree *expr_p, int flags)
case VAR_DECL: case VAR_DECL:
case PARM_DECL: case PARM_DECL:
case RESULT_DECL: case RESULT_DECL:
case STRING_CST:
if (!(flags & opf_address_taken)) if (!(flags & opf_address_taken))
add_stmt_operand (fn, expr_p, stmt, flags); add_stmt_operand (fn, expr_p, stmt, flags);
return; return;
......
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