Can't build GCC, float-int special cases errors

André Almeida andrealmeid@riseup.net
Mon Sep 13 00:11:06 GMT 2021


Hi Hongtao Liu,

I was trying to compile GCC, but I'm getting the following error:

during RTL pass: expand
In file included from ../../../gcc/libgcc/soft-fp/soft-fp.h:317,
                 from ../../../gcc/libgcc/soft-fp/floattihf.c:29:
../../../gcc/libgcc/soft-fp/floattihf.c: In function ‘__floattihf’:
../../../gcc/libgcc/soft-fp/op-1.h:131:13: internal compiler error: in
gen_lowpart_general, at rtlhooks.c:57
  131 |       (val) = _FP_PACK_RAW_1_flo.flt;           \
      |       ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
../../../gcc/libgcc/soft-fp/half.h:84:33: note: in expansion of macro
‘_FP_PACK_RAW_1’
   84 | #define FP_PACK_RAW_H(val, X)   _FP_PACK_RAW_1 (H, (val), X)
      |                                 ^~~~~~~~~~~~~~
../../../gcc/libgcc/soft-fp/floattihf.c:41:3: note: in expansion of
macro ‘FP_PACK_RAW_H’
   41 |   FP_PACK_RAW_H (a, A);
      |   ^~~~~~~~~~~~~

I got a similar error on other files as well. I compiled with the
following configuration:

../gcc/configure --prefix=/tmp/gcc --enable-languages=c --disable-bootstrap

I did a git bisect and I found the offending commit that break the build:

57b7c432cce893e1ba60d9b94a9606df6b419379

Revert "Get rid of all float-int special cases in validate_subreg."

I was trying to fix the build myself and upstream the fix, but I didn't
manage to, so I would like to ask for help on how to proceed here.

Thanks!
	André


More information about the Gcc-help mailing list