public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/44832] [4.6 Regression] -fcompare-debug failure for C++ i386.c
Date: Thu, 08 Jul 2010 11:45:00 -0000	[thread overview]
Message-ID: <20100708114516.32001.qmail@sourceware.org> (raw)
In-Reply-To: <bug-44832-5394@http.gcc.gnu.org/bugzilla/>



------- Comment #38 from rguenth at gcc dot gnu dot org  2010-07-08 11:45 -------

Index: gcc/tree-vrp.c
===================================================================
--- gcc/tree-vrp.c      (revision 161949)
+++ gcc/tree-vrp.c      (working copy)
@@ -4534,12 +4538,11 @@ compare_case_labels (const void *p1, con
 {
   const_tree const case1 = *(const_tree const*)p1;
   const_tree const case2 = *(const_tree const*)p2;
-  unsigned int uid1 = DECL_UID (CASE_LABEL (case1));
-  unsigned int uid2 = DECL_UID (CASE_LABEL (case2));
+  unsigned int uid1 = LABEL_DECL_UID (CASE_LABEL (case1));
+  unsigned int uid2 = LABEL_DECL_UID (CASE_LABEL (case2));

-  if (uid1 < uid2)
-    return -1;
-  else if (uid1 == uid2)
+  if (uid1 == uid2
+      || uid1 == -1u || uid2 == -1u)
     {
       /* Make sure the default label is first in a group.  */
       if (!CASE_LOW (case1))
@@ -4549,8 +4552,7 @@ compare_case_labels (const void *p1, con
       else
         return tree_int_cst_compare (CASE_LOW (case1), CASE_LOW (case2));
     }
-  else
-    return 1;
+  return uid1 < uid2 ? -1 : 1;
 }

fixes the testcase.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44832


  parent reply	other threads:[~2010-07-08 11:45 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-06  4:39 [Bug bootstrap/44832] New: --enable-build-with-cxx Bootstrap comparison failure amylaar at gcc dot gnu dot org
2010-07-06  5:25 ` [Bug bootstrap/44832] " amylaar at gcc dot gnu dot org
2010-07-06 10:23 ` rguenth at gcc dot gnu dot org
2010-07-06 13:18 ` amylaar at gcc dot gnu dot org
2010-07-06 14:09 ` [Bug debug/44832] [4.6 Regression] -fcompare-debug failure for C++ i386.c rguenth at gcc dot gnu dot org
2010-07-06 14:43 ` amylaar at gcc dot gnu dot org
2010-07-06 14:51 ` amylaar at gcc dot gnu dot org
2010-07-06 15:03 ` amylaar at gcc dot gnu dot org
2010-07-06 18:21 ` amylaar at gcc dot gnu dot org
2010-07-07  1:42 ` amylaar at gcc dot gnu dot org
2010-07-07  2:00 ` amylaar at gcc dot gnu dot org
2010-07-07  2:16 ` amylaar at gcc dot gnu dot org
2010-07-07  8:38 ` rguenther at suse dot de
2010-07-07 13:16 ` amylaar at gcc dot gnu dot org
2010-07-07 13:23 ` jakub at gcc dot gnu dot org
2010-07-07 13:23 ` amylaar at gcc dot gnu dot org
2010-07-07 13:25 ` rguenther at suse dot de
2010-07-07 13:49 ` amylaar at gcc dot gnu dot org
2010-07-07 13:55 ` jakub at gcc dot gnu dot org
2010-07-07 13:57 ` rguenth at gcc dot gnu dot org
2010-07-07 14:00 ` amylaar at gcc dot gnu dot org
2010-07-07 14:02 ` amylaar at gcc dot gnu dot org
2010-07-07 14:07 ` amylaar at gcc dot gnu dot org
2010-07-07 14:25 ` jakub at gcc dot gnu dot org
2010-07-07 14:35 ` rguenth at gcc dot gnu dot org
2010-07-07 14:48 ` amylaar at gcc dot gnu dot org
2010-07-07 14:48 ` rguenth at gcc dot gnu dot org
2010-07-07 14:57 ` amylaar at gcc dot gnu dot org
2010-07-07 15:00 ` rguenth at gcc dot gnu dot org
2010-07-07 15:06 ` amylaar at gcc dot gnu dot org
2010-07-07 17:28 ` amylaar at gcc dot gnu dot org
2010-07-07 17:51 ` amylaar at gcc dot gnu dot org
2010-07-07 19:53 ` amylaar at gcc dot gnu dot org
2010-07-08  1:00 ` amylaar at gcc dot gnu dot org
2010-07-08  1:11 ` amylaar at gcc dot gnu dot org
2010-07-08  8:46 ` rguenther at suse dot de
2010-07-08 11:04 ` amylaar at gcc dot gnu dot org
2010-07-08 11:32 ` rguenther at suse dot de
2010-07-08 11:45 ` rguenth at gcc dot gnu dot org [this message]
2010-07-08 11:49 ` rguenth at gcc dot gnu dot org
2010-07-08 11:53 ` rguenth at gcc dot gnu dot org
2010-07-08 12:01 ` amylaar at gcc dot gnu dot org
2010-07-08 12:08 ` amylaar at gcc dot gnu dot org
2010-07-08 12:33 ` rguenth at gcc dot gnu dot org
2010-07-08 15:54 ` amylaar at gcc dot gnu dot org
2010-07-08 16:05 ` rguenther at suse dot de
2010-07-08 17:21 ` amylaar at gcc dot gnu dot org
2010-07-08 20:00 ` amylaar at gcc dot gnu dot org
2010-07-09  3:38 ` amylaar at gcc dot gnu dot org
2010-07-09 10:02 ` amylaar at gcc dot gnu dot org
2010-07-09 11:38 ` amylaar at gcc dot gnu dot org
2010-07-09 11:48 ` rguenth at gcc dot gnu dot org
2010-07-09 15:07 ` amylaar at gcc dot gnu dot org
2010-07-10  4:44 ` amylaar at gcc dot gnu dot org
2010-07-10  9:41 ` amylaar at gcc dot gnu dot org
2010-07-12  8:06 ` rguenth at gcc dot gnu dot org
2010-07-13 21:56 ` amylaar at gcc dot gnu dot org
     [not found] <bug-44832-4@http.gcc.gnu.org/bugzilla/>
2010-10-13 20:26 ` aoliva at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100708114516.32001.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).