From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 85EC43858402; Thu, 9 Dec 2021 15:24:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85EC43858402 From: "tomas.kalibera at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/103465] Invalid note with -fno-reorder-blocks-and-partition Date: Thu, 09 Dec 2021 15:24:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: tomas.kalibera at gmail dot com X-Bugzilla-Status: WAITING 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: 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, 09 Dec 2021 15:24:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103465 --- Comment #10 from Tomas Kalibera --- (In reply to Tomas Kalibera from comment #7) > (In reply to Martin Li=C5=A1ka from comment #5) > > > However, still talking about the current master only, I see a differe= nce > > > with -O3, when I try on the repro example from Bug 103274 and -O3: > > >=20 > > > x86_64-w64-mingw32-gcc -c -S -O3 -fno-reorder-blocks-and-partition a.= c -o > > > nropt.s > > >=20 > > > x86_64-w64-mingw32-gcc -c -S -O3 -freorder-blocks-and-partition a.c -= o ropt.s > > > x86_64-w64-mingw32-gcc -c -S -O3 a.c -o noopt.s > > >=20 > > > All of these assembler files are different (and from my non-expert re= ading, > > > noopt.s uses the optimization and does have the invalid unwind inform= ation > > > as reported in Bug 103274). Is the optimization correctly dropped als= o with > > > -O3 only? > >=20 > > Hmmm, I've just tested the same with the locally built cross-compiler: > > ~/Programming/gcc/configure --enable-languages=3Dc,c++ > > --prefix=3D/home/marxin/bin/gcc --disable-multilib --enable-host-shared > > --disable-libsanitizer --enable-valgrind-annotations --disable-bootstrap > > --target=3Dx86_64-w64-mingw32 > >=20 > > and it works fine, all 3 assembly files are identical. >=20 It tried on the current GCC trunk as now (747380f47da0da6c11fd5262ac428bb53433ea19).=20 ropt.s is still the same as noopt.s. The unwinding information is correct n= ow, because Bug 103274 has been fixed in the meantime. However, indeed, the reordering optimization is applied. nropt.s has correct unwinding information without the reordering. So, still, the reorder-stacks-and-partition optimization is not dropped by target (though I am not claiming they should be dropped, I don't know, that= 's only what I learned from your response to my original report). For these results I've only changed the git version in the dockerfile.=