This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/32191] ICE with complex __float128
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jun 2007 12:27:32 -0000
- Subject: [Bug target/32191] ICE with complex __float128
- References: <bug-32191-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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