diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2019-11-20 16:29:23 +0000 |
---|---|---|
committer | Wilco Dijkstra <wilco@gcc.gnu.org> | 2019-11-20 16:29:23 +0000 |
commit | 6271dd984d7f920d4fb17ad37af6a1f8e6b796dc (patch) | |
tree | 52b4e9a530656bb17209232f777900c2b9d04604 /gcc/common.opt | |
parent | 83115e9eb8a54893088eb556fb4cc9194c0c5926 (diff) | |
download | gcc-6271dd984d7f920d4fb17ad37af6a1f8e6b796dc.zip gcc-6271dd984d7f920d4fb17ad37af6a1f8e6b796dc.tar.gz gcc-6271dd984d7f920d4fb17ad37af6a1f8e6b796dc.tar.bz2 |
PR85678: Change default to -fno-common
GCC currently defaults to -fcommon. As discussed in the PR, this is an ancient
C feature which is not conforming with the latest C standards. On many targets
this means global variable accesses have a codesize and performance penalty.
This applies to C code only, C++ code is not affected by -fcommon. It is about
time to change the default.
gcc/
PR85678
* common.opt (fcommon): Change init to 1.
* invoke.texi (-fcommon): Update documentation.
testsuite/
* g++.dg/lto/odr-6_1.c: Add -fcommon.
* gcc.dg/alias-15.c: Likewise.
* gcc.dg/fdata-sections-1.c: Likewise.
* gcc.dg/ipa/pr77653.c: Likewise.
* gcc.dg/lto/20090729_0.c: Likewise.
* gcc.dg/lto/20111207-1_0.c: Likewise.
* gcc.dg/lto/c-compatible-types-1_0.c: Likewise.
* gcc.dg/lto/pr55525_0.c: Likewise.
* gcc.dg/lto/pr88077_0.c: Use long to avoid alignment warning.
* gcc.dg/lto/pr88077_1.c: Add -fcommon.
* gcc.target/aarch64/sve/peel_ind_1.c: Allow ANCHOR0.
* gcc.target/aarch64/sve/peel_ind_2.c: Likewise.
* gcc.target/aarch64/sve/peel_ind_3.c: Likewise.
* gcc.target/i386/volatile-bitfields-2.c: Allow movl or movq.
From-SVN: r278509
Diffstat (limited to 'gcc/common.opt')
-rw-r--r-- | gcc/common.opt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/common.opt b/gcc/common.opt index e7b8782..404b6aa 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1131,7 +1131,7 @@ Common Report Var(flag_combine_stack_adjustments) Optimization Looks for opportunities to reduce stack adjustments and stack references. fcommon -Common Report Var(flag_no_common,0) +Common Report Var(flag_no_common,0) Init(1) Put uninitialized globals in the common section. fcompare-debug |