From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23457 invoked by alias); 29 Nov 2012 22:09:19 -0000 Received: (qmail 23445 invoked by uid 22791); 29 Nov 2012 22:09:18 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Nov 2012 22:09:12 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 70BB22E2A3; Thu, 29 Nov 2012 17:09:11 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WO9SnrHJ1VY3; Thu, 29 Nov 2012 17:09:11 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 393072E2A1; Thu, 29 Nov 2012 17:09:11 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 1132AC0359; Thu, 29 Nov 2012 23:09:08 +0100 (CET) Date: Thu, 29 Nov 2012 22:09:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: Jan Kratochvil , gdb@sourceware.org Subject: Re: plan: VLA (Variable Length Arrays) and Fortran dynamic types Message-ID: <20121129220907.GN3540@adacore.com> References: <20121129144855.GA16288@host2.jankratochvil.net> <874nk83wok.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874nk83wok.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00100.txt.bz2 > I note that Ada already uses the concretizing approach. > Maybe Joel could share their experiences with this. We have been using this approach out of necessity. There are more elegant ways to do this for sure, but we all know how much effort it would take to implement them (a complete revamp of our type structure, for instance). Aside from that, it is actually pretty tricky to implement right, because it's very easy to lose information. Jerome and myself recently spent at least a day of discussions and experimentation before we figured out the correct way of dealing with Ada interface types. Things also get tricky with respect to EVAL_AVOID_SIDE_EFFECT vs EVAL_NORMAL, because, in avoid-side-effect mode, you don't have the data in order to concretize the type. There is also the problem of freeing the new types, which may be taken care of, but may not be, and I haven't looked at that myself (before my time). Aside from that, it has the merit of existing, and it works pretty well. If I was starting from scratch and I had an infinite amount of time, I'd design a type structure that allows us to express the dynamic characteristics of a given object. -- Joel