re PR middle-end/79537 (ICE in gimplify_expr, at gimplify.c:12009)
PR middle-end/79537 * gimplify.c (gimplify_expr): Handle unused *&&L;. * gcc.dg/comp-goto-4.c: New. From-SVN: r245604
This commit is contained in:
parent
b93a9a15ee
commit
80480ceee9
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -11976,8 +11976,11 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
|
|||
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))
|
||||
{
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2017-02-20 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR middle-end/79537
|
||||
* gcc.dg/comp-goto-4.c: New test.
|
||||
|
||||
2017-02-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/79568
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/* 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" } */
|
||||
}
|
Loading…
Reference in New Issue