Bug 2183524

Summary: Cannot set breakpoint unless add -gno-statement-frontiers to compiler arguments
Product: Red Hat Developer Toolset Reporter: Paulo Andrade <pandrade>
Component: gccAssignee: Marek Polacek <mpolacek>
gcc sub component: gcc-toolset-12 QA Contact: Martin Cermak <mcermak>
Status: CLOSED UPSTREAM Docs Contact:
Severity: medium    
Priority: unspecified CC: mpolacek, pbhosale
Version: DTS 11.0 RHEL 7   
Target Milestone: alpha   
Target Release: 9.1   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-04-04 16:18:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
debuginfo-problem.sh none

Description Paulo Andrade 2023-03-31 13:51:42 UTC
Created attachment 1954890 [details]
debuginfo-problem.sh

Example reproducer:

$ mkdir test
$ cd test
$ scl enable devtoolset-11 -- bash
$ ../debuginfo-problem.sh

To test the workaround, edit debuginfo.sh and uncomment the line:

#workaround="-gno-statement-frontiers"

  This problem is not specific to devtoolset-11. It happens in any gcc 11
or newer.

  The problem also goes away if compiling with -O0.

Comment 2 Marek Polacek 2023-04-04 16:18:35 UTC
Same resolution as https://bugzilla.redhat.com/show_bug.cgi?id=2183525#c4