From patchwork Fri Nov 3 20:42:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 834088 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-465921-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="LUGzyd/f"; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 3yTDQr1hYNz9s4s for ; Sat, 4 Nov 2017 07:42:10 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=tFbkdXi3+EqjOdkDgBxW2FFAPGbPu3P8G27y3yaaKiqGiM4kcW V13HYGYO5gu8t1YHA/8WRtmXWZ9zYZl6amZjt/eaDhkjZ4gmDN3W/HHcEZw1UT22 RAYT+OFraz9yOIpEGr58bKi2ew03pBkiJ7xzxQ43L5bBF8n29g6a58ARs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=qfT/UPOdnfGR4TMBIxaLSyNGz2M=; b=LUGzyd/fWfu0fydooFfR MDh0vMQbiiihjBCl10ETTnOfK5FWRbKL6R6NKAVFCXzGvT3QmNj/MFMr9KTy65f9 RIk9TDpMh0bCM4gnXAuGtzpN4OuoDQ4/QwKKZcrJXFN73/S0mWUsdq3QS2Gc7eT0 Yezx2oSo4nAn7/3QWIU51fk= Received: (qmail 118242 invoked by alias); 3 Nov 2017 20:42:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 118228 invoked by uid 89); 3 Nov 2017 20:42:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=overnight, filed, H*MI:3132, his X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Nov 2017 20:42:02 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B37C87EBD5 for ; Fri, 3 Nov 2017 20:42:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B37C87EBD5 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law@redhat.com Received: from localhost.localdomain (ovpn-116-48.phx2.redhat.com [10.3.116.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9048760C80 for ; Fri, 3 Nov 2017 20:42:00 +0000 (UTC) To: gcc-patches From: Jeff Law Subject: [PR target/82823] Add testcase Message-ID: <9560e215-3132-9a57-ca35-8460c2270b4d@redhat.com> Date: Fri, 3 Nov 2017 14:42:00 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 X-IsSubscribed: yes So the x86 assertion failure I fixed yesterday where I didn't have a testcase? Martin L has just tripped over it and filed a bug for it overnight. I'm adding his testcase to the C++ regression testsuite. I also retro-actively added the PR marker to the x86 commit which fixes this problem. Jeff diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4cc2cedc0dc..0a08fe2ed5c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2017-11-03 Jeff Law + PR target/82823 + * g++.dg/torture/pr82823.C: New test. + * gcc.target/i386/stack-check-12.c: New test. 2017-11-03 Jakub Jelinek diff --git a/gcc/testsuite/g++.dg/torture/pr82823.C b/gcc/testsuite/g++.dg/torture/pr82823.C new file mode 100644 index 00000000000..dab369e7ad3 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr82823.C @@ -0,0 +1,26 @@ +// { dg-do compile } +// { dg-additional-options "-fstack-clash-protection" } +// { dg-require-effective-target supports_stack_clash_protection } + + +class a +{ +public: + ~a (); + int b; +}; +class c +{ +public: + a m_fn1 (); +}; +class d +{ + int e (); + c f; +}; +int +d::e () +{ + return f.m_fn1 ().b; +}