On Wed, Jun 12, 2024 at 02:23:18PM +0800, Kewen.Lin wrote: > Hi Mike, > > > +# Return 1 if this is a PowerPC target supporting -mcpu=power11. > > + > > +proc check_effective_target_power11_ok { } { > > + if { ([istarget powerpc*-*-*]) } { > > + return [check_no_compiler_messages power11_ok object { > > + int main (void) { > > + #ifndef _ARCH_PWR11 > > + #error "-mcpu=power11 is not supported" > > + #endif > > + return 0; > > + } > > + } "-mcpu=power11"] > > + } else { > > + return 0 > > + } > > +} > > + > > I guess the previous comment in [1] was escaped from your radar, as that just > one nit on test case, re-posted it as below. :) > > > Sorry that I didn't catch this before, this effective target looks useless > > since its users power11-[123].c are all for compiling and the compilation > > doesn't rely on assembler behavior. power11-1.c has checked for > > _ARCH_PWR11, > > maybe we want some cases with "dg-do assemble" to adopt this? > > [1] https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648943.html > > BR, > Kewen
Using 'object' in the check_effective_target_power11_ok' test means it has to assemble the object. Thus, if you have an older assembler that does not support ".machine power11", the testsuite will skip these tests. I just built a GCC using the system assembler instead of a recent binutils that includes ".machine power11" support, and the 3 power11 tests are not done due to them being UNSUPPORTED. -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com