This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: XFAIL vbase10.C on ARM


> 
> The vbase10.C test is checking for correct operation of -Wabi.  The
> situation that it is looking for requires that the class B have an
> alignment of 1, which it does not on almost all ARM targets.
> Therefore, the warning is not issued -- but that does not really
> indicate a problem with the compiler; it's just a consequence of the
> ARM structure layout rules.
> 
> ARM NetBSD is a special case; there, the structure alignment *is* 1,
> so the test will now XPASS there.  We do not presently have a
> mechanism for saying that the test is expected to FAIL everywhere
> except on a particular target.
> 
> Tested on i686-pc-linux-gnu and arm-none-elf, and applied to the
> mainline.
> 

Since this is a compile-only test, can you not add

  // { dg-options "-Wabi -fabi-version=1 -mstructure-size-boundary=8" { target "arm*-*-*" } }
  
This would force the structure alignment to be as for netbsd on all systems for this test only.

As far as I can tell from other tests, it's safe to add the above after the existing dg-options line -- other targets will just ignore it.

R.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]