From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12633 invoked by alias); 26 Mar 2010 11:03:58 -0000 Received: (qmail 12581 invoked by uid 48); 26 Mar 2010 11:03:41 -0000 Date: Fri, 26 Mar 2010 11:03:00 -0000 Message-ID: <20100326110341.12580.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug debug/43516] [4.5 Regression] "-fcompare-debug failure" at -O2 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg02647.txt.bz2 ------- Comment #11 from jakub at gcc dot gnu dot org 2010-03-26 11:03 ------- Ah, apparently the type returned by c_common_signed_type -> ... -> build_nonstandard_integer_type is not referenced from anywhere anymore during FRE, except from static GTY ((if_marked ("type_hash_marked_p"), param_is (struct type_hash))) htab_t type_hash_table; With -g0 at the end of FRE ggc_collect actually performs GC, while with -g it doesn't at this point (different amount of memory allocated, ...). As that signed 1 bit type isn't marked, it is removed from the hash table and therefore during PRE when get_alias_set is called again on the unsigned 1 bit type, this signed 1 bit type isn't found anymore and thus build_nonstandard_integer_type returns a fresh new type. BTW, even if GC didn't happen, type_hash_marked_p returns return ggc_marked_p (type) || TYPE_SYMTAB_POINTER (type); where TYPE_SYMTAB_POINTER depends on -g vs. -g0. I think there can't be too many non-standard integer types, so perhaps just build_nonstandard_type should make sure whatever it once returns isn't garbage collected. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43516