Hi Martin, >>> PS I'm not happy about duplicating the same test across all those >>> targets. It would be much nicer to have a single test somewhere >>> in dg.exp #include a target-specific header with macros describing >>> the target-specific parameters. >> >> why so complicated? Just have a single attr-aligned.c test, restricted >> to the target cpus it supports via dg directives and with >> MINALIGN/MAXALIGN definitions controlled by appropriate target macros? > > I have done that in the past(*) but hardcoding target-specific > assumptions into a general test didn't feel right either given > the design of the test suite (separate target tests). > > [*] see the tangle of #ifdefs in gcc/testsuite/gcc.dg/attr-aligned.c
however, gcc.target, g++.target are only meant for tests that only make sense on a particular target and cannot work elsewhere. The current amount of duplication between the various gcc.target/*/attr-aligned.c tests (where the only variation I could see are the MINALIGN/MAXALIGN definitions) seems way worse. For someone adapting the test to his target, it's way easier to skim through the variations (hopefully with appropriate comments where non-obvious) in a single file rather than looking at many almost identical files in gcc.target. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University