From: Trevor Saunders Date: Fri, 27 Jun 2014 10:53:38 +0000 (+0000) Subject: remove broken and redundant diagnostic in i386_pe_section_type_flags X-Git-Tag: releases/gcc-5.1.0~6615 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f012c1abe0935f4136352b7e5fbb862179be42ed;p=thirdparty%2Fgcc.git remove broken and redundant diagnostic in i386_pe_section_type_flags varasm.c is the only caller of this target hook, and it correctly uses a htab to check if the flags returned by the hook are the same as the flags it has for the section, and emit a error if not. gccc/ * config/i386/winnt.c (i386_pe_section_type_flags): Remove redundant diagnostic machinary. From-SVN: r212069 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2ea692b8bb87..a7096a5cb1d0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-06-27 trevor Saunders + + * config/i386/winnt.c (i386_pe_section_type_flags): Remove + redundant diagnostic machinary. + 2014-06-27 Richard Biener * tree-ssa-math-opts.c (bswap_replace): Fix diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index 56cd1b25711b..8a5d9822b70f 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -469,19 +469,12 @@ i386_pe_reloc_rw_mask (void) unsigned int i386_pe_section_type_flags (tree decl, const char *name, int reloc) { - static hash_table > *htab = NULL; unsigned int flags; - unsigned int **slot; /* Ignore RELOC, if we are allowed to put relocated const data into read-only section. */ if (!flag_writable_rel_rdata) reloc = 0; - /* The names we put in the hashtable will always be the unique - versions given to us by the stringtable, so we can just use - their addresses as the keys. */ - if (!htab) - htab = new hash_table > (31); if (decl && TREE_CODE (decl) == FUNCTION_DECL) flags = SECTION_CODE; @@ -499,19 +492,6 @@ i386_pe_section_type_flags (tree decl, const char *name, int reloc) if (decl && DECL_P (decl) && DECL_ONE_ONLY (decl)) flags |= SECTION_LINKONCE; - /* See if we already have an entry for this section. */ - slot = htab->find_slot ((unsigned int *)name, INSERT); - if (!*slot) - { - *slot = (unsigned int *) xmalloc (sizeof (unsigned int)); - **slot = flags; - } - else - { - if (decl && **slot != flags) - error ("%q+D causes a section type conflict", decl); - } - return flags; }