From patchwork Thu Sep 24 00:21:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandra Loosemore X-Patchwork-Id: 8835 Received: (qmail 80966 invoked by alias); 24 Sep 2015 00:22:40 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 80954 invoked by uid 89); 24 Sep 2015 00:22:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 24 Sep 2015 00:22:38 +0000 Received: from svr-orw-fem-05.mgc.mentorg.com ([147.34.97.43]) by relay1.mentorg.com with esmtp id 1ZeuJ1-0006Ne-FQ from Sandra_Loosemore@mentor.com for gdb-patches@sourceware.org; Wed, 23 Sep 2015 17:22:35 -0700 Received: from [IPv6:::1] (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.3.224.2; Wed, 23 Sep 2015 17:22:34 -0700 Message-ID: <56034217.40408@codesourcery.com> Date: Wed, 23 Sep 2015 18:21:43 -0600 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: gdb-patches Subject: [testsuite, committed] Allow any size enum in gdb.cp/var-tag.exp I found that the C++ enum tests that allow a base type specifier in gdb.cp/var-tag.log were failing on arm-none-eabi. The problem was that the regexp it was matching against only allowed for int type, while the C++ standard allows the representation to be any integer type that is big enough to hold all the values of the enumeration. On ARM the AAPCS allows the use of types smaller than an int, and GCC defaults to -fshort-enums on arm-none-eabi. I've checked in this tweak to the regexp as an obvious fix, after verifying that it PASSes both on arm-none-eabi and a target where it already used to work (nios2-linux-gnu). -Sandra diff --git a/gdb/testsuite/gdb.cp/var-tag.exp b/gdb/testsuite/gdb.cp/var-tag.exp index 71d9237..6dc198c 100644 --- a/gdb/testsuite/gdb.cp/var-tag.exp +++ b/gdb/testsuite/gdb.cp/var-tag.exp @@ -30,7 +30,7 @@ proc do_global_tests {lang} { set invalid_print "Attempt to use a type name as an expression" if {$lang == "c++"} { - set opt_underlying "(: unsigned int )?" + set opt_underlying "(: unsigned (int|short|char) )?" } else { set opt_underlying "" }