https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91406

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|gcc -Q -v lies about what   |gcc -Q -v --help=optimizers
                   |flags are enabled           |lies about what flags are
                   |                            |enabled
                 CC|                            |manu at gcc dot gnu.org

--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> -Q -v is only a wild guess given whether options are enabled or disabled may
> depend on the function context.  There's really no way to implement it
> accurately
> (this -1 trick for "auto-detection" could eventually be handled in some
> generic way, saying not enabled/disabled but "<auto>" or "<unknown>")

The output of "-Q --help=optimizers" should at least match the documentation.
That is,

g++ -Q -O0 --help=optimizers | grep prefetch
  -fprefetch-loop-arrays                [enabled]

g++ -Q -Os --help=optimizers | grep prefetch
  -fprefetch-loop-arrays                [enabled]

is wrong.

I would expect that the option is NEVER enabled with -O0 or -Os independently
of any function context.

Reply via email to