This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

REAL_MODE_FORMAT and real_format_for_mode


Hi,

I would like to know more about REAL_MODE_FORMAT and real_format_for_mode.

I am working on a port of GCC. The new xgcc generated crashes this way :
Program received signal SIGSEGV, Segmentation fault.
builtin_define_float_constants (name_prefix=0x83fcaf9 "FLT",
fp_suffix=0x8419523 "F", fp_cast=0x84109dd "%s", type=0xb7c0a410) at
../../gcc-4.3.3/gcc/c-cppbuiltin.c:108
108       gcc_assert (fmt->b != 10);

because fmt = 0.

This fmt results of
 fmt = REAL_MODE_FORMAT (TYPE_MODE (type));

and REAL_MODE_FORMAT is defined this way :

#define REAL_MODE_FORMAT(MODE)                                          \
  (real_format_for_mode[DECIMAL_FLOAT_MODE_P (MODE)                     \
                        ? ((MODE - MIN_MODE_DECIMAL_FLOAT)              \
                           + (MAX_MODE_FLOAT - MIN_MODE_FLOAT + 1))     \
                        : (MODE - MIN_MODE_FLOAT)])

But I did not find definition for real_format_for_mode, just an
"extern" in real.h (nothing in real.c).

extern const struct real_format *
  real_format_for_mode[MAX_MODE_FLOAT - MIN_MODE_FLOAT + 1
                       + MAX_MODE_DECIMAL_FLOAT - MIN_MODE_DECIMAL_FLOAT + 1];


Should I include an implementation of real_format_for_mode in my
target.c ? If I should, how can I do that ?

Thank you.

Florent


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]