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
+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>
* 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>
PR tree-optimization/87110
/* Test assignment to elements of a string literal is a warning, not
an error. PR 27676. */
/* { dg-do compile } */
-/* { dg-options "-pedantic-errors" } */
+/* { dg-options "-O -pedantic-errors" } */
void
f (void)
{
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))
{
case VAR_DECL:
case PARM_DECL:
case RESULT_DECL:
+ case STRING_CST:
if (!(flags & opf_address_taken))
add_stmt_operand (fn, expr_p, stmt, flags);
return;