Hello Jakub,

> 
> On Thu, Sep 01, 2011 at 09:34:20AM +0800, Terry Guo wrote:
> > Here is the patch, is it OK to commit?
> 
> Definitely not.
> struct-layout-1* already has support for short enums, see
> http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110247
> So, if that doesn't work for you, you need to debug why.

But it still fails for arm-none-eabi as you can see in test results at
http://gcc.gnu.org/ml/gcc-testresults/2011-08/msg02739.html. 

FAIL: gcc.dg/compat/struct-layout-1 c_compat_x_tst.o compile
FAIL: gcc.dg/compat/struct-layout-1 c_compat_y_tst.o compile
UNRESOLVED: gcc.dg/compat/struct-layout-1 c_compat_x_tst.o-c_compat_y_tst.o
link 
UNRESOLVED: gcc.dg/compat/struct-layout-1 c_compat_x_tst.o-c_compat_y_tst.o
execute

On my machine, the error message is "error: width of 'a' exceeds its type".
My GCC is cross built for arm-none-eabi based on upstream GCC 4.6. The
command I run this case is simply as: "make check-gcc
RUNTESTFLAGS="--target_board=arm-none-eabi-qemu/-mthumb/-mcpu=cortex-m3
compat.exp=struct-layout-1*". Are there anything else I should do to pass
this case? 


> 
> > 2011-08-31  Terry Guo  <terry....@arm.com>
> >
> >         * gcc.dg/compat/struct-layout-1_main.c: Skip the case
> >         if the target uses short enums.
> >
> > diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_main.c
> > b/gcc/testsuite/gcc.dg/compat/struct-layout-1_main.c
> > index b59453e..64275ea 100644
> > --- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_main.c
> > +++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_main.c
> > @@ -1,4 +1,5 @@
> >  /* { dg-prune-output ".*-Wno-abi.*" } */
> > +/* { dg-skip-if "" { short_enums } } */
> >
> >    #include "struct-layout-1.h"
> >
> 
>       Jakub

Regards,
Terry



Reply via email to