From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31472 invoked by alias); 7 Nov 2010 16:30:45 -0000 Received: (qmail 31446 invoked by uid 22791); 7 Nov 2010 16:30:44 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.208.78.105) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 07 Nov 2010 16:30:31 +0000 Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.4/8.14.4) with ESMTP id oA7GUT11040245; Sun, 7 Nov 2010 08:30:29 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.4/8.14.4/Submit) id oA7GUTD4040244; Sun, 7 Nov 2010 08:30:29 -0800 (PST) (envelope-from sgk) Date: Sun, 07 Nov 2010 16:30:00 -0000 From: Steve Kargl To: Janus Weil Cc: Tobias Burnus , Dominique Dhumieres , fortran , gcc-patches , tkoenig Subject: Re: [Patch, Fortran, OOP] PR 46313: OOP-ABI issue, ALLOCATE issue, CLASS renaming issue Message-ID: <20101107163028.GA40202@troutmask.apl.washington.edu> References: <20101106233415.7DA533BE18@mailhost.lps.ens.fr> <4CD65B85.8030903@net-b.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org X-SW-Source: 2010-11/txt/msg00124.txt.bz2 On Sun, Nov 07, 2010 at 01:04:05PM +0100, Janus Weil wrote: > >> Yes, that is expected, because the patch changes the name of the vtab > >> to "vtab$main$dt", so one needs to change the name of the subroutine > >> in the test case in the same way in order to see the failure: > > > > Dot? vtab.main.dt? > > Yes, we once had this variant. I think the reason why I switched to > dollars was that it made the dumps easier to read (think > "vtab.main.dt..extends..size" etc). > > The best option I can currently see is to use leading underscores (as > in "_vtab_main_dt"). This is forbidden in Fortran (cf. F08:R303), but > accepted by the assembler (cf. > http://sourceware.org/binutils/docs-2.20/as/Symbol-Names.html#Symbol-Names). > > Attached is a patch which does this change. I also added a few macros > in gfortran.h. Ok for trunk after successful regtest? > A leading underscore moves the issue from -fdollar-ok to -fleading_underscore. IIRC, -fdollar-ok was introduced to gfortran for compatibility with g77, which allows legacy code to compile. None of the OOP features should appear in legacy code, so just throw an error if -fdollar-ok is used when an OO feature is in the code. -- Steve