From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129517 invoked by alias); 13 Mar 2015 13:04:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 129508 invoked by uid 89); 13 Mar 2015 13:04:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mx07-00178001.pphosted.com Received: from mx07-00178001.pphosted.com (HELO mx07-00178001.pphosted.com) (62.209.51.94) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 13 Mar 2015 13:04:23 +0000 Received: from pps.filterd (m0046670.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.14.5/8.14.5) with SMTP id t2DD2IjU032164; Fri, 13 Mar 2015 14:04:12 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 1t3bkedx55-1 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 13 Mar 2015 14:04:12 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id AA0E731; Fri, 13 Mar 2015 13:03:09 +0000 (GMT) Received: from Webmail-eu.st.com (safex1hubcas1.st.com [10.75.90.14]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1122B5322; Fri, 13 Mar 2015 13:04:09 +0000 (GMT) Received: from [164.129.122.154] (164.129.122.154) by webmail-eu.st.com (10.75.90.13) with Microsoft SMTP Server (TLS) id 8.3.342.0; Fri, 13 Mar 2015 14:04:08 +0100 Message-ID: <5502E048.6010803@st.com> Date: Fri, 13 Mar 2015 13:04:00 -0000 From: Christophe Lyon User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Kyrill Tkachov , "'Honggyu Kim'" , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH][ARM] New testcase to check parameter passing bug References: <1426212518-14867-1-git-send-email-hong.gyu.kim@lge.com> <000801d05d85$dbcb9450$9362bcf0$@arm.com> In-Reply-To: <000801d05d85$dbcb9450$9362bcf0$@arm.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-03-13_04:2015-03-13,2015-03-13,1970-01-01 signatures=0 X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00745.txt.bz2 On 03/13/15 13:04, Kyrill Tkachov wrote: > >> Hi, > > Hi Honggyu, > Thanks for helping out. I've got a couple of pointers for the testcase > inline. > >> >> I have wrote a testcase that reproduces argument overwriting bug during >> arm code generation. >> >> I wrote this testcase with the help of Mikael Pettersson. >> If some format is not proper to run in gcc testsuite framework, please > correct >> me. >> >> Please refer to the following bugzilla link for details: >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65358 >> >> Honggyu >> --- >> gcc/testsuite/ChangeLog | 5 +++++ >> gcc/testsuite/gcc.target/arm/pr65358.c | 34 >> ++++++++++++++++++++++++++++++++ >> 2 files changed, 39 insertions(+) >> create mode 100644 gcc/testsuite/gcc.target/arm/pr65358.c >> >> diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index >> 5302dbd..9acd12a 100644 >> --- a/gcc/testsuite/ChangeLog >> +++ b/gcc/testsuite/ChangeLog >> @@ -1,3 +1,8 @@ >> +2015-03-13 Honggyu Kim >> + >> + PR target/65235 Looks like the PR number is wrong. >> + * gcc.target/arm/pr65358.c: New test for sibcall argument passing >> bug. > > Just 'New test.' for the entry should be enough, but it's not a big deal. > >> + >> 2015-03-12 Kyrylo Tkachov >> >> PR rtl-optimization/65235 >> diff --git a/gcc/testsuite/gcc.target/arm/pr65358.c >> b/gcc/testsuite/gcc.target/arm/pr65358.c >> new file mode 100644 >> index 0000000..d663dcf >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/arm/pr65358.c >> @@ -0,0 +1,34 @@ >> +/* PR target/65358 */ >> +/* { dg-do compile { target arm*-*-* } } */ > > No need for the target selector. The fact that it's in gcc.target/arm > already > means it will only be run for the arm targets. > Also, the bug is exposed at runtime, so this should be a dg-do run test. > > Cheers, > Kyrill > >> +/* { dg-options "-O2" } */ >> + >> +struct pack >> +{ >> + int fine; >> + int victim; >> + int killer; >> +}; >> + >> +int __attribute__ ((__noinline__, __noclone__)) bar (int a, int b, >> +struct pack p) { >> + if (a != 20 || b != 30) >> + __builtin_abort (); >> + if (p.fine != 40 || p.victim != 50 || p.killer != 60) >> + __builtin_abort (); >> + return 0; >> +} >> + >> +int __attribute__ ((__noinline__, __noclone__)) foo (int arg1, int >> +arg2, int arg3, struct pack p) { >> + return bar (arg2, arg3, p); >> +} >> + >> +int main (void) >> +{ >> + struct pack p = { 40, 50, 60 }; >> + >> + (void) foo (10, 20, 30, p); >> + return 0; >> +} >> -- >> 1.7.9.5 >> > > > > > . >