From patchwork Sun Apr 13 18:27:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Blaikie X-Patchwork-Id: 528 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx23.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 61E58360072 for ; Sun, 13 Apr 2014 11:27:17 -0700 (PDT) Received: by homiemail-mx23.g.dreamhost.com (Postfix, from userid 14314964) id 178C262791D00; Sun, 13 Apr 2014 11:27:16 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx23.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx23.g.dreamhost.com (Postfix) with ESMTPS id 9BB4F627B3C6B for ; Sun, 13 Apr 2014 11:27:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:date:message-id:subject:from:to :content-type; q=dns; s=default; b=Tle08ObxYpZp64JTnW3Tr+//3HS7A pmpQs3sCveiq6eHL+JnJJKg8BnqSRYNfJbndyAYVf1X0GX/NLAj5WwATycMSRWLt KNXPzusvkX7j2RJfJ/b+M7hl1aifDX0uyxug/vDN5NTi8pw4U0jIke6snAMsYtTV wNQpf7S5voj5SQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:date:message-id:subject:from:to :content-type; s=default; bh=rsta70Dypzcfc1DaBTse0Saiem0=; b=nUa LHVnWB/BhNtrdSMfTp3OHxbqxXgzTPlFOBmOL90SLLoFraa7pgVTvAKpMIFU1oI4 AtA91i7wec1yMVVZmp1CQocxdUnQzU0TV6nJfXvCqPEQZnKFjF5EmkJ8IWUk8YsW oDG0K5k1sJuH3OXp5GI9DgJA8vMZLA1jCjIfu+nM= Received: (qmail 16938 invoked by alias); 13 Apr 2014 18:27:13 -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 16913 invoked by uid 89); 13 Apr 2014 18:27:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qa0-f49.google.com Received: from mail-qa0-f49.google.com (HELO mail-qa0-f49.google.com) (209.85.216.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 13 Apr 2014 18:27:09 +0000 Received: by mail-qa0-f49.google.com with SMTP id j7so7145877qaq.8 for ; Sun, 13 Apr 2014 11:27:06 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.224.54.4 with SMTP id o4mr14268883qag.74.1397413626708; Sun, 13 Apr 2014 11:27:06 -0700 (PDT) Received: by 10.140.30.74 with HTTP; Sun, 13 Apr 2014 11:27:06 -0700 (PDT) Date: Sun, 13 Apr 2014 11:27:06 -0700 Message-ID: Subject: [patch] Mark some tests as XFAIL/UNSUPPORTED hidden due to GCC's omission of typedefs in inheritance. From: David Blaikie To: gdb-patches , keiths@redhat.com X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in gdb.cp/impl-this.exp is testing the ability to scope names within a class and includes cases where the base class was specified via a typedef. Due to GCC's PR14819 these tests weren't actually testing this case - GCC produces the same debug info regardless of whether there's a typedef used in the base specifier. Clang correctly produces the typedef debug info for the base type and exposes a variety of failures/limitations in these test cases. The attached patch updates the tests to flag these cases as unsupported under GCC and xfail as appropriate under Clang. commit 7fa92f9a15f440129dd5a989511f3bbda646afa5 Author: David Blaikie Date: Sun Apr 13 11:15:44 2014 -0700 Mark some tests as XFAIL/UNSUPPORTED hidden due to GCC's omission of typedefs in inheritance. gdb/testsuite/ * gdb.cp/impl-this.exp: Mark several tests XFAIL/UNSUPPORTED due to PR16841 and GCC PR60833 diff --git gdb/testsuite/ChangeLog gdb/testsuite/ChangeLog index 730c116..678ee68 100644 --- gdb/testsuite/ChangeLog +++ gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-04-12 David Blaikie + + * gdb.cp/impl-this.exp: Mark several tests XFAIL/UNSUPPORTED due to + PR16841 and GCC PR60833 + 2014-04-12 Siva Chandra Reddy Doug Evans diff --git gdb/testsuite/gdb.cp/impl-this.exp gdb/testsuite/gdb.cp/impl-this.exp index dd1bc64..518b380 100644 --- gdb/testsuite/gdb.cp/impl-this.exp +++ gdb/testsuite/gdb.cp/impl-this.exp @@ -30,13 +30,22 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { with_test_prefix "before run" { gdb_test "print i" "No symbol \"i\" in current context." gdb_test "print D::i" "Cannot reference non-static field \"i\"" - gdb_test "print D::B::i" "Cannot reference non-static field \"i\"" - gdb_test "print B::i" "Cannot reference non-static field \"i\"" gdb_test "print D::C::i" "Cannot reference non-static field \"i\"" gdb_test "print C::i" "Cannot reference non-static field \"i\"" - gdb_test "print D::B::A::i" \ - "Cannot reference non-static field \"i\"" - gdb_test "print B::A::i" "Cannot reference non-static field \"i\"" + if {[test_compiler_info {gcc-*-*}]} { + unsupported "gdb/16841" + } else { + setup_kfail gdb/x *-*-* + gdb_test "print D::B::i" "Cannot reference non-static field \"i\"" + gdb_test "print D::Bint::i" "Cannot reference non-static field \"i\"" + gdb_test "print B::i" "Cannot reference non-static field \"i\"" + setup_kfail gdb/x *-*-* + gdb_test "print D::B::A::i" \ + "Cannot reference non-static field \"i\"" + gdb_test "print D::Bint::A::i" \ + "Cannot reference non-static field \"i\"" + gdb_test "print B::A::i" "Cannot reference non-static field \"i\"" + } gdb_test "print A::i" "Cannot reference non-static field \"i\"" gdb_test "print D::C::A::i" "Cannot reference non-static field \"i\"" gdb_test "print C::A::i" "Cannot reference non-static field \"i\"" @@ -61,18 +70,27 @@ gdb_continue_to_breakpoint "continue to D::f" with_test_prefix "at D::f (valid expressions)" { gdb_test "print i" "= 4" gdb_test "print D::i" "= 4" - gdb_test "print D::B::i" "= 2" - gdb_test "print B::i" "= 2" - gdb_test "print D::Bint::i" \ - "No type \"Bint\" within class or namespace \"D\"." - gdb_test "print Bint::i" "= 2" + if {[test_compiler_info {gcc-*-*}]} { + unsupported "gdb/16841" + } else { + setup_kfail gdb/x *-*-* + gdb_test "print D::B::i" "= 2" + setup_kfail gdb/y *-*-* + gdb_test "print B::i" "= 2" + setup_kfail gdb/y *-*-* + gdb_test "print Bint::i" "= 2" + setup_kfail gdb/y *-*-* + gdb_test "print D::Bint::i" "= 2" + setup_kfail gdb/y *-*-* + gdb_test "print Bint::i" "= 2" + setup_kfail gdb/x *-*-* + gdb_test "print D::B::A::i" "= 1" + gdb_test "print B::A::i" "= 1" + gdb_test "print D::Bint::A::i" "= 1" + gdb_test "print Bint::A::i" "= 1" + } gdb_test "print D::C::i" "= 3" gdb_test "print C::i" "= 3" - gdb_test "print D::B::A::i" "= 1" - gdb_test "print B::A::i" "= 1" - gdb_test "print D::Bint::A::i" \ - "No type \"Bint\" within class or namespace \"D\"." - gdb_test "print Bint::A::i" "= 1" gdb_test "print A::i" "= 1" gdb_test "print D::C::A::i" "= 1" gdb_test "print C::A::i" "= 1" @@ -86,29 +104,40 @@ with_test_prefix "at D::f (valid expressions)" { # Test some invalid expressions with_test_prefix "at D::f (invalid expressions)" { - gdb_test "print D::B::c" "There is no field named c" - gdb_test "print D::B::A::c" "There is no field named c" - gdb_test "print D::Bint::c" \ - "No type \"Bint\" within class or namespace \"D\"." - - gdb_test "print D::Bint::A::c" \ - "No type \"Bint\" within class or namespace \"D\"." - gdb_test "print D::C::A::c" "There is no field named c" - gdb_test "print B::c" "There is no field named c" - gdb_test "print B::A::c" "There is no field named c" - gdb_test "print Bint::c" "There is no field named c" - gdb_test "print Bint::A::c" "There is no field named c" + if {[test_compiler_info {gcc-*-*}]} { + unsupported "gdb/16841" + } else { + setup_kfail gdb/x *-*-* + gdb_test "print D::B::c" "There is no field named c" + setup_kfail gdb/x *-*-* + gdb_test "print D::B::A::c" "There is no field named c" + setup_kfail gdb/x *-*-* + gdb_test "print D::Bint::c" \ + "No type \"Bint\" within class or namespace \"D\"." + setup_kfail gdb/x *-*-* + gdb_test "print D::Bint::A::c" \ + "No type \"Bint\" within class or namespace \"D\"." + gdb_test "print B::c" "There is no field named c" + gdb_test "print B::A::c" "There is no field named c" + gdb_test "print Bint::c" "There is no field named c" + gdb_test "print Bint::A::c" "There is no field named c" + setup_kfail gdb/x *-*-* + gdb_test "print D::B::x" "There is no field named x" + setup_kfail gdb/x *-*-* + gdb_test "print D::B::A::x" "There is no field named x" + setup_kfail gdb/x *-*-* + gdb_test "print D::Bint::x" \ + "No type \"Bint\" within class or namespace \"D\"." + setup_kfail gdb/x *-*-* + gdb_test "print D::Bint::A::x" \ + "No type \"Bint\" within class or namespace \"D\"." + gdb_test "print B::x" "There is no field named x" + gdb_test "print B::A::x" "There is no field named x" + gdb_test "print Bint::x" "There is no field named x" + gdb_test "print Bint::A::x" "There is no field named x" + } gdb_test "print C::A::c" "There is no field named c" - gdb_test "print D::B::x" "There is no field named x" - gdb_test "print D::B::A::x" "There is no field named x" - gdb_test "print D::Bint::x" \ - "No type \"Bint\" within class or namespace \"D\"." - gdb_test "print D::Bint::A::x" \ - "No type \"Bint\" within class or namespace \"D\"." - gdb_test "print B::x" "There is no field named x" - gdb_test "print B::A::x" "There is no field named x" - gdb_test "print Bint::x" "There is no field named x" - gdb_test "print Bint::A::x" "There is no field named x" + gdb_test "print D::C::A::c" "There is no field named c" gdb_test "print D::C::x" "There is no field named x" gdb_test "print C::x" "There is no field named x" gdb_test "print D::C::A::x" "There is no field named x" @@ -117,8 +146,14 @@ with_test_prefix "at D::f (invalid expressions)" { # Test some ambiguous names with_test_prefix "at D::f (ambiguous names)" { - gdb_test "print B::common" " = 200" - gdb_test "print Bint::common" " = 200" + if {[test_compiler_info {gcc-*-*}]} { + unsupported "gdb/16841" + } else { + setup_kfail gdb/x *-*-* + gdb_test "print B::common" " = 200" + setup_kfail gdb/x *-*-* + gdb_test "print Bint::common" " = 200" + } gdb_test "print C::common" " = 300" gdb_test "print am.i" " = 1000" gdb_test "print am.A::i" \