From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22169 invoked by alias); 10 Oct 2012 10:25:35 -0000 Received: (qmail 21999 invoked by uid 55); 10 Oct 2012 10:25:15 -0000 From: "dodji at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/54860] [4.8 Regression]: build fails when configuring libgfortran due to recent "attribute" changes in core gcc Date: Wed, 10 Oct 2012 10:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: build, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dodji at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dodji at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-10/txt/msg00947.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54860 --- Comment #18 from Dodji Seketeli 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