diff options
author | Nathan Sidwell <nathan@acm.org> | 2016-05-20 19:52:50 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2016-05-20 19:52:50 +0000 |
commit | ae578943c00e669b6b18ce2588a29efcfb74ae19 (patch) | |
tree | fa0da02b164cdefd6cd94eb6b8a95b1b946db452 /gcc/config/nvptx | |
parent | 15c671a79ca66df5b1de70dd1a0b78414fe003ef (diff) | |
download | gcc-ae578943c00e669b6b18ce2588a29efcfb74ae19.zip gcc-ae578943c00e669b6b18ce2588a29efcfb74ae19.tar.gz gcc-ae578943c00e669b6b18ce2588a29efcfb74ae19.tar.bz2 |
nptx.c (nvptx_option_override): Only set flag_toplevel_reorder, if not explicitly specified.
* config/nvptx/nptx.c (nvptx_option_override): Only set
flag_toplevel_reorder, if not explicitly specified. Set
flag_no_common, unless explicitly specified.
testsuite/
* gcc.target/nvptx/uninit-decl.c: Force common storage, add
non-common cases.
* gcc.dg/tree-ssa/ssa-store-ccp-2.c: Add -fcommon.
From-SVN: r236532
Diffstat (limited to 'gcc/config/nvptx')
-rw-r--r-- | gcc/config/nvptx/nvptx.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index d4a8f29..1bd1871 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -155,8 +155,19 @@ static void nvptx_option_override (void) { init_machine_status = nvptx_init_machine_status; - /* Gives us a predictable order, which we need especially for variables. */ - flag_toplevel_reorder = 1; + + /* 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. */ + if (!global_options_set.x_flag_no_common) + flag_no_common = 1; + /* Assumes that it will see only hard registers. */ flag_var_tracking = 0; |