Created attachment 50934 [details] Pre-processed s_modff128-ifunc.c file from glibc I've recently started seeing this regression while building glibc on powerpc64le: gcc -m64 test.i -c -mlong-double-128 -mabi=ibmlongdouble /home/tuliom/tmp/at-build-tray/at15.0-0-alpha.suse-15_ppc64le_ppc64le/builds/glibc_1-64/math/s_modff128-ifunc.c:8:1: error: ‘-mabi=ibmlongdouble’ requires ‘-mlong-double-128’ 8 | DECL_ALIAS_s_modf (modf); | ^~~~~~ Notice that both parameters are being passed to GCC. I've bisected this issue to: commit ebd5e86c0f41dc1d692f9b2b68a510b1f6835a3e Author: Martin Liska <mliska@suse.cz> Date: Wed Mar 10 15:12:31 2021 +0100 Improve global state for options. gcc/c-family/ChangeLog: PR tree-optimization/92860 PR target/99592 * c-attribs.c (handle_optimize_attribute): Save target node before calling parse_optimize_options and save it in case it changes. * c-pragma.c (handle_pragma_target): Similarly for pragma. (handle_pragma_pop_options): Likewise here. gcc/ChangeLog: PR tree-optimization/92860 PR target/99592 * optc-save-gen.awk: Remove exceptions. I can still reproduce it with commit ee9548b36a7f.
Confirmed. creduce on the attached test case gives me: bergner@pike:~/gcc/BUGS/PR100909$ cat pr100909.i void __attribute__((__optimize__("O2"))) a() { } bergner@pike:~/gcc/BUGS/PR100909$ /home/bergner/gcc/build/gcc-fsf-mainline-pr100799-debug/gcc/xgcc -B/home/bergner/gcc/build/gcc-fsf-mainline-pr100799-debug/gcc -S -mlong-double-128 -mabi=ibmlongdouble pr100909.i pr100909.i:1:1: error: ‘-mabi=ibmlongdouble’ requires ‘-mlong-double-128’ 1 | void __attribute__((__optimize__("O2"))) a() { } | ^~~~ pr100909.i: In function ‘a’: pr100909.i:1:1: error: ‘-mabi=ibmlongdouble’ requires ‘-mlong-double-128’ pr100909.i:1:1: error: ‘-mabi=ibmlongdouble’ requires ‘-mlong-double-128’ pr100909.i:1:42: error: ‘-mabi=ibmlongdouble’ requires ‘-mlong-double-128’ 1 | void __attribute__((__optimize__("O2"))) a() { } | ^ pr100909.i:1:42: error: ‘-mabi=ibmlongdouble’ requires ‘-mlong-double-128’
Mine, I've got a patch for it.
(In reply to Martin Liška from comment #2) > Mine, I've got a patch for it. Hi Martin, any status on how your patch worked out?
> Hi Martin, any status on how your patch worked out? Hello. Waiting for Segher to reply and I've just pinged that right now.
It's fixed now since g:318113a961220c8da79d8d29619138827ccc69f1 commit 318113a961220c8da79d8d29619138827ccc69f1 Author: Martin Liska <mliska@suse.cz> Date: Tue Jun 1 15:39:14 2021 +0200 rs6000: Fix restored rs6000_long_double_type_size As mentioned in the "Fallout: save/restore target options in handle_optimize_attribute" thread, we need to support target option restore of rs6000_long_double_type_size == FLOAT_PRECISION_TFmode. gcc/ChangeLog: * config/rs6000/rs6000.c (rs6000_option_override_internal): When a target option is restored, it can have rs6000_long_double_type_size set to FLOAT_PRECISION_TFmode and error should not be emitted. gcc/testsuite/ChangeLog: * gcc.target/powerpc/pragma-optimize.c: New test.