Patchwork [testsuite] Fix another short-enums testsuite error

login
register
mail settings
Submitter Ian Bolton
Date Jan. 18, 2011, 9:46 a.m.
Message ID <000201cbb6f4$9474f740$bd5ee5c0$@bolton@arm.com>
Download mbox | patch
Permalink /patch/79276/
State New
Headers show

Comments

Ian Bolton - Jan. 18, 2011, 9:46 a.m.
> The normal approach for the warning would be to pass
> -Wl,--no-enum-size-warning on ARM eabi targets (or at least, that's the
> approach for tests passing -fshort-enums explicitly).
> 

Thanks for the input, Joseph.

I've updated the test to reflect this.  Assuming that other targets can
handle that linker option too, it should be good to go.  If not, I will
probably need to limit this patch to ARM eabi targets only.

Here's the new patch:


2011-01-18  Ian Bolton  <ian.bolton@arm.com>

	* testsuite/gcc.dg/20100906-1.c: Use -fno-short-enums
	option for "target short_enums".


    subst_low_luid in try_combine.  */
Joseph S. Myers - Jan. 25, 2011, 10:58 p.m.
On Tue, 18 Jan 2011, Ian Bolton wrote:

> > The normal approach for the warning would be to pass
> > -Wl,--no-enum-size-warning on ARM eabi targets (or at least, that's the
> > approach for tests passing -fshort-enums explicitly).
> > 
> 
> Thanks for the input, Joseph.
> 
> I've updated the test to reflect this.  Assuming that other targets can
> handle that linker option too, it should be good to go.  If not, I will
> probably need to limit this patch to ARM eabi targets only.

This option is specific to ARM EABI targets.

Patch

Index: gcc/testsuite/gcc.dg/20100906-1.c
===================================================================
--- gcc/testsuite/gcc.dg/20100906-1.c   (revision 168543)
+++ gcc/testsuite/gcc.dg/20100906-1.c   (working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2" } */
+/* { dg-options "-O2 -fno-short-enums -Wl,--no-enum-size-warning" {target
short_enums} } */
 
 /* This testcase got misoptimized by combine due to a wrong setting of