From 537e2cc30d0f8ba6433af52f2fef038d75d93174 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 14 Jul 2022 22:05:17 +0200 Subject: [PATCH] nvptx 'TARGET_USE_LOCAL_THUNK_ALIAS_P', 'TARGET_SUPPORTS_ALIASES' This fixes up commit f8b15e177155960017ac0c5daef8780d1127f91c "[nvptx] Use .alias directive for mptx >= 6.3", which regressed in particular C++ test cases if the new '-malias' flag was not active. In that case, we have to maintain (that is now, restore) the previous state of 'TARGET_USE_LOCAL_THUNK_ALIAS_P', 'TARGET_SUPPORTS_ALIASES'. The remaining three regressions are to be resolved via "More '#ifdef ASM_OUTPUT_DEF' -> 'if (TARGET_SUPPORTS_ALIASES)' etc.". gcc/ * config/nvptx/nvptx.h (TARGET_USE_LOCAL_THUNK_ALIAS_P) (TARGET_SUPPORTS_ALIASES): Define. --- gcc/config/nvptx/nvptx.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index 15a52344d4a2..129427e5654d 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -338,6 +338,11 @@ struct GTY(()) machine_function #define ASM_OUTPUT_DEF_FROM_DECLS(STREAM, NAME, VALUE) \ nvptx_asm_output_def_from_decls (STREAM, NAME, VALUE) +/* ..., but also override other macros to avoid 'gcc/defaults.h'-initialization + due to that dummy 'ASM_OUTPUT_DEF'. */ +#define TARGET_USE_LOCAL_THUNK_ALIAS_P(DECL) TARGET_SUPPORTS_ALIASES +#define TARGET_SUPPORTS_ALIASES (nvptx_alias != 0) + #define NO_DOT_IN_LABEL #define ASM_COMMENT_START "//" -- 2.47.2