diff options
author | Trevor Saunders <tsaunders@mozilla.com> | 2014-06-27 10:53:38 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2014-06-27 10:53:38 +0000 |
commit | f012c1abe0935f4136352b7e5fbb862179be42ed (patch) | |
tree | 1262294ef9fc146fb9a6719764ae04200b2b7012 | |
parent | 3fd269db216915329a3f016e4a7431a82ed564ef (diff) | |
download | gcc-f012c1abe0935f4136352b7e5fbb862179be42ed.zip gcc-f012c1abe0935f4136352b7e5fbb862179be42ed.tar.gz gcc-f012c1abe0935f4136352b7e5fbb862179be42ed.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/winnt.c | 20 |
2 files changed, 5 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2ea692b..a7096a5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-06-27 trevor Saunders <tsaunders@mozilla.com> + + * config/i386/winnt.c (i386_pe_section_type_flags): Remove + redundant diagnostic machinary. + 2014-06-27 Richard Biener <rguenther@suse.de> * tree-ssa-math-opts.c (bswap_replace): Fix diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index 56cd1b2..8a5d982 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<pointer_hash<unsigned int> > *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<pointer_hash<unsigned int> > (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; } |