On 03/31/16 07:18, Alexander Monakov wrote:
This fixes a bug in the NVPTX backend where taking the address of a function renamed by the backend (e.g. 'call' or 'malloc') would wrongly use the original name. Now all decl renaming is handled up front via TARGET_MANGLE_DECL_ASSEMBLER_NAME hook, which becomes the only caller of nvptx_name_replacement.En passant, it also fixes one instance where handling of star prefix on user-supplied DECL_ASSEMBLER_NAME was missing. gcc/ * config/nvptx/nvptx.c (nvptx_name_replacement): Return NULL if no replacement needed. (nvptx_mangle_decl_assembler_name): New. (write_fn_proto): Do not call nvptx_name_replacement. (write_fn_proto_from_insn): Ditto. (nvptx_output_call_insn): Ditto. (TARGET_MANGLE_DECL_ASSEMBLER_NAME): Define. gcc/testsuite/ * gcc.target/nvptx/rename-call.c: New test. * gcc.target/nvptx/rename-call-2.c: New test. * gcc.target/nvptx/asm-name.c: New test.
ok nathan
