[PATCH,AIX] rs6000 output_aligned_decl_common fix
David Edelsohn
dje.gcc@gmail.com
Thu Oct 12 00:15:00 GMT 2017
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);
}
More information about the Gcc-patches
mailing list