[PATCH, c]: Fix PR32191, sefgault for complex multc3 (and divtc3) for -std=c99
Uros Bizjak
ubizjak@gmail.com
Mon Jun 4 17:40:00 GMT 2007
Hello!
As described in PR32191, we currently segfault when composing call to
complex __multc3/__divtc3 functions for target-defined FP modes (i.e.
__float128 in x86_64 case). The problem is, that these calls are created
in build_common_build_nodes() which calls c_common_type_for_node().
However, target dependent modes are created in init_builtins() target
hook that is called just _after_ the call to build_common_builtin_nodes().
The fix is simple and straightforward. Put the call to init_builtins()
target hook in front of the call to build_common_build_nodes().
Attached patch was bootstrapped on x86_64-pc-linux-gnu for all default
languages; regression testing is in progress, but all interesting cases
have already been passed.
OK for mainline if regtest pass?
2007-06-04 Uros Bizjak <ubizjak@gmail.com>
PR c/32191
* gcc/c-common.c (c_define_builtins): Call targetm.init_builtins ()
before build_common_builtin_nodes ().
testsuite/ChangeLog:
2007-06-04 Uros Bizjak <ubizjak@gmail.com>
PR c/32191
* gcc.dg/pr32191.c: New test.
BTW: This patch fixes the ICE, but we still need to create __multc3 and
__divtc3 support functions. We can put them into soft-fp directory to be
shared between other targets (and we are free to put TFmode/TCmode
functions into gcc's soft-fp local directory). This will be a follow-up
patch.
Uros.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr32191.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070604/6f84e049/attachment.txt>
More information about the Gcc-patches
mailing list