[Bug tree-optimization/42157] [4.5 regression] ICE building stage 1 libgcc: SEGV in compare_access_positions
--- Comment #16 from ro at CeBiTec dot Uni-Bielefeld dot DE 2010-01-11 19:05 --- Subject: Re: [4.5 regression] ICE building stage 1 libgcc: SEGV in compare_access_positions > --- Comment #13 from ro at CeBiTec dot Uni-Bielefeld dot DE 2010-01-06 > 11:55 --- [...] > I'm now running a C-only bootstrap with that patch on mips-sgi-irix5.3. > Your previous patch allowed a full bootstrap to finish without a > replacement qsort in libiberty. That bootstrap finally completed, so the bug is definitely gone on IRIX 5.3, too. Thanks. Rainer -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42157
[Bug tree-optimization/42157] [4.5 regression] ICE building stage 1 libgcc: SEGV in compare_access_positions
--- Comment #15 from jamborm at gcc dot gnu dot org 2010-01-07 10:47 --- The patch that I finally committed is also slightly different but should avoid this problem too. -- jamborm at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42157
[Bug tree-optimization/42157] [4.5 regression] ICE building stage 1 libgcc: SEGV in compare_access_positions
--- Comment #14 from jamborm at gcc dot gnu dot org 2010-01-07 10:38 --- Subject: Bug 42157 Author: jamborm Date: Thu Jan 7 10:38:25 2010 New Revision: 155689 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155689 Log: 2010-01-07 Martin Jambor PR tree-optimization/42157 * tree-sra.c (compare_access_positions): Stabilize sort if both accesses have integer types, return zero immediately if they are the same. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-sra.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42157
[Bug tree-optimization/42157] [4.5 regression] ICE building stage 1 libgcc: SEGV in compare_access_positions
--- Comment #13 from ro at CeBiTec dot Uni-Bielefeld dot DE 2010-01-06 11:55 --- Subject: Re: [4.5 regression] ICE building stage 1 libgcc: SEGV in compare_access_positions > --- Comment #12 from jamborm at gcc dot gnu dot org 2010-01-05 18:46 > --- > I posted a slightly simpler patch to the mailing list: > http://gcc.gnu.org/ml/gcc-patches/2010-01/msg00229.html I'm now running a C-only bootstrap with that patch on mips-sgi-irix5.3. Your previous patch allowed a full bootstrap to finish without a replacement qsort in libiberty. Rainer -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42157
[Bug tree-optimization/42157] [4.5 regression] ICE building stage 1 libgcc: SEGV in compare_access_positions
--- Comment #12 from jamborm at gcc dot gnu dot org 2010-01-05 18:46 --- I posted a slightly simpler patch to the mailing list: http://gcc.gnu.org/ml/gcc-patches/2010-01/msg00229.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42157
[Bug tree-optimization/42157] [4.5 regression] ICE building stage 1 libgcc: SEGV in compare_access_positions
--- Comment #11 from ebotcazou at gcc dot gnu dot org 2009-12-29 15:56 --- > So given the above, I still think the patch from comment 7 will help. > Because I don't have any access to a non-Linux platform I cannot try > it myself and thus can only rely on others to test it for me. I'll be > more than happy to cooperate further once someone does that. Thanks. Sorry for the delay. Yes, the aforementioned patch is sufficient on Solaris 8. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42157
[Bug tree-optimization/42157] [4.5 regression] ICE building stage 1 libgcc: SEGV in compare_access_positions
--- Comment #10 from jamborm at gcc dot gnu dot org 2009-12-21 15:35 --- So given the above, I still think the patch from comment 7 will help. Because I don't have any access to a non-Linux platform I cannot try it myself and thus can only rely on others to test it for me. I'll be more than happy to cooperate further once someone does that. Thanks. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42157
[Bug tree-optimization/42157] [4.5 regression] ICE building stage 1 libgcc: SEGV in compare_access_positions
--- Comment #9 from jamborm at gcc dot gnu dot org 2009-12-16 20:58 --- I'm now officially on vacation so I did not double check but... (In reply to comment #8) > I think > >/* Put the integral type with the bigger precision first. */ >else if (INTEGRAL_TYPE_P (f1->type) >&& INTEGRAL_TYPE_P (f2->type) >&& TYPE_PRECISION (f1->type) != TYPE_PRECISION (f2->type)) > return TYPE_PRECISION (f1->type) > TYPE_PRECISION (f2->type) ? -1 : > 1; > > makes more sense. But still if both types are equal we still do not stabilize > the sort. > > Note > > /* Put any integral type with non-full precision last. */ > else if (INTEGRAL_TYPE_P (f1->type) >&& (TREE_INT_CST_LOW (TYPE_SIZE (f1->type)) >!= TYPE_PRECISION (f1->type))) > return 1; > else if (INTEGRAL_TYPE_P (f2->type) >&& (TREE_INT_CST_LOW (TYPE_SIZE (f2->type)) >!= TYPE_PRECISION (f2->type))) > return -1; > > isn't stable either. In fact - can't we have two exactly the same > accesses in the array? > Of course we can have multiple accesses that are exactly the same. The important thing is that we return zero for them. In fact we sometimes may not care which of two different accesses goes first and we have to return zero for such pairs too. As far as I can remember, we already do that for non-integer types (because there is a subtraction of type UIDS just below the snippet you pasted above and the branches you did paste do not trigger if both types are integers because that is handled by a branch earlier which causes the problems... and if only one of them is integer then we return 1 for one ordering and -1 for the other, just as expected). IIRC, we don't stabilize the sort only if both types are integers because the type UID subtraction is missing and my patch ads that, nothing more. Internet access is expensive here so I types this in a bit of a ruch but I hope it is understandable. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42157
[Bug tree-optimization/42157] [4.5 regression] ICE building stage 1 libgcc: SEGV in compare_access_positions
-- rguenth at gcc dot gnu dot org changed: What|Removed |Added Component|bootstrap |tree-optimization GCC host triplet||mips-sgi-irix5.3, sparc-sun- ||solaris2.8 Keywords||build Priority|P3 |P1 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42157