From a64697d7a3e0bf9e5b0d79e253f2b7dc3eb2fb00 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 3 Sep 2021 10:53:00 +0200 Subject: flag_complex_method: support optimize attribute gcc/c-family/ChangeLog: * c-opts.c (c_common_init_options_struct): Set also x_flag_default_complex_method. gcc/ChangeLog: * common.opt: Add new variable flag_default_complex_method. * opts.c (finish_options): Handle flags related to x_flag_complex_method. * toplev.c (process_options): Remove option handling related to flag_complex_method. gcc/go/ChangeLog: * go-lang.c (go_langhook_init_options_struct): Set also x_flag_default_complex_method. gcc/lto/ChangeLog: * lto-lang.c (lto_init_options_struct): Set also x_flag_default_complex_method. gcc/testsuite/ChangeLog: * gcc.c-torture/compile/attr-complex-method-2.c: New test. * gcc.c-torture/compile/attr-complex-method.c: New test. --- gcc/lto/lto-lang.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/lto/lto-lang.c') diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c index 92f4996..a014e58 100644 --- a/gcc/lto/lto-lang.c +++ b/gcc/lto/lto-lang.c @@ -813,6 +813,7 @@ lto_init_options_struct (struct gcc_options *opts) safe choice. This will pessimize Fortran code with LTO unless people specify a complex method manually or use -ffast-math. */ opts->x_flag_complex_method = 2; + opts->x_flag_default_complex_method = opts->x_flag_complex_method; } /* Handle command-line option SCODE. If the option takes an argument, it is -- cgit v1.1