View | Details | Raw Unified | Return to bug 40943
Collapse All | Expand All

(-)gcc/tree-ssa.c.jj (-1 / +6 lines)
Lines 1255-1261 warn_uninitialized_var (tree *tp, int *w Link Here
1255
1255
1256
  /* We do not care about LHS.  */
1256
  /* We do not care about LHS.  */
1257
  if (wi->is_lhs)
1257
  if (wi->is_lhs)
1258
    return NULL_TREE;
1258
    {
1259
      /* Except for operands of INDIRECT_REF.  */
1260
      if (!INDIRECT_REF_P (t))
1261
	return NULL_TREE;
1262
      t = TREE_OPERAND (t, 0);
1263
    }
1259
1264
1260
  switch (TREE_CODE (t))
1265
  switch (TREE_CODE (t))
1261
    {
1266
    {
(-)gcc/testsuite/gcc.dg/uninit-pr40943.c.jj (+10 lines)
Line 0 Link Here
1
/* PR middle-end/40943 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -Wuninitialized" } */
4
5
void
6
foo (void)
7
{
8
  int *p;
9
  *p = 3;	/* { dg-warning "is used uninitialized" } */
10
}

Return to bug 40943