From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 33B493858402; Thu, 9 Dec 2021 14:37:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33B493858402 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 14:37:51 +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 14:37:51 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103465 --- Comment #7 from Tomas Kalibera --- (In reply to Martin Li=C5=A1ka from comment #5) > > However, still talking about the current master only, I see a difference > > 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 read= ing, > > noopt.s uses the optimization and does have the invalid unwind informat= ion > > as reported in Bug 103274). Is the optimization correctly dropped also = 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. I am uploading a Dockerfile and my copy of the example which reproduces my observation, but please note, it was for 5e5f880d0452ef2cffb94f4a686d56833c9f4215. nropt.s has (correct unwind info, no reordering) .L5: call myerrorcall nop .seh_endproc but ropt.s is same as noopt.s (incorrect unwind info, reordering) .L5: call myerrorcall .seh_endproc [...] dummy.cold: .L19: So, from my reading the optimization was applied at -O3, it hence wasn't dropped by target.=