[Bug middle-end/54860] [4.8 Regression]: build fails when configuring libgfortran due to recent "attribute" changes in core gcc

dodji at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 10 10:25:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54860

--- Comment #18 from Dodji Seketeli <dodji at gcc dot gnu.org> 2012-10-10 10:25:13 UTC ---
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



More information about the Gcc-bugs mailing list