ARM testsuite avoids forcing --save-temps for PCH comparison.
ARM testsuite no longer forces --save-temps, enabling correct PCH compilation tests.
The ARM testsuite’s arm_v8_1m_mve* effective targets unconditionally added --save-temps, which interfered with Precompiled Header (PCH) tests. The assembly output was removed before PCH checks could be performed, despite -keep-output. This commit removes --save-temps from these effective targets and adds it only where needed for scan-assembler tests or as a default CFLAG, allowing PCH tests to function correctly.
In Details
In gcc/testsuite/lib/target-supports.exp, the ARM effective targets arm_v8_1m_mve* were incorrectly configured to always include -save-temps. This flag causes intermediate compilation outputs, including assembly files, to be removed by default cleanup routines. This behavior broke PCH tests in dg-pch.exp because the assembly comparison required assembly output to be present. The fix removes -save-temps from these effective targets and selectively adds it via dg-options or DEFAULT_CFLAGS in relevant test suites like mve.exp and simd.exp.
- PCH
- Precompiled Header, a compilation technique where header files are precompiled into a binary format to speed up subsequent compilations.
- --save-temps
- A compiler flag that instructs the compiler to keep intermediate files (like preprocessed source, assembly, and object files) after compilation.
- effective-targets
- In GCC's testsuite, a mechanism to define sets of compiler flags or target-specific options that are applied to a group of tests.
- scan-assembler
- A testsuite utility that checks the generated assembly code for specific patterns or correctness.