This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/13228] New: Aliasing problem with IMI with structs


Even though this sample testcase does not show the problem in the asm (at least on powerpc-
apple-darwin), when debuging a much larger problem (like --enable-intermodule or vpr in SPEC) I 
noticed an aliasing problem.
You can see that there is an aliasing problem by breaking on get_alias_set and having gdb display 
debug_tree(t) and watch to see if you have a type and one called "h" and see that you get one and 
then another (but in reallity they are the same type) and also the aliasing sets are set two different 
values (for this case 3 and 6).  What should happen is that the aliasing set should be the same.
test.i:
struct h
{
  int i;
};
void g(struct h *j1)
{
  j1->i = 1;
}
test1.i:
struct h
{
  int i;
};
void g(struct h*);
int f(struct h *j)
{
  g(j);
  return j->i;
}

-- 
           Summary: Aliasing problem with IMI with structs
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]