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/go/go-lang.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/go') diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c index a01db8d..c3ae6f0 100644 --- a/gcc/go/go-lang.c +++ b/gcc/go/go-lang.c @@ -174,6 +174,7 @@ go_langhook_init_options_struct (struct gcc_options *opts) /* Default to avoiding range issues for complex multiply and divide. */ opts->x_flag_complex_method = 2; + opts->x_flag_default_complex_method = opts->x_flag_complex_method; /* The builtin math functions should not set errno. */ opts->x_flag_errno_math = 0; -- cgit v1.1