Bug 37819 - [4.4 Regression] ice for bitfield code
Summary: [4.4 Regression] ice for bitfield code
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: 4.4.0
Assignee: Jakub Jelinek
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2008-10-13 20:08 UTC by David Binderman
Modified: 2008-10-14 21:59 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-10-14 08:54:24


Attachments
C++ source code (326.64 KB, application/octet-stream)
2008-10-13 20:09 UTC, David Binderman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2008-10-13 20:08:40 UTC
I just tried to compile the Suse Linux package kmymoney-0.8.9-23
with the new gcc version 4.4, snapshot dated 20081010.

The compiler said

kmymoneyaccountselector.cpp: In member function 'bool kMyMoneyCheckListItem::isAlternate()':
kmymoneyaccountselector.cpp:149: internal compiler error: in cp_genericize_r, at cp/cp-gimplify.c:823
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Preprocessed source code attached. No special flags required.
Comment 1 David Binderman 2008-10-13 20:09:56 UTC
Created attachment 16489 [details]
C++ source code
Comment 2 Andrew Pinski 2008-10-13 22:19:28 UTC
Reducing ...
Comment 3 Andrew Pinski 2008-10-13 22:30:57 UTC
Reduced testcase:
struct kMyMoneyCheckListItem
{
   unsigned int m_known : 1;
 };
bool
isAlternate(kMyMoneyCheckListItem *a, kMyMoneyCheckListItem *above)
{
   a->m_known = above ? above->m_known : true;
}

--- CUT ---
Looks like it was caused by:
2008-10-10  Jakub Jelinek  <jakub@redhat.com>

        PR c++/37146
        * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
        COND_EXPR.
Comment 4 Jakub Jelinek 2008-10-14 21:59:17 UTC
Subject: Bug 37819

Author: jakub
Date: Tue Oct 14 21:57:44 2008
New Revision: 141118

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141118
Log:
	PR c++/37819
	* cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
	arguments if they don't already have COND_EXPR's type.

	* g++.dg/expr/bitfield11.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/expr/bitfield11.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-gimplify.c
    trunk/gcc/testsuite/ChangeLog

Comment 5 Jakub Jelinek 2008-10-14 21:59:50 UTC
Fixed.