This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/39326] Segmentation fault with -O1, out of memory with -O2
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 17 Feb 2016 12:11:26 +0000
- Subject: [Bug middle-end/39326] Segmentation fault with -O1, out of memory with -O2
- Auto-submitted: auto-generated
- References: <bug-39326-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39326
--- Comment #57 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 17 Feb 2016, sergstesh at yahoo dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39326
>
> --- Comment #56 from Sergei Steshenko <sergstesh at yahoo dot com> ---
> "-O2 ... and 820MB peak memory use" vs "-O3 ... and 700MB peak memory use" -
> according to my common sense -O3 is stronger than -02 optimization, and one
> should expect greater memory use.
>
> So, can the above be an indication of yet another bug ? I.e. -O3 in reality
> does not do something it is supposed to do while -O2 does this ?
More like -O3 cleans up the code due to stronger optimization before
the memory-hogging part comes in and thus that one needs less memory
do to its work.