This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13228] New: Aliasing problem with IMI with structs
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Nov 2003 04:17:33 -0000
- Subject: [Bug c/13228] New: Aliasing problem with IMI with structs
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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