diff mbox

[TESTSUITE] Add -fno-short-enums to pr51712

Message ID 000401cd901f$25c53700$714fa500$@tkachov@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov Sept. 11, 2012, 1:12 p.m. UTC
Fixed the format of the test options, as per Jakub's comment.

Add -fno-short-enums flag to test c-c++-common/pr51712.c as discussed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51712.
This removes the excess warning that caused the test to fail.
Tested in arm-none-eabi configuration. The test now passes.
Comment? Ok for trunk?

Thanks,
Kyrill

gcc/testsuite

2012-09-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* c-c++-common/pr51712.c: Add -fno-short-enums flag to test.

-----Original Message-----
From: Jakub Jelinek [mailto:jakub@redhat.com] 
Sent: 11 September 2012 13:50
To: Kyrylo Tkachov
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH, TESTSUITE] Add -fno-short-enums to pr51712

On Tue, Sep 11, 2012 at 01:46:37PM +0100, Kyrylo Tkachov wrote:
> Add -fno-short-enums flag to test c-c++-common/pr51712.c as discussed in
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51712.
> This removes the excess warning that caused the test to fail.
> Tested in arm-none-eabi configuration. The test now passes.
> Comment? Ok for trunk?
> 
> Thanks,
> Kyrill
> 
> gcc/testsuite
> 
> 2012-09-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
> 
> 	* c-c++-common/pr51712.c: Add -fno-short-enums flag to test.

> --- a/gcc/testsuite/c-c++-common/pr51712.c
> +++ b/gcc/testsuite/c-c++-common/pr51712.c
> @@ -1,6 +1,6 @@
>  /* PR c/51712 */
>  /* { dg-do compile } */
> -/* { dg-options "-Wtype-limits" } */
> +/* { dg-options "-Wtype-limits -fno-short-enums" {target short_enums} }
*/

That is wrong, it means that on non-short_enums targets suddenly no
dg-options would be passed.
Instead you should keep the dg-options line as is and add
/* { dg-additional-options "-fno-short-enums" { target short_enums } } */
or just add the new dg-options line but keep the old one as well (though,
dg-additional-options is the new preferred way).

	Jakub

Comments

Mike Stump Sept. 11, 2012, 5:41 p.m. UTC | #1
On Sep 11, 2012, at 6:12 AM, Kyrylo Tkachov <kyrylo.tkachov@arm.com> wrote:
> Fixed the format of the test options, as per Jakub's comment.

> Ok for trunk?

Ok.
Kyrylo Tkachov Sept. 13, 2012, 8:12 a.m. UTC | #2
Can I get this commited please?
Thanks,
K.

-----Original Message-----
From: Mike Stump [mailto:mikestump@comcast.net] 
Sent: 11 September 2012 18:41
To: Kyrylo Tkachov
Cc: 'Jakub Jelinek'; gcc-patches@gcc.gnu.org
Subject: Re: [PATCH, TESTSUITE] Add -fno-short-enums to pr51712

On Sep 11, 2012, at 6:12 AM, Kyrylo Tkachov <kyrylo.tkachov@arm.com> wrote:
> Fixed the format of the test options, as per Jakub's comment.

> Ok for trunk?

Ok.
Ramana Radhakrishnan Sept. 13, 2012, 8:20 a.m. UTC | #3
On 09/13/12 09:12, Kyrylo Tkachov wrote:
> Can I get this commited please?

Now applied with a minor tweak to the changelog.

2012-09-12  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* c-c++-common/pr51712.c: Handle for short-enum targets.

Thanks,
ramana
diff mbox

Patch

--- a/gcc/testsuite/c-c++-common/pr51712.c
+++ b/gcc/testsuite/c-c++-common/pr51712.c
@@ -1,6 +1,7 @@ 
 /* PR c/51712 */
 /* { dg-do compile } */
 /* { dg-options "-Wtype-limits" } */
+/* { dg-additional-options "-fno-short-enums" { target short_enums } } */
 
 enum test_enum {
   FOO,