From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 611FE3835C00; Mon, 29 Nov 2021 10:00:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 611FE3835C00 From: "tomas.kalibera at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/103465] New: Invalid note with -fno-reorder-blocks-and-partition Date: Mon, 29 Nov 2021 10:00:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tomas.kalibera at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Mon, 29 Nov 2021 10:00:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103465 Bug ID: 103465 Summary: Invalid note with -fno-reorder-blocks-and-partition Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: tomas.kalibera at gmail dot com Target Milestone: --- With GCC 10.3.0 and 11.2.0, compiling this example with -O2 -fno-reorder-blocks-and-partition for Windows emits a note uwi.c:3:9: note: '-freorder-blocks-and-partition' does not support unwind i= nfo on this architecture 3 | #pragma GCC optimize ("unroll-loops") | ^~~ uwi.c:5:1: note: '-freorder-blocks-and-partition' does not support unwind i= nfo on this architecture 5 | int main(int argc, char **argv) { | ^~~ (even though asking GCC to _not_ perform that optimization) #include #pragma GCC optimize ("unroll-loops") int main(int argc, char **argv) { printf("Hello 1\n"); printf("Hello 2\n"); printf("Hello 3\n"); return 0; } This note is emitted twice for this example and many times for bigger examp= les, also for other GCC optimization options pragmas. The outputs can become lar= ge (e.g. building R CRAN packages increased log file from about 1G to 12G). The note is also emitted when -freorder-blocks-and-partition is given (explicitly), which is probably intended, but it is not emitted when the optimization is used implicitly as part of -O2. The same problem exists with g++, except the wording of the note is "does n= ot work with exceptions on this architecture" With "12.0" (5e5f880d0452ef2cffb94f4a686d56833c9f4215), the note is not emi= tted with -fno-reorder-blocks-and-partition, however, the other problem remains.= The note is still not emitted when the optimization is enabled implicitly via -= O2. Related to Bug 103274; the reason for using -fno-reorder-blocks-and-partiti= on was to get valid unwind information for long jumps to work.=