2008-06-25 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (fieldoff_compare): Make sure to
not overflow the result type.
* gcc.c-torture/compile/
20080625-1.c: New testcase.
From-SVN: r137104
+2008-06-25 Richard Guenther <rguenther@suse.de>
+
+ * tree-ssa-structalias.c (fieldoff_compare): Make sure to
+ not overflow the result type.
+
2008-06-25 Richard Guenther <rguenther@suse.de>
* tree-vn.c (vn_add): Handle TRUTH_*_EXPR.
+2008-06-25 Richard Guenther <rguenther@suse.de>
+
+ * gcc.c-torture/compile/20080625-1.c: New testcase.
+
2008-06-25 Richard Guenther <rguenther@suse.de>
* g++.dg/torture/20080625-1.C: New testcase.
--- /dev/null
+struct peakbufStruct {
+ unsigned int lnum [5000];
+ int lscan [5000][4000];
+ double lmz [5000][4000];
+ double lint [5000][4000];
+ int PeaksInBuf;
+ unsigned char freelists [350000];
+ unsigned char freelistl [5000];
+ unsigned int LastFreeL;
+} peakbuf;
+void foo(int);
+void findmzROI(int i, int *p_scan)
+{
+ foo(peakbuf.PeaksInBuf);
+ __builtin_memmove(p_scan, peakbuf.lscan[i], peakbuf.lnum[i]*sizeof(int));
+}
{
const fieldoff_s *foa = (const fieldoff_s *)pa;
const fieldoff_s *fob = (const fieldoff_s *)pb;
- HOST_WIDE_INT foasize, fobsize;
+ unsigned HOST_WIDE_INT foasize, fobsize;
- if (foa->offset != fob->offset)
- return foa->offset - fob->offset;
+ if (foa->offset < fob->offset)
+ return -1;
+ else if (foa->offset > fob->offset)
+ return 1;
foasize = TREE_INT_CST_LOW (foa->size);
fobsize = TREE_INT_CST_LOW (fob->size);
- return foasize - fobsize;
+ if (foasize < fobsize)
+ return - 1;
+ else if (foasize > fobsize)
+ return 1;
+ return 0;
}
/* Sort a fieldstack according to the field offset and sizes. */