From patchwork Fri Jul 20 15:05:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 28528 Received: (qmail 43439 invoked by alias); 20 Jul 2018 15:05:25 -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 43430 invoked by uid 89); 20 Jul 2018 15:05:24 -0000 Authentication-Results: sourceware.org; auth=none 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, KAM_SHORT, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1718 X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Jul 2018 15:05:22 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 17E10AF6C for ; Fri, 20 Jul 2018 15:05:20 +0000 (UTC) Date: Fri, 20 Jul 2018 17:05:32 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [OB PATCH][gdb/testsuite] Make noclone conditional in vla-optimized-out.c Message-ID: <20180720150532.e7dvwtbzyysqwcld@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170912 (1.9.0) X-IsSubscribed: yes Hi, Make the noclone attribute on f1 in vla-optimized-out.c conditional. This makes the test-case by default identical to gcc/testsuite/gcc.dg/guality/vla-1.c. Tested on x86_64-linux. OK for trunk? Thanks, - Tom [gdb/testsuite] Make noclone conditional in vla-optimized-out.c 2018-07-20 Tom de Vries * gdb.base/vla-optimized-out.c: Make noclone attribute conditional on NOCLONE macro. * gdb.base/vla-optimized-out.exp: Use additional_flags -DNOCLONE. --- gdb/testsuite/gdb.base/vla-optimized-out.c | 7 ++++++- gdb/testsuite/gdb.base/vla-optimized-out.exp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/vla-optimized-out.c b/gdb/testsuite/gdb.base/vla-optimized-out.c index 913e8ea867..ec0a6fdd80 100644 --- a/gdb/testsuite/gdb.base/vla-optimized-out.c +++ b/gdb/testsuite/gdb.base/vla-optimized-out.c @@ -15,7 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -int __attribute__((noinline, noclone)) +int +#ifdef NOCLONE +__attribute__((noinline, noclone)) +#else +__attribute__((noinline)) +#endif f1 (int i) { char a[i + 1]; diff --git a/gdb/testsuite/gdb.base/vla-optimized-out.exp b/gdb/testsuite/gdb.base/vla-optimized-out.exp index 39abb795c8..b27569ed1e 100644 --- a/gdb/testsuite/gdb.base/vla-optimized-out.exp +++ b/gdb/testsuite/gdb.base/vla-optimized-out.exp @@ -18,7 +18,7 @@ standard_testfile if { [prepare_for_testing "failed to prepare" $testfile $srcfile \ - {debug optimize=-O1}] } { + {debug optimize=-O1 additional_flags=-DNOCLONE}] } { return -1 }