public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/47150] [4.5/4.6 Regression] ICE in gimplify_expr at gimplify.c Date: Mon, 03 Jan 2011 16:22:00 -0000 [thread overview] Message-ID: <bug-47150-4-dDNAAmu1zG@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-47150-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47150 --- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-01-03 16:22:17 UTC --- On Mon, 3 Jan 2011, jakub at gcc dot gnu.org wrote: > The problem is in save_expr called by convert_to_complex when converting > non-COMPLEX_EXPR _Complex float expression to _Complex double. As this is not > c_save_expr that is called there (and can't, because convert_to_complex is used > in non-Cish FEs), c_fully_fold is not called on the argument and as further The non-C-family front ends seems generally to be using it in their implementations of "convert", the legacy magic-name langhook. If this could be eliminated (making remaining users in the language-independent compiler use fold_convert unless they really need language-specific semantics) then quite possibly the "convert" functions in those front ends could go away and much of convert.c could move into c-family code (it does checks for invalid conversions and gives errors for them, which is clearly something that belongs in front ends) - while some of those front ends use their own "convert" functions internally, they may well not need special semantics for complex types that fold_convert doesn't have. But this certainly isn't a Stage 4 fix.... > c_fully_fold doesn't dive into SAVE_EXPRs, nothing afterwards fully folds it > either, which means it survives until gimplification and crashes there. > > An ugly fix would be duplicate the problematic part of convert_to_complex in > c-convert.c (if converting COMPLEX_TYPE to a different COMPLEX_TYPE and > expression is not COMPLEX_EXPR) and use c_save_expr there instead. In view of the above and the notion that convert_to_complex really belongs in the front ends, this seems reasonable.
next prev parent reply other threads:[~2011-01-03 16:22 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-01-01 22:23 [Bug c/47150] New: 4.5.1/4.5.2 ICE in gimplify_expr, at gimplify.c:7146/7153 on fairly simple complex expression ewleaver at comcast dot net 2011-01-01 22:52 ` [Bug c/47150] " hjl.tools at gmail dot com 2011-01-01 22:57 ` [Bug c/47150] [4.5/4.6 Regression] ICE in gimplify_expr at gimplify.c hjl.tools at gmail dot com 2011-01-01 22:59 ` hjl.tools at gmail dot com 2011-01-03 11:16 ` jakub at gcc dot gnu.org 2011-01-03 16:22 ` joseph at codesourcery dot com [this message] 2011-01-03 21:44 ` [Bug middle-end/47150] " rguenth at gcc dot gnu.org 2011-01-03 21:53 ` [Bug c/47150] " jakub at gcc dot gnu.org 2011-01-05 13:31 ` jakub at gcc dot gnu.org 2011-01-06 11:07 ` jakub at gcc dot gnu.org 2011-01-06 11:18 ` [Bug c/47150] [4.5 " jakub at gcc dot gnu.org 2011-01-16 20:36 ` jakub at gcc dot gnu.org 2011-01-17 8:08 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-47150-4-dDNAAmu1zG@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).