On 32-bit hppa*-hpux*, global common data is used for one-only support. The warning in pa_asm_output_aligned_common() causes numerous tests in the libstdc++-v3 to fail due to excess errors.
The only code that requires more alignment is the ldcw semaphore instruction, so I believe we don't need the warning. Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11. Committed to trunk. Dave --- Don't warn when alignment of global common data exceeds maximum alignment. 2021-08-21 John David Anglin <dang...@gcc.gnu.org> gcc/ChangeLog: * config/pa/pa.c (pa_asm_output_aligned_common): Remove warning. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 46194ba395d..06143023b46 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -9080,9 +9080,7 @@ pa_asm_output_aligned_common (FILE *stream, max_common_align = TARGET_64BIT ? 128 : (size >= 4096 ? 256 : 64); if (align > max_common_align) { - warning (0, "alignment (%u) for %s exceeds maximum alignment " - "for global common data. Using %u", - align / BITS_PER_UNIT, name, max_common_align / BITS_PER_UNIT); + /* Alignment exceeds maximum alignment for global common data. */ align = max_common_align; }