[Patch, testsuite] Skip case struct-layout-1 for targets using short enums.

Terry Guo terry.guo@arm.com
Thu Sep 1 07:46:00 GMT 2011


Hello Jakub,

> The files are there to test the infrastructure.  I'd say just try
> 2011-09-01  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* gcc.dg/compat/struct-layout-1_test.h: Decrease bitfield size
> 	to work even with -fshort-enums.
> 
> --- gcc/testsuite/gcc.dg/compat/struct-layout-1_test.h	2008-09-05
> 12:54:32.000000000 +0200
> +++ gcc/testsuite/gcc.dg/compat/struct-layout-1_test.h	2011-09-01
> 09:21:20.200426411 +0200
> @@ -1,5 +1 @@
> -#if (__SIZEOF_INT__ >= 4)
> -T(0,enum E2 a:31;,B(0,a,e2_m1,e2_0))
> -#else
> -T(0,enum E2 a:15;,B(0,a,e2_m1,e2_0))
> -#endif
> +T(0,enum E2 a:7;,B(0,a,e2_m1,e2_0))
> 
> instead.
> 

I just tried the patch, it works well. The case get passed. Would you please
commit it into trunk and GCC 4.6 branch? If you want me to do something
else, please let me know. Thanks.

BR,
Terry




More information about the Gcc-patches mailing list