diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-25 12:31:29 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-25 12:31:29 +0000 |
commit | 0bab3365ab64388aec5a25060aa40f6022d2db47 (patch) | |
tree | 88c621c773a19487886fc4758388f68856812312 /gcc/tree-ssa-structalias.c | |
parent | f0741be49ab8138a5448c6bbe293357ae6a3b854 (diff) | |
download | gcc-0bab3365ab64388aec5a25060aa40f6022d2db47.tar.gz |
2008-06-25 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r137105
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@137106 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 338e190d4c8..052903da76b 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -3999,14 +3999,20 @@ fieldoff_compare (const void *pa, const void *pb) { 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. */ |