Bug 11280 - [3.3/3.4 Regression] Manual incorrect WRT -freorder-blocks
Summary: [3.3/3.4 Regression] Manual incorrect WRT -freorder-blocks
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 3.3.1
Assignee: Gerald Pfeifer
URL:
Keywords: documentation
Depends on:
Blocks:
 
Reported: 2003-06-22 03:51 UTC by gschafer
Modified: 2004-01-17 04:22 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-06-25 05:00:20


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gschafer 2003-06-22 03:51:18 UTC
The manual item for -freorder-blocks says:-

Enabled at levels -O2, -O3, -Os.

Yet, in the same manual, the item for -Os says:-

-Os disables the following optimization flags:

          -falign-functions  -falign-jumps  -falign-loops 
          -falign-labels  -freorder-blocks  -fprefetch-loop-arrays

Obviously, one has to be wrong.

Compiling a test program with "-fverbose-asm -S" confirms that -freorder-blocks
is not used at -Os
Comment 1 Andrew Pinski 2003-06-22 04:08:44 UTC
Confirm with respect to the documentation on the web site and looking at toplev.c and seeing that 
-Os disables reorder blocks.
This (regression?) is caused by the following patch:
2003-01-24  Jerry Quinn  <jlquinn@optonline.net>

        * gcc/doc/invoke.texi (Optimization Options): List -O levels
        for each optimization flag.
which did not update for the following patch which was made earlier (4 months)
2002-08-01  Richard Henderson  <rth@redhat.com>

        * toplev.c (parse_options_and_default_flags): Don't set
        flag_reorder_blocks for -Os.

I am adding jlquinn@optonline.net as he made the orginal patch to list the -O levels for each 
optimization flag.
Comment 2 Jerry Quinn 2003-06-25 05:00:20 UTC
I've submitted a patch:

http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02699.html
Comment 3 Gerald Pfeifer 2003-06-25 08:29:21 UTC
Patch committed to mainline and 3.3-branch.
Comment 4 CVS Commits 2003-06-25 08:42:33 UTC
Subject: Bug 11280

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	gerald@gcc.gnu.org	2003-06-25 08:24:53

Modified files:
	gcc            : ChangeLog 
	gcc/doc        : invoke.texi 

Log message:
	PR other/11280
	* gcc/doc/invoke.texi (Optimization Options): Remove -Os from
	-freorder-functions description.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.151&r2=2.152
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/invoke.texi.diff?cvsroot=gcc&r1=1.301&r2=1.302

Comment 5 CVS Commits 2003-06-25 08:43:28 UTC
Subject: Bug 11280

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	gerald@gcc.gnu.org	2003-06-25 08:28:10

Modified files:
	gcc            : ChangeLog 
	gcc/doc        : invoke.texi 

Log message:
	PR other/11280
	* gcc/doc/invoke.texi (Optimization Options): Remove -Os from
	-freorder-functions description.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.615&r2=1.16114.2.616
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/invoke.texi.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.209.2.37&r2=1.209.2.38