<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/85509>85509</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[FTBFS] [compiler-rt] -D_FORTIFY_SOURCE=3 breaks nuilding compiler-rt GCDAProfiling
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
LW-archlinux
</td>
</tr>
</table>
<pre>
llvm trunk build gcc 13.2.1 & -D_FORTIFY_SOURCE=3 in CFLAGS
```
/home/panoramix/Documents/Aur/pkgbuilds/llvm-minimal-git/src/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c: In function ‘llvm_gcda_emit_arcs’:
/home/panoramix/Documents/Aur/pkgbuilds/llvm-minimal-git/src/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c:444:1: error: unable to find a register to spill
444 | }
| ^
/home/panoramix/Documents/Aur/pkgbuilds/llvm-minimal-git/src/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c:444:1: error: this is the insn:
(insn 176 521 435 20 (set (reg:DI 352)
(ior:DI (ashift:DI (zero_extend:DI (mem:SI (plus:SI (reg/f:SI 432 [orig:101 write_buffer.42_43 ] [101])
(reg:SI 404 [229])) [6 MEM[(uint32_t *)_173]+0 S4 A32]))
(const_int 32 [0x20]))
(zero_extend:DI (mem:SI (plus:SI (reg/f:SI 432 [orig:101 write_buffer.42_43 ] [101])
(reg:SI 351 [orig:233 _76 ] [233])) [6 MEM[(uint32_t *)_124]+0 S4 A32])))) "/home/panoramix/Documents/Aur/pkgbuilds/llvm-minimal-git/src/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c":202:31 680 {*concatsidi3_3}
(expr_list:REG_DEAD (reg/f:SI 432 [orig:101 write_buffer.42_43 ] [101])
(expr_list:REG_DEAD (reg:SI 404 [229])
(expr_list:REG_DEAD (reg:SI 351 [orig:233 _76 ] [233])
(nil)))))
/home/panoramix/Documents/Aur/pkgbuilds/llvm-minimal-git/src/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c:444: confused by earlier errors, bailing out
```
With D_FORTIFY_SOURCE=2 no error or warning is given.
[llvm-minimal-git-19.0.0_r492933.dec63221d56e-1-x86_64-build.log](https://github.com/llvm/llvm-project/files/14623060/llvm-minimal-git-19.0.0_r492933.dec63221d56e-1-x86_64-build.log)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUVk2P2zgP_jXKhYghU5I_Djk447gYoEVfdPqi2JPhD9nR1pYDSW7T_fULOR-b2Wa27WGBWWOgESmRFJ9HVFhZq3ot5YaILRH5qprdfjKbt5_WlWn2g9LzcVVP7bfNMHwZwZlZf4Z6VkMLfdNAyAIMQiAYwTovi_cfPj4Wv5VP7___4WFHWM5AaXgo3mZvngjNCc3OY0TPfycRi_00SoLFodKTqUZ1JFjkUzOPUjtLsMhm41c_90tkr_GnWY9Kq7Ea1r1yBAtrmsvCwUy_y8Yrm2k8qEGatfHSoGrvx0ydGny8Nw959r9FUroPGsIyeNTQzbpxatJAdkgSStLEOy37pq1KOSpXVqaxl7WUsOz1pcE5JywLfULSmMn4yayrepDgJuiUbqECI3tlnTReZQ9qGE55AHDOgcQPQOL8ovLfohK7_0a2bq8sKAtuL0Fpq29oSrwMYRyBwBA4E4AUCCZWOv_PyJ6wLH8EJpBgeosA-HW1BMgf_byye9W5q_iHNFMpj07q9qob5UhY9rTMD8Nsr4KPg0V3kjlDIGI7GeWDhzSEr0Y5WdZz10kTcCw5AyJyvymkIRH5d0e7913T8SEo99aI6dkaUy9H8G73zhc_JrPSjmHpUcgIpmUYs2XrlsITh4zh1fB-ZIJJM2nrSqUdnBKiR6T_YPXaMLvFi4nwxj0yBmUcXfwhYz-NIvKXUDybI76eakL0yVI_shCihAKJtwSzZtJN5axqFSvZ84eBYCKPB1MOyvpS-LB7U-a7LP83-PpBqPv3_N6t-6GXn2T_pTrQarjl-Lr19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