Closed bartoldeman closed 6 years ago
Hello @bartoldeman ,
Thanks for the report, and my apologies for the delay.
It seems that at optimization levels -Os
and -O2
, GCC tries to assign %es
to both FP_SEG (p)
and FP_SEG (q)
(so to speak) at the same time --- this for some reason does not happen at -O1
. I did some quick tests which suggest that freeing up %ds
for register allocation should resolve the problem (as well as #12).
Also, I find that if I compile your _fmemcpy
routine with -O3
, I get a different crash:
fmemcpy.c: In function ‘_fmemcpy’:
fmemcpy.c:1:6: internal compiler error: in ia16_expand_weird_pointer_plus_expr, at config/ia16/ia16.c:604
void _fmemcpy(void __far *s1, const void __far *s2, unsigned length)
^~~~~~~~
0xb9c79a ia16_expand_weird_pointer_plus_expr(rtx_def*, rtx_def*, rtx_def*, machine_mode)
../../gcc-ia16/gcc/config/ia16/ia16.c:604
0x72f840 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier)
../../gcc-ia16/gcc/expr.c:8288
0x65356d expand_gimple_stmt_1
../../gcc-ia16/gcc/cfgexpand.c:3654
0x65356d expand_gimple_stmt
../../gcc-ia16/gcc/cfgexpand.c:3714
0x654a80 expand_gimple_basic_block
../../gcc-ia16/gcc/cfgexpand.c:5720
0x65907e execute
../../gcc-ia16/gcc/cfgexpand.c:6335
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
I will also see how I can fix this other crash.
Thank you!
This "fmemcpy" causes trouble with -Os and -O2, but is ok with -O1.