------- Comment #6 from rguenth at gcc dot gnu dot org  2007-08-22 20:37 -------
Looks ok on current trunk - after einline:



setparam ()
{
  char * * D.2024;
  char * D.2025;
  char * * ap;
  struct shparam * shellparam.0;

<bb 2>:
  shellparam.0_1 = &shellparam;
  ap_2 ={v} shellparam.0_1->p;
  goto <bb 4>;

<bb 3>:
  D.2024_3 ={v} shellparam.0_1->p;
  free (D.2024_3);
  ap_4 = ap_5 + 8;

<bb 4>:
  # ap_5 = PHI <ap_2(2), ap_4(3)>
  D.2025_6 = *ap_5;
  if (D.2025_6 != 0B)
    goto <bb 3>;
  else
    goto <bb 5>;

<bb 5>:
  return;

}

and even final_cleanup has

setparam ()
{
  char * * D.2024;
  char * * ap;

<bb 2>:
  ap ={v} shellparam.p;
  if (*ap != 0B)
    goto <bb 3>;
  else
    goto <bb 4>;

<bb 3>:
  D.2024 ={v} shellparam.p;
  free (D.2024);
  ap = ap + 8;
  if (MEM[base: ap] != 0B)
    goto <bb 3>;
  else
    goto <bb 4>;

<bb 4>:
  return;

}

I suppose

2007-07-13  Richard Guenther  <[EMAIL PROTECTED]>

        PR tree-optimization/32721
        * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Preserve
        TREE_THIS_VOLATILE on the folded reference.
        * tree-ssa-operands.c (get_expr_operands): Set has_volatile_ops
        if the array reference has TREE_THIS_VOLATILE set.

fixed this for real.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |32721
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32032

Reply via email to