From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 59320 invoked by alias); 7 Aug 2017 12:08:46 -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 58187 invoked by uid 89); 7 Aug 2017 12:08:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:static. X-HELO: mail-it0-f68.google.com Received: from mail-it0-f68.google.com (HELO mail-it0-f68.google.com) (209.85.214.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 07 Aug 2017 12:08:40 +0000 Received: by mail-it0-f68.google.com with SMTP id t78so298697ita.1 for ; Mon, 07 Aug 2017 05:08:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=lJoACa5vVAAbSp9VLiUfJR2yMa13sk1YlTAddhPi138=; b=tRGM2qs/O4LxIDZNEkc1+ONzw2vY+1ekes9RWVhdNni+EXCrVPNXzyc11epnMMLmFN 1iTvHw6JxA+PB7yg0d9GBhyTu3bJ5kuQr0gd+KgPrDzlECnDt63hzjddKLaCcZbtHyxG OO4dw+iAkunMgzyVZoY3C82LM/uZmHA7upUm+/9ADKOmVzinEg7D3KyzoGqkd9l398TB z4V/3ZlYaO9XXlpHX+ucA7CcO8/693e0P6fWuhqy79ZU9t0qGClhGqgKueI8IfCi7I35 2zgADizfvHV8P2ImU//qKxmrPARbv8zCPy42erWlrmTGwakUJ0TEG5INUkecvJv5oIO3 gSjw== X-Gm-Message-State: AIVw1137THaQOhRHdtqz/J/yEORPF2cC3cLtC9BhDf/6XrnOVLkyZJN3 MZE/bHDLB9n68z89 X-Received: by 10.36.214.79 with SMTP id o76mr649644itg.62.1502107718491; Mon, 07 Aug 2017 05:08:38 -0700 (PDT) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id s44sm3619924ite.30.2017.08.07.05.08.37 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 07 Aug 2017 05:08:38 -0700 (PDT) From: Yao Qi To: Tim Wiederhake Cc: gdb-patches@sourceware.org, Bernhard Heckel Subject: Re: [PATCH 3/6] Fortran: Ptype, print type extension. References: <1500629040-12972-1-git-send-email-tim.wiederhake@intel.com> <1500629040-12972-4-git-send-email-tim.wiederhake@intel.com> Date: Mon, 07 Aug 2017 12:08:00 -0000 In-Reply-To: <1500629040-12972-4-git-send-email-tim.wiederhake@intel.com> (Tim Wiederhake's message of "Fri, 21 Jul 2017 11:23:57 +0200") Message-ID: <8660dz1sxr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00117.txt.bz2 Tim Wiederhake writes: > +static void > +f_type_print_derivation_info (struct type *type, struct ui_file *stream) > +{ > + /* Fortran doesn't support multiple inheritance. */ > + int i =3D 0; Remove 'i'? > + > + if (TYPE_N_BASECLASSES (type) > 0) > + fprintf_filtered (stream, ", extends(%s) ::", > + type_name_no_tag (TYPE_BASECLASS (type, i))); > +} > + > /* Print the name of the type (or the ultimate pointer target, > function value or array element), or the description of a > structure or union. > diff --git a/gdb/testsuite/gdb.fortran/oop_extend_type.exp b/gdb/testsuit= e/gdb.fortran/oop_extend_type.exp > index a880414..200ce7b 100644 > --- a/gdb/testsuite/gdb.fortran/oop_extend_type.exp > +++ b/gdb/testsuite/gdb.fortran/oop_extend_type.exp > @@ -50,11 +50,23 @@ gdb_test "p wp%point" " =3D \\( coo =3D \\(1, 2, 1\\)= \\)" > gdb_test "p wp" " =3D \\( point =3D \\( coo =3D \\(1, 2, 1\\) \\), angle= =3D 100 \\)" >=20=20 > gdb_test "whatis wp" "type =3D Type waypoint" > -gdb_test "ptype wp" \ > - [multi_line "type =3D Type waypoint" \ > +set output_pass [multi_line "type =3D Type, extends\\(point\\) :: waypoi= nt" \ > " Type point :: point" \ > " $real :: angle" \ > "End Type waypoint"] > +set output_kfail [multi_line "type =3D Type waypoint" \ > + " Type point :: point" \ > + " $real :: angle" \ > + "End Type waypoint"] > +set test "ptype wp" > +gdb_test_multiple $test %test { > + -re "$output_pass\r\n$gdb_prompt $" { > + pass "$test" > + } > + -re "$output_kfail\r\n$gdb_prompt $" { > + kfail "gcc/49475" "$test" s/kfail/xfail/ because it is not an issue in GDB. > + } > +} > set test "ptype wp%coo" > gdb_test_multiple "$test" "$test" { > -re "$real \\(3\\)\r\n$gdb_prompt $" { > @@ -80,11 +92,15 @@ gdb_test "p wp_vla(1)%point" " =3D \\( coo =3D \\(10,= 12, 10\\) \\)" > gdb_test "p wp_vla(1)" " =3D \\( point =3D \\( coo =3D \\(10, 12, 10\\) = \\), angle =3D 101 \\)" >=20=20 > gdb_test "whatis wp_vla" "type =3D Type waypoint \\(3\\)" > -gdb_test "ptype wp_vla" \ > - [multi_line "type =3D Type waypoint" \ > - " Type point :: point" \ > - " $real :: angle" \ > - "End Type waypoint \\(3\\)"] > +set test "ptype wp_vla" > +gdb_test_multiple $test %test { > + -re "$output_pass \\(3\\)\r\n$gdb_prompt $" { > + pass "$test" > + } > + -re "$output_kfail \\(3\\)\r\n$gdb_prompt $" { > + kfail "gcc/49475" "$test" Likewise. > + } > +} Otherwise, patch is good to me. --=20 Yao (=E9=BD=90=E5=B0=A7)