From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E7B5D385840C; Thu, 6 Jan 2022 11:42:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7B5D385840C From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug driver/103465] [12 regression] -freorder-blocks-and-partition broken on 64-bit Windows Date: Thu, 06 Jan 2022 11:42:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: driver X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: diagnostic, patch X-Bugzilla-Severity: major X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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: Thu, 06 Jan 2022 11:43:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103465 --- Comment #20 from Eric Botcazou --- > Can you be more concrete about what's wrong with that? I haven't changed = the > conditions that drop the flag, but only make it respect pragmas. Previously the opts.c logic would trigger only with the pragma, now it trig= gers even without it, disabling flag_reorder_blocks_and_partition in all cases: /* If user requested unwind info, then turn off the partitioning optimization. */ if (opts->x_flag_unwind_tables && !targetm_common.unwind_tables_default && opts->x_flag_reorder_blocks_and_partition && (ui_except =3D=3D UI_SJLJ || ui_except >=3D UI_TARGET)) { if (opts_set->x_flag_reorder_blocks_and_partition) inform (loc, "%<-freorder-blocks-and-partition%> does not support " "unwind info on this architecture"); opts->x_flag_reorder_blocks_and_partition =3D 0; opts->x_flag_reorder_blocks =3D 1; } /* If the target requested unwind info, then turn off the partitioning optimization with a different message. Likewise, if the target does n= ot support named sections. */ if (opts->x_flag_reorder_blocks_and_partition && (!targetm_common.have_named_sections || (opts->x_flag_unwind_tables && targetm_common.unwind_tables_default && (ui_except =3D=3D UI_SJLJ || ui_except >=3D UI_TARGET)))) { if (opts_set->x_flag_reorder_blocks_and_partition) inform (loc, "%<-freorder-blocks-and-partition%> does not work " "on this architecture"); opts->x_flag_reorder_blocks_and_partition =3D 0; opts->x_flag_reorder_blocks =3D 1; } I guess that we need to define TARGET_UNWIND_TABLES_DEFAULT for 64-bit Wind= ows but that would probably only generate the second error instead of the first, and we need none since -freorder-blocks-and-partition works fine there.=