public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* fix -fcompare-debug regression in free_lang_data
@ 2009-10-16  7:46 Alexandre Oliva
  2009-10-16  9:56 ` Richard Guenther
  0 siblings, 1 reply; 15+ messages in thread
From: Alexandre Oliva @ 2009-10-16  7:46 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 752 bytes --]

The free_lang_data pass, called when not emitting debug info, introduces
new alias sets for select data types that hadn't had been assigned an
alias set yet.  This gets alias set numbers out of sync.  I don't know
of any codegen differences that follow from this, but -fcompare-debug
fails because of the different alias set numbers in MEMs.

This patch arranges for free_lang_data() to not depend on whether or not
we're emitting debug information, removing an extraneous reference to
flag_gtoggle while at that.  flag_gtoggle is only to be used when
processing command-line options, and it takes effect by changing the
debug “verbosity” level.  I can't think of any legitimate reason to
check its value elsewhere.

Ok to install?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vta-no-free-lang-data.patch --]
[-- Type: text/x-diff, Size: 860 bytes --]

for  gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* tree.c (gate_free_lang_data): Don't depend on debug info level.

Index: gcc/tree.c
===================================================================
--- gcc/tree.c.orig	2009-10-16 04:09:35.000000000 -0300
+++ gcc/tree.c	2009-10-16 04:12:06.000000000 -0300
@@ -4977,10 +4977,11 @@ free_lang_data (void)
 static bool
 gate_free_lang_data (void)
 {
-  /* FIXME.  Remove after save_debug_info is working.  */
-  return (flag_generate_lto
-	  || (!in_lto_p
-	      && !flag_gtoggle && debug_info_level <= DINFO_LEVEL_TERSE));
+  /* FIXME.  Remove after save_debug_info is working.  Don't depend on
+     debug level, it breaks -fcompare-debug because it changes the
+     numbering of alias sets calling get_alias_set within
+     free_lang_data_in_type().  */
+  return flag_generate_lto;
 }
 
 

[-- Attachment #3: Type: text/plain, Size: 258 bytes --]



-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-11-18  6:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-16  7:46 fix -fcompare-debug regression in free_lang_data Alexandre Oliva
2009-10-16  9:56 ` Richard Guenther
2009-10-17  7:17   ` Alexandre Oliva
2009-10-17 11:24     ` Richard Guenther
2009-11-08  7:27       ` Alexandre Oliva
2009-11-08  9:56         ` Richard Guenther
2009-11-08 10:02           ` Eric Botcazou
2009-11-08 10:17             ` Richard Guenther
2009-11-08 11:20               ` Eric Botcazou
2009-11-16 23:32             ` Alexandre Oliva
2009-11-17  8:17               ` Eric Botcazou
2009-11-17 15:54                 ` Richard Guenther
2009-11-18  8:32           ` Alexandre Oliva
2009-11-09  0:51         ` Alexandre Oliva
2009-11-09 10:17           ` Richard Guenther

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).