https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92046
Bug ID: 92046
Summary: Command line options (that are per-functions) are
affecting --params which are global.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: hubicka at gcc dot gnu.org
Target Milestone: ---
There is code that sets various --param values defaults depending on
optimizations. (look for uses of maybe_set_param_value).
This is done only at startup and is not adjusted when command line options
change. For example
gcc -Ofast -flto t.c -c
gcc t.o -Og
will get -Og --param values while compiling functions from t.o which are
intended to be optimized with -Ofast