+2017-02-20 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/79537
+ * gimplify.c (gimplify_expr): Handle unused *&&L;.
+
2017-02-20 Jakub Jelinek <jakub@redhat.com>
PR target/79568
if (fallback == fb_none && *expr_p && !is_gimple_stmt (*expr_p))
{
/* We aren't looking for a value, and we don't have a valid
- statement. If it doesn't have side-effects, throw it away. */
- if (!TREE_SIDE_EFFECTS (*expr_p))
+ statement. If it doesn't have side-effects, throw it away.
+ We can also get here with code such as "*&&L;", where L is
+ a LABEL_DECL that is marked as FORCED_LABEL. */
+ if (TREE_CODE (*expr_p) == LABEL_DECL
+ || !TREE_SIDE_EFFECTS (*expr_p))
*expr_p = NULL;
else if (!TREE_THIS_VOLATILE (*expr_p))
{
--- /dev/null
+/* PR middle-end/79537 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+/* { dg-require-effective-target indirect_jumps } */
+/* { dg-require-effective-target label_values } */
+
+void
+f (void)
+{
+L:
+ *&&L;
+}
+
+void
+f2 (void)
+{
+ void *p;
+L:
+ p = &&L;
+ *p; /* { dg-warning "dereferencing 'void \\*' pointer" } */
+}