From patchwork Wed Jun 26 02:28:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Iyer, Balaji V" X-Patchwork-Id: 254552 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 62C282C009D for ; Wed, 26 Jun 2013 12:28:41 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=jtW Ph6FQtH4yA89sEvvPi7e1mvE5yVNJoScG2KMVJj4ygUDbBjwJ766Gmu6vC1WFxuP FDf/YwfZo9rgwJ56Me7Z2sh5M2KEAgHmtqcT9sqZ/Qw5HPnYIa0dlAyrwtx1MHH6 n0u4l+bMhN7NpmmCJWv6Dj1nM/Sa9QJ8+zLivElM= 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:from :to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=99LwfHF4B aCqBaRML+Jy6I7YK1Y=; b=shGsrNgZFApOolhQ/U4mnfdPGpfH61PmF1hln22mu G7E6MBT8wTrbamdbIrT8jxqUR/kdy02abGk4m4eAA6f+eEWG8KD3CyVW/ib2uWS0 18TNAT/mlDrWepx5VwbVqBA0AHjQ9KgwaCFITEdREFRRDFWRLVZaaKkAGud2COua pU= Received: (qmail 32083 invoked by alias); 26 Jun 2013 02:28:35 -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 32070 invoked by uid 89); 26 Jun 2013 02:28:34 -0000 X-Spam-SWARE-Status: No, score=-5.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.1 Received: from mga14.intel.com (HELO mga14.intel.com) (143.182.124.37) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 26 Jun 2013 02:28:33 +0000 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 25 Jun 2013 19:28:31 -0700 X-ExtLoop1: 1 Received: from fmsmsx106.amr.corp.intel.com ([10.19.9.37]) by azsmga001.ch.intel.com with ESMTP; 25 Jun 2013 19:28:31 -0700 Received: from fmsmsx101.amr.corp.intel.com ([169.254.1.114]) by FMSMSX106.amr.corp.intel.com ([10.19.9.37]) with mapi id 14.03.0123.003; Tue, 25 Jun 2013 19:28:31 -0700 From: "Iyer, Balaji V" To: "gcc-patches@gcc.gnu.org" Subject: [PATCH] Fix for PR 57692 Date: Wed, 26 Jun 2013 02:28:30 +0000 Message-ID: MIME-Version: 1.0 Hello Everyone, This patch will fix a FAIL in one of the test cases for array notations. The reason for fail is that the array sizes were huge and thus it was causing a stack overflow. This patch should fix the issue. I am committing this patch as semi-obvious. I am willing to revert this change if anyone has objections. 2013-06-25 Balaji V. Iyer * c-c++-common/cilk-plus/AN/gather_scatter.c: Fixed a bug of stack overflow due to size of arrays. Thanks, Balaji V. Iyer. Index: gcc/testsuite/c-c++-common/cilk-plus/AN/gather_scatter.c =================================================================== --- gcc/testsuite/c-c++-common/cilk-plus/AN/gather_scatter.c (revision 200413) +++ gcc/testsuite/c-c++-common/cilk-plus/AN/gather_scatter.c (working copy) @@ -1,16 +1,16 @@ /* { dg-do run } */ /* { dg-options "-fcilkplus" } */ -#define NUMBER 100 +#define NUMBER 20 #if HAVE_IO #include #endif +float array4[NUMBER][NUMBER][NUMBER][NUMBER]; int main(void) { int array[NUMBER][NUMBER], array2[NUMBER], array3[NUMBER], x = 0, y; - int x_correct, y_correct, ii, jj = 0; - float array4[NUMBER][NUMBER][NUMBER][NUMBER]; + int x_correct, y_correct, ii, jj = 0, kk = 0, ll = 0; for (ii = 0; ii < NUMBER; ii++) { for (jj = 0; jj < NUMBER; jj++)