[Bug tree-optimization/92860] [8/9/10 regression] Global flags affected by -O settings are clobbered by optimize attribute
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 17 17:06:39 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92860
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |segher at gcc dot gnu.org
--- Comment #14 from Martin Liška <marxin at gcc dot gnu.org> ---
There's another issue for ppc64le:
$ ./xgcc -B.
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/attributes-3.c
Error: global_options are modified in local context:
unroll_only_small_loops (0/1)
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/attributes-3.c:9:1:
internal compiler error: in handle_optimize_attribute, at
c-family/c-attribs.c:4464
9 | extern void __attribute__((optimize ("O2"))) fn0 (void); /* {
dg-warning "optimization attribute" } */
| ^~~~~~
0xa98687 handle_optimize_attribute
/home/marxin/Programming/gcc/gcc/c-family/c-attribs.c:4464
0x8e6dba decl_attributes(tree_node**, tree_node*, int, tree_node*)
/home/marxin/Programming/gcc/gcc/attribs.c:713
0x8fc617 c_decl_attributes
/home/marxin/Programming/gcc/gcc/c/c-decl.c:4977
0x8fcb61 start_decl(c_declarator*, c_declspecs*, bool, tree_node*)
/home/marxin/Programming/gcc/gcc/c/c-decl.c:5116
0x96c7d4 c_parser_declaration_or_fndef
/home/marxin/Programming/gcc/gcc/c/c-parser.c:2272
0x96b434 c_parser_external_declaration
/home/marxin/Programming/gcc/gcc/c/c-parser.c:1746
0x96af96 c_parser_translation_unit
/home/marxin/Programming/gcc/gcc/c/c-parser.c:1619
0x9a8e51 c_parse_file()
/home/marxin/Programming/gcc/gcc/c/c-parser.c:21710
0xa262f8 c_common_parse_file()
/home/marxin/Programming/gcc/gcc/c-family/c-opts.c:1186
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
More information about the Gcc-bugs
mailing list