From: Christophe Lyon <christophe.lyon@st.com>
To: Kyrill Tkachov <kyrylo.tkachov@arm.com>,
"'Honggyu Kim'" <hong.gyu.kim@lge.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][ARM] New testcase to check parameter passing bug
Date: Fri, 13 Mar 2015 13:04:00 -0000 [thread overview]
Message-ID: <5502E048.6010803@st.com> (raw)
In-Reply-To: <000801d05d85$dbcb9450$9362bcf0$@arm.com>
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 <hong.gyu.kim@lge.com>
>> +
>> + 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 <kyrylo.tkachov@arm.com>
>>
>> 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
>>
>
>
>
>
> .
>
next prev parent reply other threads:[~2015-03-13 13:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 2:08 Honggyu Kim
2015-03-13 12:04 ` Kyrill Tkachov
2015-03-13 13:04 ` Christophe Lyon [this message]
2015-03-13 14:12 ` Segher Boessenkool
2015-03-16 0:54 ` Honggyu Kim
2015-03-18 11:53 ` Kyrill Tkachov
2015-03-19 1:40 ` [PATCH v2] " Honggyu Kim
2015-03-19 1:58 ` Honggyu Kim
2015-03-25 13:52 ` Jeff Law
2015-03-25 14:05 ` Kyrill Tkachov
2015-03-29 11:36 ` Honggyu Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5502E048.6010803@st.com \
--to=christophe.lyon@st.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hong.gyu.kim@lge.com \
--cc=kyrylo.tkachov@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).