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] be more permissive about function alignments (PR 88208)


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


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