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: RFC: is this test case OK?


On Mon, Jul 12, 2010 at 09:12:13AM -0700, Gary Funck wrote:
> On 07/12/10 08:58:01, Richard Henderson wrote:
> [...]
> > > I'm concerned that the final 'if' which tests that the address
> > > is 16 byte aligned might not be portable enough across all
> > > targets.  For example, does a 16 bit word target processor
> > > have to honor the 16 byte alignment, or is it a "best efforts"
> > > sort of thing?
> > 
> > All elf targets should honor it; some coff and a.out targets cannot.
> 
> Thanks for the suggestions regarding the handling
> of pointer conversion.  Regarding the test for ELF,
> is this the correct way to handle this?
> 
>    /* { dg-do compile { target *-*-elf* } } */

Many ELF targets don't match *-*-elf*, that is usually used just for bare
metal ELF targets.

Perhaps better to test #ifdef __ELF__ at compile time and don't include any
runtime checks if it isn't defined.

	Jakub


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