This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH,AIX] rs6000 output_aligned_decl_common fix
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 11 Oct 2017 20:03:29 -0400
- Subject: [PATCH,AIX] rs6000 output_aligned_decl_common fix
- Authentication-results: sourceware.org; auth=none
GCC toplev.c uses ASM_OUTPUT_ALIGNED_DECL_COMMON with a NULL decl to
emit the LTO marker, so the rs6000 implementation needs to test for
that situation. config/darwin.c tests similarly. With this patch,
gcc -flto produces correct output on AIX.
Bootstrapped on powerpc-ibm-aix7.2.0.0
Thanks, David
* config/rs6000/rs6000.c
(rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.
Index: rs6000.c
===================================================================
--- rs6000.c (revision 253666)
+++ rs6000.c (working copy)
@@ -34375,7 +34375,8 @@ rs6000_xcoff_asm_output_aligned_decl_common (FILE
size, align2);
#ifdef HAVE_GAS_HIDDEN
- fputs (rs6000_xcoff_visibility (decl), stream);
+ if (decl != NULL)
+ fputs (rs6000_xcoff_visibility (decl), stream);
#endif
putc ('\n', stream);
}