From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6931 invoked by alias); 8 Jan 2015 14:15:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6922 invoked by uid 89); 8 Jan 2015 14:15:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT autolearn=no version=3.3.2 X-HELO: mailhost.u-strasbg.fr Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.222.218) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Jan 2015 14:15:49 +0000 Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antispam (Postfix) with ESMTP id 09BE6221DE0; Thu, 8 Jan 2015 15:15:47 +0100 (CET) Received: from mailhost.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id EDDBC221E94; Thu, 8 Jan 2015 15:15:46 +0100 (CET) Received: from lmr.u-strasbg.fr (lmr1.u-strasbg.fr [172.30.21.1]) by mr8.u-strasbg.fr (Postfix) with ESMTP id B709D221DE0; Thu, 8 Jan 2015 15:15:43 +0100 (CET) Received: from lmr.u-strasbg.fr (localhost [127.0.0.1]) by antivirus (Postfix) with ESMTP id 7ABF4BD; Thu, 8 Jan 2015 15:15:43 +0100 (CET) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (Authenticated sender: mullerp) by lmr1.u-strasbg.fr (Postfix) with ESMTPSA id 0C828E5; Thu, 8 Jan 2015 15:15:39 +0100 (CET) From: "Pierre Muller" To: "'Pedro Alves'" , "'gdb-patches'" Cc: References: <54ae4586.01e3440a.7b06.fffff844SMTPIN_ADDED_BROKEN@mx.google.com> <54AE605A.8050308@redhat.com> <54ae7f9f.c323460a.36ed.ffffff30SMTPIN_ADDED_BROKEN@mx.google.com> <54AE8914.4010507@redhat.com> In-Reply-To: <54AE8914.4010507@redhat.com> Subject: gdb-patches RFA: Fix pascal behavior for class fields Date: Thu, 08 Jan 2015 14:15:00 -0000 Message-ID: <000701d02b4d$966015e0$c32041a0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-SW-Source: 2015-01/txt/msg00192.txt.bz2 For gpc mailing list: this email comes as a follow-up of this bug report https://sourceware.org/bugzilla/show_bug.cgi?id=17815 The start of the thread can be found at: https://sourceware.org/ml/gdb-patches/2015-01/msg00164.html Pedro asked: > >> How about adding this to the test suite? > > > > > > The whole testsuite/gdb.pascal is almost empty, > > I never invested time to develop it :( > > > > At the time I started it, GPC (the GNU pascal compiler) > > was still active, but development apparently > > stopped since quite some time. > > > > I am unable to install GPC, which means that I cannot test it. > > Would a testsuite that supports only Free Pascal be acceptable? > > Do you actually mean, whether it's ok for a new > test (not test suite) to go in untested on GPC? It certainly is. > Better test on FPC than nowhere. :-) That is indeed what I meant. > AFAICS, the tests themselves don't really care which compiler > is in use other than for marking xfails; you just call > gdb_compile_pascal, > and that works with either. That's my impression from quickly > skimming testsuite/lib/pascal.exp. The problem is that GPC and Free Pascal support several pascal 'dialects'. But this requires command line options. The -Mobjfpc option is required for Free Pascal compiler to understand class type definition, but is rejected in default mode. I expect GNU GPC to also reject class in 'normal' mode... Maybe someone on the gpc mailing list knows if classes are supported by GPC and if it requires a special compiler option. Pierre Muller FYI: Here is the example code that is included in the bug report. $ cat ~/pas/test/test-class-pascal.pas type TA = class public x, y : integer; constructor Create; function check(b : TA) : boolean; destructor Done; virtual; end; constructor TA.Create; begin x:=-1; y:=-1; end; destructor TA.Done; begin end; function TA.check (b : TA) : boolean; begin check:=(x < b.x); end; var a, b : TA; begin a:=TA.Create; b:=TA.Create; a.x := 67; a.y := 33; a.check (b); end.