From patchwork Sat Jul 24 13:52:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 59855 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 509EEB6F0E for ; Sat, 24 Jul 2010 23:52:57 +1000 (EST) Received: (qmail 31205 invoked by alias); 24 Jul 2010 13:52:55 -0000 Received: (qmail 31196 invoked by uid 22791); 24 Jul 2010 13:52:54 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, TW_IB X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 24 Jul 2010 13:52:48 +0000 Received: by wwb22 with SMTP id 22so4531864wwb.8 for ; Sat, 24 Jul 2010 06:52:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.148.7 with SMTP id n7mr4900270wbv.9.1279979563330; Sat, 24 Jul 2010 06:52:43 -0700 (PDT) Received: by 10.216.80.199 with HTTP; Sat, 24 Jul 2010 06:52:43 -0700 (PDT) In-Reply-To: <20100724115445.9y19n1n1q8s84wss@imap.suse.de> References: <4C3E4D3C.1030205@redhat.com> <4C44AA95.9000505@redhat.com> <4C45CBEC.7020400@redhat.com> <4C47212E.70005@redhat.com> <4C474CB6.9080303@redhat.com> <20100722023203.GA19394@bromo.med.uc.edu> <4C4A21A3.2010504@redhat.com> <20100724115445.9y19n1n1q8s84wss@imap.suse.de> Date: Sat, 24 Jul 2010 15:52:43 +0200 Message-ID: Subject: Re: [RFA, Fortran, try 11] Emulated tls rewrite From: Richard Guenther To: Jan Hubicka Cc: Richard Henderson , Jack Howarth , IainS , GCC Patches , Jakub Jelinek , jh@suse.cz X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Sat, Jul 24, 2010 at 11:54 AM, Jan Hubicka wrote: > Am Sat 24 Jul 2010 01:11:31 AM CEST schrieb Richard Henderson > : > >> On 07/21/2010 07:32 PM, Jack Howarth wrote: >>> >>> FAIL: gfortran.dg/gomp/appendix-a/a.22.6.f90  -O  (test for excess >>> errors) >>> Excess errors: >>> .../testsuite/gfortran.dg/gomp/appendix-a/a.22.6.f90:4:0: sorry, >>>  unimplemented: thread-local COMMON data not implemented >> >> I managed to reproduce this problem reliably.  It has to do with the >> Fortran >> front end (indirectly) invoking varpool_finalize_decl much later than the >> C >> front ends do.  Without the decls being finalized, the IPA pass doesn't >> get >> to see them and they don't get lowered. >> >> I talked to Richi about this ordering problem on IRC, and changing the >> generic ordering of decls vs compilation unit finalization appears to run >> into problems with C++ and Java and their aliases.  An acceptable solution >> appears to be to hack the Fortran front end to do it by hand. > > Hmm, I wanted to get decl finalization out of wrapup_global_decls for a > while but never got around it.  What are those problems with aliases? Apply (basically move it after /* Generate hidden aliases for Java. */) and enjoy libjava exploding. Richard. > Honza > > Index: decl2.c =================================================================== --- decl2.c (revision 162499) +++ decl2.c (working copy) @@ -3921,8 +3921,6 @@ cp_write_global_declarations (void) /* Collect candidates for Java hidden aliases. */ candidates = collect_candidates_for_java_method_aliases (); - cgraph_finalize_compilation_unit (); - /* Now, issue warnings about static, but not defined, functions, etc., and emit debugging information. */ walk_namespaces (wrapup_globals_for_namespace, /*data=*/&reconsider); @@ -3968,6 +3966,8 @@ cp_write_global_declarations (void) #ifdef ENABLE_CHECKING validate_conversion_obstack (); #endif /* ENABLE_CHECKING */ + + cgraph_finalize_compilation_unit (); } /* FN is an OFFSET_REF, DOTSTAR_EXPR or MEMBER_REF indicating the