public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "amylaar 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 20:00:00 -0000	[thread overview]
Message-ID: <20100708200004.26440.qmail@sourceware.org> (raw)
In-Reply-To: <bug-44832-5394@http.gcc.gnu.org/bugzilla/>



------- Comment #47 from amylaar at gcc dot gnu dot org  2010-07-08 20:00 -------
Created an attachment (id=21150)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21150&action=view)
proposed patch

(In reply to comment #46)
> Could we use a different bit that is currently unused for LABEL_DECLs?
> (With a suitable accessor macro, of course.)

Hmm, actually, there should be no problem with changing TREE_USED of a
LABEL_DECL once lang_hooks.parse_file is done with emitting warnings about
undefined-but-used / used-but-not-defined labels.

The problem is clearing them all at or before the start of
remove_unused_locals. It's be easy to do in one frontend, when we do the
warnings, but requiring all the frontends to do it is messy, and it when
remove_unused_locals is called multiple times that'd not reset the used flag
for labels the used of which have been optimized away in the meantime.

I think the TREE_USED as given from the frontends is probably a good enough
approximation if we also take DECL_IGNORED_P into account.

As it happens, TREE_USED is actually cleared by init_vars_expansion, although,
as stated before, it should be good enough without that.

I'm currently testing the attached patch.

Regarding a testcase for our testsuite, I think that would best be done in the
context of PR other/44874.  Although we should be able to reproducibly get
scrabled DECL_UIDs with the old compiler logic, having this translate into
different ssa name versioning or even generated code is less reliable when
you change bits of the compiler or the compiler host / target.
With a dump option to enumerate declarations / labels in DECL_UID order, the
regression test can verify that order matches.
I think this dump option should be default for -fcompare-debug; in that case,
the testcase should be relatively simple.


-- 


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


  parent reply	other threads:[~2010-07-08 20:00 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 ` amylaar at gcc dot gnu dot org
2010-07-07 13:23 ` jakub 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
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 [this message]
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=20100708200004.26440.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).