From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 73A123858D35 for ; Thu, 30 Jul 2020 10:36:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 73A123858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D2377ABE9 for ; Thu, 30 Jul 2020 10:36:27 +0000 (UTC) Date: Thu, 30 Jul 2020 12:36:14 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix gdb.fortran/ptype-on-functions.exp with gcc-4.8 Message-ID: <20200730103612.GA28126@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_NUMSUBJECT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jul 2020 10:36:17 -0000 Hi, When running test-case gdb.fortran/ptype-on-functions.exp with gfortran 4.8.5, we run into: ... (gdb) ptype some_module::get_number^M type = integer(kind=4) (Type __class_some_module_Number)^M (gdb) FAIL: gdb.fortran/ptype-on-functions.exp: ptype some_module::get_number ptype some_module::set_number^M type = void (Type __class_some_module_Number, integer(kind=4))^M (gdb) FAIL: gdb.fortran/ptype-on-functions.exp: ptype some_module::set_number ... The test-case pattern expects a "_t" suffix on "__class_some_module_Number". The difference is caused by a gcc commit 073afca6884 'class.c (gfc_build_class_symbol): Append "_t" to target class names to make the generated type names unique' which has been present since gcc 4.9.0. Fix the pattern by optionally matching the _t suffix. Tested on x86_64-linux, with gfortran 4.8.5 and 7.5.0. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix gdb.fortran/ptype-on-functions.exp with gcc-4.8 gdb/testsuite/ChangeLog: 2020-07-30 Tom de Vries * gdb.fortran/ptype-on-functions.exp: Make "_t" suffix on "__class_some_module_Number_t" optional. --- gdb/testsuite/gdb.fortran/ptype-on-functions.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp index 9d447530c2..93e984af24 100644 --- a/gdb/testsuite/gdb.fortran/ptype-on-functions.exp +++ b/gdb/testsuite/gdb.fortran/ptype-on-functions.exp @@ -30,10 +30,10 @@ if ![fortran_runto_main] then { } gdb_test "ptype some_module::get_number" \ - "type = integer\\(kind=4\\) \\(Type __class_some_module_Number_t\\)" + "type = integer\\(kind=4\\) \\(Type __class_some_module_Number(_t)?\\)" gdb_test "ptype some_module::set_number" \ - "type = void \\(Type __class_some_module_Number_t, integer\\(kind=4\\)\\)" + "type = void \\(Type __class_some_module_Number(_t)?, integer\\(kind=4\\)\\)" gdb_test "ptype is_bigger" \ "type = logical\\(kind=4\\) \\(integer\\(kind=4\\), integer\\(kind=4\\)\\)"