I tried to rebuild for target pdp11 with fortran enabled (in the past I've just
enabled C). It builds fine but the resulting compiler crashes at startup:
Paul-Konings-MacBook-Pro:gcc pkoning$ ./xgcc -B. -O2 -S ../../hello.f
f951: internal compiler error: gfc_validate_kind(): Got bad kind
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
"hello.f" is the typical "hello world" program. Some debugging got me to here:
* thread #1, queue = 'com.apple.main-thread', stop reason = step over
frame #0: 0x00000001001c1c93 f951`gfc_init_kinds() [inlined]
gfc_validate_kind(type=BT_REAL, kind=<unavailable>, may_fail=false) at
813 if (rc < 0 && !may_fail)
-> 814 gfc_internal_error ("gfc_validate_kind(): Got bad kind");
816 return rc;
Target 0: (f951) stopped.
So it's unhappy about some "kind", for BT_REAL. I'm not sure what that means.
Is it mapping the available data types to Fortran "KIND" values? If so, is
there something the target has to do for this to work? Note that this isn't an
IEEE target, so if the initialization is expecting IEEE float then that may
account for it. But I have no idea what to do here, and the manual offers no