From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 28DD33945046; Wed, 18 Mar 2020 10:58:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28DD33945046 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584529080; bh=JOmJLAPb6IBKHjV71yld4UnKMILYk8DXBZJADbAgtko=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EY/9ai6bElWgZnwjc0O8hXdE0nJ9p6vX/d/AXgqBmdizdXb20G0FcdQwqOws3sUPp ULJoGRC+fY9SPUH3zJprvevWXC3FWAJSmRjVMRifVtVGEUM0ZF9ySjMTDZUHBIVP7q QoCS9RTZQ5DtJbhdjdbXDVvw7qAU5bnjLyule/kg= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/92860] [8/9/10 regression] Global flags affected by -O settings are clobbered by optimize attribute Date: Wed, 18 Mar 2020 10:57:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2020 10:58:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D92860 --- Comment #15 from Martin Li=C5=A1ka --- (In reply to Martin Li=C5=A1ka from comment #14) > There's another issue for ppc64le: >=20 > $ ./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 for instructions. I've got a patch candidate for this particular issue. It can be fixed in a reasonable way.=