Hi, I've recently committed a middle-end patch that adds handling of undefined variables (that the nvptx backend needs) under -fno-toplevel-reorder (svn rev. 238371). With that change, it's no longer necessary to implicitly enable -ftoplevel-reorder in the backend, and the following patch removes that.
Tested with nvptx-none-run, OK for trunk? * config/nvptx/nvptx.c (nvptx_option_override): Do not set flag_toplevel_reorder. diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 5e47002..8eba2ad 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -152,12 +152,6 @@ nvptx_option_override (void) { init_machine_status = nvptx_init_machine_status; - /* Set toplevel_reorder, unless explicitly disabled. We need - reordering so that we emit necessary assembler decls of - undeclared variables. */ - if (!global_options_set.x_flag_toplevel_reorder) - flag_toplevel_reorder = 1; - /* Set flag_no_common, unless explicitly disabled. We fake common using .weak, and that's not entirely accurate, so avoid it unless forced. */