https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119241

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #60817|0                           |1
        is obsolete|                            |

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 60819
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60819&action=edit
patch

This one builds, but it crashes immediately because there is runtime
initialization of

static const struct cbl_field_t empty_float = {
                                0, FldFloat, FldInvalid,
                                intermediate_e,
                                0, 0, 0, nonarray, 0, "",
                                0, cbl_field_t::linkage_t(),
                                {16, 16, 32, 0, NULL}, NULL };

which ends up trying to build a REAL_CST tree before anything is initialized
(in particular before float128_type_node is).  The {16, 16, 32, 0, NULL}
is the respective initializer which is triggering that particular
initialization.

Reverting back to NULL_TREE as default initializer and making get_value ()
build a zero would be a workaround.  Embedding REAL_VALUE_TYPE instead
of tree would be another.

That said, a good prerequesite for this whole change is to make the cobol
tree coretypes.h and tree.h safe, aka get rid of HOWEVER_GCC_DEFINES_TREE
and the possible C++ linkage issue having interfaces with 'tree' differently
mangled.

Reply via email to