This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/47150] [4.5/4.6 Regression] ICE in gimplify_expr at gimplify.c
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 3 Jan 2011 11:16:51 +0000
- Subject: [Bug c/47150] [4.5/4.6 Regression] ICE in gimplify_expr at gimplify.c
- Auto-submitted: auto-generated
- References: <bug-47150-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47150
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-03 11:16:35 UTC ---
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
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.