OSDN Git Service

* unwind-dw2-fde.c (fde_unencoded_compare): Derefer pc_begin
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 22 Oct 2001 20:33:13 +0000 (20:33 +0000)
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 22 Oct 2001 20:33:13 +0000 (20:33 +0000)
fields when comparing.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46414 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/unwind-dw2-fde.c

index 377c0a0..362d8ca 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-22  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * unwind-dw2-fde.c (fde_unencoded_compare): Derefer pc_begin
+       fields when comparing.
+
 2001-10-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * arm.h (HOST_INT, HOST_UINT): Delete.  Remove all uses.
index 729adbb..7052685 100644 (file)
@@ -297,9 +297,12 @@ static int
 fde_unencoded_compare (struct object *ob __attribute__((unused)),
                       fde *x, fde *y)
 {
-  if (x->pc_begin > y->pc_begin)
+  _Unwind_Ptr x_ptr = *(_Unwind_Ptr *) x->pc_begin;
+  _Unwind_Ptr y_ptr = *(_Unwind_Ptr *) y->pc_begin;
+
+  if (x_ptr > y_ptr)
     return 1;
-  if (x->pc_begin < y->pc_begin)
+  if (x_ptr < y_ptr)
     return -1;
   return 0;
 }