lto has at least one lto-specific warning:
../liboctave/external/quadpack/dqagi.f:188:5: warning: type of 'xerror'
does not match original declaration [-Wlto-type-mismatch]
188 | IF(IER.GT.0) CALL XERROR('ABNORMAL RETURN FROM
DQAGI',26,IER,LVL)
| ^
../liboctave/external/quadpack/xerror.f:1:5: note: type mismatch in
parameter 5
1 | SUBROUTINE XERROR(MESSG,NMESSG,NERR,LEVEL)
| ^
../liboctave/external/quadpack/xerror.f:1:5: note: type 'void' should
match type 'long int'
../liboctave/external/quadpack/xerror.f:1:5: note: 'xerror' was
previously declared here
../liboctave/external/quadpack/xerror.f:1:5: note: code may be
misoptimized unless '-fno-strict-aliasing is used'
../liboctave/external/odepack/sintdy.f:100:5: warning: type of 'xerrwd'
does not match original declaration [-Wlto-type-mismatch]
100 | 1 30, 51, 0, 1, K, 0, 0, 0.0E0, 0.0E0)
| ^
../liboctave/external/quadpack/xerror.f:37:5: warning: type of 'xerrwd'
does not match original declaration [-Wlto-type-mismatch]
37 | CALL XERRWD(MESSG,NMESSG,NERR,LEVEL,0,0,0,0,0.,0.)
| ^
../liboctave/external/slatec-err/xerrwd.f:3:5: note: type mismatch in
parameter 11
3 | SUBROUTINE XERRWD (MSG, NMES, NERR, LEVEL, NI, I1, I2,
NR, R1, R2)
| ^
../liboctave/external/slatec-err/xerrwd.f:3:5: note: type 'long int'
should match type 'void'
../liboctave/external/slatec-err/xerrwd.f:3:5: note: 'xerrwd' was
previously declared here
../liboctave/external/slatec-err/xerrwd.f:3:5: note: code may be
misoptimized unless '-fno-strict-aliasing is used'
But gcc also segfaults here (I filled the bug to redhat), so may be it
is not real...