------- Comment #8 from ubizjak at gmail dot com  2007-06-04 12:27 -------
A bit of debugging leads to following findings:

build_common_builtin_nodes() defines supported complex mul/div functions
depending on lang_hooks.types.type_for_mode(). This langhook defaults to
c_common_type_for_mode().

c_common_type_for_mode() as defined in c-common.c() handles complex modes by
breaking non-standard modes into fundamental type, passing them again through
c_common_type_for_node():

      inner_mode = GET_MODE_INNER (mode);
      inner_type = c_common_type_for_mode (inner_mode, unsignedp);
      if (inner_type != NULL_TREE)
        return build_complex_type (inner_type);

 If this fundamental type is non-standard, then:

  for (t = registered_builtin_types; t; t = TREE_CHAIN (t))
    if (TYPE_MODE (TREE_VALUE (t)) == mode)
      return TREE_VALUE (t);

and with returned fundamental type, we return build_complex_type (inner_type).

So the main problem is, that TFmode is not defined at this point. TFmode is
defined through targetm.init_builtins() target hook, and we call this target
hook just after the call to build_common_builtin_nodes().

Do we need to switch the calls at the end of c_define_builtins() function,
defined in c-common.c?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32191

Reply via email to