middle-end/60779 - LTO vs. -fcx-fortran-rules and -fcx-limited-range
The following changes how flag_complex_method is managed towards
being able to record that in the optimization set so we can stream
and restore it per function. Currently -fcx-fortran-rules and
-fcx-limited-range are separate recorded options but saving/restoring
does not restore flag_complex_method which is later used in the
middle-end.
The solution is to make -fcx-fortran-rules and -fcx-limited-range
aliases of a new -fcx-method= switch that represents flag_complex_method
directly so we can save and restore it.
PR middle-end/60779
* common.opt (fcx-method=): New, map to flag_complex_method.
(Enum complex_method): New.
(fcx-limited-range): Alias to -fcx-method=limited-range.
(fcx-fortran-rules): Alias to -fcx-medhot=fortran.
* ipa-inline-transform.cc (inline_call): Check flag_complex_method.
* ipa-inline.cc (can_inline_edge_by_limits_p): Likewise.
* opts.cc (finish_options): Adjust.
(set_fast_math_flags): Likewise.
* doc/invoke.texi (fcx-method=): Document.
* gcc.dg/lto/pr60779_0.c: New testcase.
* gcc.dg/lto/pr60779_1.c: Likewise.