* [patch] Remove -fconserve-space
@ 2012-06-06 18:11 Steven Bosscher
2012-06-06 19:50 ` Jason Merrill
2012-08-26 0:15 ` Gerald Pfeifer
0 siblings, 2 replies; 5+ messages in thread
From: Steven Bosscher @ 2012-06-06 18:11 UTC (permalink / raw)
To: Jason Merrill, GCC Patches
[-- Attachment #1: Type: text/plain, Size: 166 bytes --]
Hello,
The attached patch removes the -fconserve-space flag, as discussed last week.
Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK for trunk?
Ciao!
Steven
[-- Attachment #2: remove_fconserve_space.diff.txt --]
[-- Type: text/plain, Size: 3917 bytes --]
gcc/
* doc/invoke.texi (fconserve-space): Remove documentation.
c-family/
* c.opt (fconserve-space): Turn into a no-op.
cp/
* decl.c: Do not include output.h.
(start_decl): Remove code for flag_conserve_space.
testsuite/
* g++.old-deja/g++.brendan/array1.C: Remove -fconserve-space flag.
Index: doc/invoke.texi
===================================================================
--- doc/invoke.texi (revision 188182)
+++ doc/invoke.texi (working copy)
@@ -182,7 +182,7 @@ in the following sections.
@item C++ Language Options
@xref{C++ Dialect Options,,Options Controlling C++ Dialect}.
@gccoptlist{-fabi-version=@var{n} -fno-access-control -fcheck-new @gol
--fconserve-space -fconstexpr-depth=@var{n} -ffriend-injection @gol
+-fconstexpr-depth=@var{n} -ffriend-injection @gol
-fno-elide-constructors @gol
-fno-enforce-eh-specs @gol
-ffor-scope -fno-for-scope -fno-gnu-keywords @gol
@@ -1947,18 +1947,6 @@ return value even without this option. In all oth
exhaustion is signalled by throwing @code{std::bad_alloc}. See also
@samp{new (nothrow)}.
-@item -fconserve-space
-@opindex fconserve-space
-Put uninitialized or run-time-initialized global variables into the
-common segment, as C does. This saves space in the executable at the
-cost of not diagnosing duplicate definitions. If you compile with this
-flag and your program mysteriously crashes after @code{main()} has
-completed, you may have an object that is being destroyed twice because
-two definitions are merged.
-
-This option is no longer useful on most targets, now that support has
-been added for putting variables into BSS without making them common.
-
@item -fconstexpr-depth=@var{n}
@opindex fconstexpr-depth
Set the maximum nested evaluation depth for C++11 constexpr functions
Index: c-family/c.opt
===================================================================
--- c-family/c.opt (revision 188182)
+++ c-family/c.opt (working copy)
@@ -762,7 +762,7 @@ Allow the arguments of the '?' operator to have di
fconserve-space
C++ ObjC++ Var(flag_conserve_space)
-Reduce the size of object files
+Does nothing. Preserved for backward compatibility.
fconstant-string-class=
ObjC ObjC++ Joined MissingArgError(no class name specified with %qs)
Index: cp/decl.c
===================================================================
--- cp/decl.c (revision 188182)
+++ cp/decl.c (working copy)
@@ -39,7 +39,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree-inline.h"
#include "decl.h"
#include "intl.h"
-#include "output.h" /* for have_global_bss_p */
#include "toplev.h"
#include "hashtab.h"
#include "tm_p.h"
@@ -4528,18 +4527,6 @@ start_decl (const cp_declarator *declarator,
if (decl == error_mark_node)
return error_mark_node;
- /* Tell the back end to use or not use .common as appropriate. If we say
- -fconserve-space, we want this to save .data space, at the expense of
- wrong semantics. If we say -fno-conserve-space, we want this to
- produce errors about redefs; to do this we force variables into the
- data segment. */
- if (flag_conserve_space
- && TREE_CODE (decl) == VAR_DECL
- && TREE_PUBLIC (decl)
- && !DECL_THREAD_LOCAL_P (decl)
- && !have_global_bss_p ())
- DECL_COMMON (decl) = 1;
-
if (TREE_CODE (decl) == VAR_DECL
&& DECL_NAMESPACE_SCOPE_P (decl) && !TREE_PUBLIC (decl) && !was_public
&& !DECL_THIS_STATIC (decl) && !DECL_ARTIFICIAL (decl))
Index: testsuite/g++.old-deja/g++.brendan/array1.C
===================================================================
--- testsuite/g++.old-deja/g++.brendan/array1.C (revision 188182)
+++ testsuite/g++.old-deja/g++.brendan/array1.C (working copy)
@@ -1,5 +1,5 @@
// { dg-do assemble }
-// { dg-options "-fconserve-space -fcommon" }
+// { dg-options "-fcommon" }
// GROUPS passed array-bindings
extern "C" int printf (const char *, ...);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] Remove -fconserve-space
2012-06-06 18:11 [patch] Remove -fconserve-space Steven Bosscher
@ 2012-06-06 19:50 ` Jason Merrill
2012-08-26 0:15 ` Gerald Pfeifer
1 sibling, 0 replies; 5+ messages in thread
From: Jason Merrill @ 2012-06-06 19:50 UTC (permalink / raw)
To: Steven Bosscher; +Cc: GCC Patches
On 06/06/2012 02:06 PM, Steven Bosscher wrote:
> -// { dg-options "-fconserve-space -fcommon" }
> +// { dg-options "-fcommon" }
I think we can just remove the dg-options; -fcommon has no effect for
C++. OK with that change.
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] Remove -fconserve-space
2012-06-06 18:11 [patch] Remove -fconserve-space Steven Bosscher
2012-06-06 19:50 ` Jason Merrill
@ 2012-08-26 0:15 ` Gerald Pfeifer
2012-11-04 14:13 ` Gerald Pfeifer
1 sibling, 1 reply; 5+ messages in thread
From: Gerald Pfeifer @ 2012-08-26 0:15 UTC (permalink / raw)
To: Steven Bosscher; +Cc: Jason Merrill, GCC Patches
On Wed, 6 Jun 2012, Steven Bosscher wrote:
> The attached patch removes the -fconserve-space flag, as discussed last
> week. Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK for trunk?
How about the following for the release notes?
(Happy to use a different/better rationale. This one's borrowed
from the old documentation. ;)
Gerald
Index: changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v
retrieving revision 1.17
diff -u -3 -p -r1.17 changes.html
--- changes.html 20 Aug 2012 12:23:39 -0000 1.17
+++ changes.html 26 Aug 2012 00:11:29 -0000
@@ -38,7 +38,7 @@ explicit use of vector types may be inco
built with older versions of GCC. Auto-vectorized code is not affected
by this change.</p>
-<h2>General Optimizer Improvements</h2>
+<h2>General Optimizer Improvements (and Changes)</h2>
<ul>
<li>A new option <code>-ftree-partial-pre</code> was added to control
@@ -46,6 +46,9 @@ by this change.</p>
This option is enabled by default at the <code>-O3</code> optimization
level, and it makes PRE more aggressive.
</li>
+ <li>The option <code>-fconserve-space</code> has been removed; it
+ was no longer useful on most targets since GCC supports putting
+ variables into BSS without making them common.</li>
</ul>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] Remove -fconserve-space
2012-08-26 0:15 ` Gerald Pfeifer
@ 2012-11-04 14:13 ` Gerald Pfeifer
2012-11-05 2:01 ` Jason Merrill
0 siblings, 1 reply; 5+ messages in thread
From: Gerald Pfeifer @ 2012-11-04 14:13 UTC (permalink / raw)
To: Steven Bosscher; +Cc: Jason Merrill, gcc-patches
Hi there,
any comments on my proposed release notes entry below?
Gerald
On Sun, 26 Aug 2012, Gerald Pfeifer wrote:
>> The attached patch removes the -fconserve-space flag, as discussed last
>> week. Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK for trunk?
>
> How about the following for the release notes?
>
> (Happy to use a different/better rationale. This one's borrowed
> from the old documentation. ;)
>
> Gerald
> Index: changes.html
> ===================================================================
> RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/changes.html,v
> retrieving revision 1.17
> diff -u -3 -p -r1.17 changes.html
> --- changes.html 20 Aug 2012 12:23:39 -0000 1.17
> +++ changes.html 26 Aug 2012 00:11:29 -0000
> @@ -38,7 +38,7 @@ explicit use of vector types may be inco
> built with older versions of GCC. Auto-vectorized code is not affected
> by this change.</p>
>
> -<h2>General Optimizer Improvements</h2>
> +<h2>General Optimizer Improvements (and Changes)</h2>
>
> <ul>
> <li>A new option <code>-ftree-partial-pre</code> was added to control
> @@ -46,6 +46,9 @@ by this change.</p>
> This option is enabled by default at the <code>-O3</code> optimization
> level, and it makes PRE more aggressive.
> </li>
> + <li>The option <code>-fconserve-space</code> has been removed; it
> + was no longer useful on most targets since GCC supports putting
> + variables into BSS without making them common.</li>
> </ul>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] Remove -fconserve-space
2012-11-04 14:13 ` Gerald Pfeifer
@ 2012-11-05 2:01 ` Jason Merrill
0 siblings, 0 replies; 5+ messages in thread
From: Jason Merrill @ 2012-11-05 2:01 UTC (permalink / raw)
To: Gerald Pfeifer; +Cc: Steven Bosscher, gcc-patches
That looks good to me.
Jason
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-05 2:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-06 18:11 [patch] Remove -fconserve-space Steven Bosscher
2012-06-06 19:50 ` Jason Merrill
2012-08-26 0:15 ` Gerald Pfeifer
2012-11-04 14:13 ` Gerald Pfeifer
2012-11-05 2:01 ` Jason Merrill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).