https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105648
Bug ID: 105648
Summary: .cfi_startproc in wrong position when
-fpatchable-function-entry= is enabled on ppc64le
Product: gcc
Version: 11.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: giuliano.belinassi at gmail dot com
Target Milestone: ---
With the following input file:
```
int func(int x)
{
return x;
}
```
Saved as test.c, compiling with
> powerpc64le-suse-linux-gcc-11 -S -fpatchable-function-entry=1 test.c
results in an asm file with the following code:
```
func:
.section __patchable_function_entries,"awo",@progbits,func
.align 3
.8byte .LPFE1
.section ".text"
.LPFE1:
nop
.LFB0:
.cfi_startproc
<... more code ...>
```
The position of .cfi_startproc is incorrect. It should be positioned right
after the function label.
As an example, on x86_64:
```
func:
.LFB0:
.cfi_startproc
.section __patchable_function_entries,"awo",@progbits,func
.align 8
.quad .LPFE1
.text
.LPFE1:
nop
<... more code ...>
```