This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r192301 - in /trunk/gcc: ChangeLog attribs.c
- From: dodji at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Wed, 10 Oct 2012 10:25:05 -0000
- Subject: r192301 - in /trunk/gcc: ChangeLog attribs.c
Author: dodji
Date: Wed Oct 10 10:25:03 2012
New Revision: 192301
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192301
Log:
PR middle-end/54860 - Make sure attributes hash table is created
On targets cris-elf, alpha and sparc (for instance) it can happen that
the attribute_tables variable is empty for fortran. Thus
register_scoped_attributes (called by init_attributes) won't call
register_scoped_attributes, so the hash table member of
scoped_attributes is not created.
Later when we try to e.g, lookup an attribute by calling
lookup_scoped_attribute_spec, that NULL member hash table comes to
byte us as htab_find_with_hash crashes.
This patch fixes this by ensuring in register_scoped_attributes that
the hash table is created.
Tested on cris-elf, x86_64-unknown-linux-gnu against trunk and some
commenters on the bug bootstrapped it on alpha and sparc.
gcc/
* attribs.c (register_scoped_attributes): Ensure the attribute
hash table is created.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/attribs.c