2017-12-14 Richard Biener <rguenther@suse.de>
PR c/83415
c/
* c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
like REALPART_EXPR for the behavior of whether its operand
is an lvalue.
* gcc.dg/pr83415.c: New testcase.
From-SVN: r255629
+2017-12-14 Richard Biener <rguenther@suse.de>
+
+ PR c/83415
+ * c-fold.c (c_fully_fold_internal): Treat VIEW_CONVERT_EXPR
+ like REALPART_EXPR for the behavior of whether its operand
+ is an lvalue.
+
2017-12-12 Marek Polacek <polacek@redhat.com>
PR c/82679
goto unary;
case REALPART_EXPR:
case IMAGPART_EXPR:
+ case VIEW_CONVERT_EXPR:
op0_lval = lval;
/* FALLTHRU */
case INDIRECT_REF:
case FLOAT_EXPR:
CASE_CONVERT:
case ADDR_SPACE_CONVERT_EXPR:
- case VIEW_CONVERT_EXPR:
case NON_LVALUE_EXPR:
case NEGATE_EXPR:
case BIT_NOT_EXPR:
+2017-12-14 Richard Biener <rguenther@suse.de>
+
+ PR c/83415
+ * gcc.dg/pr83415.c: New testcase.
+
2017-12-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/83418
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+const short __attribute__((vector_size(16))) y = { 0, 1, 2, 3, 4, 5, 6, 7 };
+
+int
+main (int argc, short *argv[])
+{
+ int i = argc;
+ y[i] = 7 - i; /* { dg-warning "read-only" } */
+ return 0;
+}