[Bug tree-optimization/26429] New: Call clobbering cannot tell different stack locals with same type apart

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Feb 22 21:08:00 GMT 2006


For

typedef struct {
  int i;
  int j;
  int k;
} Foo;

void bar(Foo*);
void foo(void)
{
  {
    Foo a;
    bar(&a);
  }
  {
    Foo b;
    bar(&b);
  }
}

we have in the alias1 dump:

foo ()
{
  struct Foo b;
  struct Foo a;

<bb 2>:
  #   a_3 = V_MAY_DEF <a_1>;
  #   b_4 = V_MAY_DEF <b_2>;
  bar (&a);
  #   a_5 = V_MAY_DEF <a_3>;
  #   b_6 = V_MAY_DEF <b_4>;
  bar (&b);
  return;

}

The testcase is actually modeled after what the fortran frontend produces
for I/O operations, it adds one instance of Foo per I/O call, and the clobbers
keep building up.  Now consider having SFTs for the _huge_ fortran st_parm
structure...


-- 
           Summary: Call clobbering cannot tell different stack locals with
                    same type apart
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: missed-optimization, memory-hog, compile-time-hog, alias
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list