This is the mail archive of the gcc-patches@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]

Fix IMA ICE in get_tmt_for really (PR 16954)


The problem is in the following program (with two TUs):
$ more aa.c
struct x;
foo(struct x* q)
{
    bar(q);
}

 $ more bb.c
struct x { int a; int b; };
bar(struct x* p) {
  printf("%d\n", p->a);
}

gcc bb.c aa.c -O3 -combine -S

we have an ICE because copyrename will rename the SSA_NAME for p in the inline function to
be the same as q in the outer function which is wrong as they have two different aliasing
sets.


This patch prevents this from happening and fixes the ICE.

OK? Bootstrapped and tested on powerpc-apple-darwin with no regressions.

Note I will fix the 80 character formatting before committing.

Thanks,
Andrew Pinski


ChangeLog:


* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Prevent renaming
if the aliasing sets are different.



Attachment: temp.diff.txt
Description: Text document


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