Bug 3394

Summary: Problems detecting -fzero-call-used-regs=all on some architectures
Product: Portable OpenSSH Reporter: Colin Watson <cjwatson>
Component: Build systemAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal CC: djm
Priority: P5    
Version: -current   
Hardware: Other   
OS: Linux   
Bug Depends on:    
Bug Blocks: 3395    
Attachments:
Description Flags
Improve detection of -fzero-call-used-regs=all support none

Description Colin Watson 2022-02-25 03:00:39 AEDT
The autoconf test for whether -fzero-call-used-regs=all is supported isn't sufficient on some architectures.  I saw two types of errors on various Debian architectures.  An example of one is ppc64el:

../../ssherr.c: In function ‘ssh_err’:
../../ssherr.c:151:1: sorry, unimplemented: ‘-fzero-call-used-regs’ not supported on this target
  151 | }
      | ^

And an example of the other is mips64el, which is noisier but it amounts to much the same thing:

../../ssherr.c: In function ‘ssh_err’:
../../ssherr.c:151:1: internal compiler error: in int_mode_for_mode, at stor-layout.c:407
  151 | }
      | ^
0x120fecf7f internal_error(char const*, ...)
	???:0
0x120139257 fancy_abort(char const*, int, char const*)
	???:0
0x1207e62d3 int_mode_for_mode(machine_mode)
	???:0
0x120417727 emit_move_insn_1(rtx_def*, rtx_def*)
	???:0
0x120413277 emit_move_insn(rtx_def*, rtx_def*)
	???:0
0x120802cb3 default_zero_call_used_regs(HARD_REG_SET)
	???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.
during RTL pass: zero_call_used_regs

I'm testing a patch for this at the moment.
Comment 1 Colin Watson 2022-02-25 03:06:11 AEDT
Created attachment 3573 [details]
Improve detection of -fzero-call-used-regs=all support
Comment 2 Damien Miller 2022-02-25 11:29:04 AEDT
This has been merged to git HEAD and cherry-picked onto the V_8_9 stable branch. Thanks!
Comment 3 Damien Miller 2022-04-08 12:12:52 AEST
closing bug resolved during openssh-9.0 release cycle