public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19148] New: ICE: gimplification failed
@ 2004-12-24 17:21 bugzilla-gcc at thewrittenword dot com
  2004-12-24 17:22 ` [Bug c++/19148] " bugzilla-gcc at thewrittenword dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2004-12-24 17:21 UTC (permalink / raw)
  To: gcc-bugs

$ uname -a
SunOS poog 5.9 Generic_117171-12 sun4u sparc SUNW,Sun-Fire-V250
$ gcc -v
Using built-in specs.
Configured with: /opt/build/gcc-4.0/configure --enable-nls
--with-included-gettext --enable-shared --enable-libgcj --disable-multilib
--enable-threads --datadir=/opt/TWWfsw/gcc40/share
--with-local-prefix=/opt/TWWfsw/gcc40 --prefix=/opt/TWWfsw/gcc40
Thread model: posix
gcc version 4.0.0 20041224 (experimental)
$ g++ -c -isystem /usr/openwin/include -I/opt/TWWfsw/jpeg/include
-I/opt/TWWfsw/libmng10/include -I/opt/TWWfsw/libpng12/include
-I/opt/TWWfsw/zlib11/include -I/opt/TWWfsw/fcpackage22/include
-I/opt/TWWfsw/libttf21/include -fno-exceptions -Wall -W -g -D_REENTRANT -fPIC
-DQT_SHARED -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_CUPS
-D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -DQT_NO_XINERAMA
-DQT_NO_XCURSOR -DQT_NO_XRANDR -DQT_BUILTIN_GIF_READER=1 -DQT_NO_STYLE_MAC
-DQT_NO_STYLE_AQUA -DQT_NO_STYLE_INTERLACE -DQT_NO_STYLE_WINDOWSXP
-DQT_NO_STYLE_COMPACT -DQT_NO_STYLE_POCKETPC
-I/opt/build/qt-x11-free-3.3.2/mkspecs/solaris-g++ -I.
-I/opt/TWWfsw/libttf21/include/freetype2 -I3rdparty/opentype -I../include
-I/usr/openwin/share/include -I.moc/release-shared-mt/ -o
.obj/release-shared-mt/qisciicodec.o codecs/qisciicodec.cpp
gimplification failed:
*uc.130 <indirect_ref fe1a6360
    type <record_type fe39b770 QChar addressable asm_written needs-constructing
type_1 type_5 type_6 BLK
        size <integer_cst ff004360 constant invariant 16>
        unit size <integer_cst ff004380 constant invariant 2>
        align 16 symtab -29783952 alias set -1
        fields <var_decl fe39f0e0 null type <record_type fe39e438 QChar>
            readonly addressable used public static external nonlocal decl_3
decl_5 decl_6 BLK file ../include/qstring.h line 85 size <integer_cst ff004360
16> unit size <integer_cst ff004380 2>
            align 16 context <record_type fe39b770 QChar>
            chain <var_decl fe39f158 replacement>>
       needs-constructor X() has-type-conversion X(constX&) this=(X&)
n_parents=0 use_template=0 interface-unknown
        pointer_to_this <pointer_type fe39bab8> reference_to_this
<reference_type fed85248> chain <type_decl fe39b860 QChar>>
   
    arg 0 <var_decl fe1a5950 uc.130
        type <pointer_type fe39bab8 type <record_type fe39b770 QChar>
            asm_written public unsigned SI
            size <integer_cst ff0044a0 constant invariant 32>
            unit size <integer_cst ff004160 constant invariant 4>
            align 32 symtab -29702272 alias set -1>
        used unsigned ignored SI file codecs/qisciicodec.cpp line 222 size
<integer_cst ff0044a0 32> unit size <integer_cst ff004160 4>
        align 32 context <function_decl fe184780 toUnicode>
        chain <var_decl fe1a58d8 type <integer_type ff0cdd88 uchar>
            used unsigned ignored QI file codecs/qisciicodec.cpp line 220
            size <integer_cst ff004200 constant invariant 8>
            unit size <integer_cst ff004220 constant invariant 1>
            align 8 context <function_decl fe184780 toUnicode> chain <var_decl
fe1a5860>>>>
codecs/qisciicodec.cpp: In member function 'virtual QString
QIsciiCodec::toUnicode(const char*, int) const':
codecs/qisciicodec.cpp:222: internal compiler error: gimplification failed

-- 
           Summary: ICE: gimplification failed
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bugzilla-gcc at thewrittenword dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.9
  GCC host triplet: sparc-sun-solaris2.9
GCC target triplet: sparc-sun-solaris2.9


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
@ 2004-12-24 17:22 ` bugzilla-gcc at thewrittenword dot com
  2004-12-24 17:47 ` [Bug c++/19148] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bugzilla-gcc at thewrittenword dot com @ 2004-12-24 17:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bugzilla-gcc at thewrittenword dot com  2004-12-24 17:22 -------
Created an attachment (id=7825)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7825&action=view)
.ii file of source


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] [4.0 Regression] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
  2004-12-24 17:22 ` [Bug c++/19148] " bugzilla-gcc at thewrittenword dot com
@ 2004-12-24 17:47 ` pinskia at gcc dot gnu dot org
  2004-12-24 17:59 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-24 17:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-24 17:47 -------
This is a very recent regression.
It worked with 20041216 but fails with 20041223.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mmitchel at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |critical
           Keywords|                            |ice-on-valid-code
            Summary|ICE: gimplification failed  |[4.0 Regression] ICE:
                   |                            |gimplification failed
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] [4.0 Regression] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
  2004-12-24 17:22 ` [Bug c++/19148] " bugzilla-gcc at thewrittenword dot com
  2004-12-24 17:47 ` [Bug c++/19148] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-12-24 17:59 ` pinskia at gcc dot gnu dot org
  2004-12-24 18:05 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-24 17:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-24 17:59 -------
Reduced testcase:
struct QChar {
    QChar( char c );
    QChar( const QChar& c );
    unsigned short ucs;
} ;
void f(QChar *uc, unsigned short ch, QChar replacement)
{
  *uc++ = ((ch) ? QChar((1)) : replacement);
}


I think this was caused by:
2004-12-23  Mark Mitchell  <mark@codesourcery.com>

        PR c++/16405
        * gimplify.c (gimplify_modify_expr_rhs): Handle
        INDIRECT_REF/ADDR_EXPR combinations.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-24 17:59:36
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] [4.0 Regression] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
                   ` (2 preceding siblings ...)
  2004-12-24 17:59 ` pinskia at gcc dot gnu dot org
@ 2004-12-24 18:05 ` pinskia at gcc dot gnu dot org
  2004-12-24 20:26 ` mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-24 18:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-24 18:05 -------
It also worked with 20041221.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] [4.0 Regression] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
                   ` (3 preceding siblings ...)
  2004-12-24 18:05 ` pinskia at gcc dot gnu dot org
@ 2004-12-24 20:26 ` mmitchel at gcc dot gnu dot org
  2004-12-24 20:28 ` mark at codesourcery dot com
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-12-24 20:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-12-24 20:26 -------
The front end is generating as the RHS:

  (INDIRECT_REF
   (NOP_EXPR
    (ADDR_EXPR
     (TARGET_EXPR
      (COND_EXPR
       ...)))

which seems reasonable.  The LHS is:

  (INDIRECT_REF
   (SAVE_EXPR
    (POSTINCREMENT_EXPR
     (PARM_DECL))))

which also seems reasonable.

Due to my patch, we now call gimplify_cond_expr on the RHS, with the "target"
parameter non-NULL.  That causes us to call gimplify_expr on the LHS, with
fb_lvalue, which aborts, because the gimplifier doesn't have a good place to put
the post-increment.

Adding a post_p parameter to gimplify_cond_expr fixes the problem (and passing
it down to gimplify_expr) fixes the problem.  

Is there any reason that's not a bad idea?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at redhat dot com, rth
                   |                            |at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] [4.0 Regression] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
                   ` (4 preceding siblings ...)
  2004-12-24 20:26 ` mmitchel at gcc dot gnu dot org
@ 2004-12-24 20:28 ` mark at codesourcery dot com
  2004-12-24 20:32 ` jason at redhat dot com
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mark at codesourcery dot com @ 2004-12-24 20:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mark at codesourcery dot com  2004-12-24 20:28 -------
Subject: Re:  [4.0 Regression] ICE: gimplification failed

mmitchel at gcc dot gnu dot org wrote:

> Is there any reason that's not a bad idea?

s|bad|good



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] [4.0 Regression] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
                   ` (5 preceding siblings ...)
  2004-12-24 20:28 ` mark at codesourcery dot com
@ 2004-12-24 20:32 ` jason at redhat dot com
  2004-12-24 20:33 ` rth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jason at redhat dot com @ 2004-12-24 20:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jason at redhat dot com  2004-12-24 20:32 -------
Subject: Re:  [4.0 Regression] ICE: gimplification failed

On 24 Dec 2004 20:26:38 -0000, "mmitchel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> wrote:

> Adding a post_p parameter to gimplify_cond_expr fixes the problem (and passing
> it down to gimplify_expr) fixes the problem.  
>
> Is there any reason that's not a bad idea?

Makes sense to me.

Jason


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] [4.0 Regression] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
                   ` (6 preceding siblings ...)
  2004-12-24 20:32 ` jason at redhat dot com
@ 2004-12-24 20:33 ` rth at gcc dot gnu dot org
  2004-12-25 18:49 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-12-24 20:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2004-12-24 20:33 -------
Nope.  The reason it doesn't have the parameter now is because it didn't use it,
and for private functions missing parameters are superior to ATTRIBUTE_UNUSED.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|rth at redhat dot com       |rth at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] [4.0 Regression] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
                   ` (7 preceding siblings ...)
  2004-12-24 20:33 ` rth at gcc dot gnu dot org
@ 2004-12-25 18:49 ` pinskia at gcc dot gnu dot org
  2004-12-25 18:50 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-25 18:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-25 18:49 -------
*** Bug 19153 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bero at arklinux dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] [4.0 Regression] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
                   ` (8 preceding siblings ...)
  2004-12-25 18:49 ` pinskia at gcc dot gnu dot org
@ 2004-12-25 18:50 ` pinskia at gcc dot gnu dot org
  2004-12-27 16:06 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-25 18:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-25 18:50 -------
P1 since this blocks QT.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] [4.0 Regression] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
                   ` (10 preceding siblings ...)
  2004-12-27 16:06 ` mmitchel at gcc dot gnu dot org
@ 2004-12-27 16:06 ` cvs-commit at gcc dot gnu dot org
  2004-12-27 16:14 ` cvs-commit at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-27 16:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-12-27 16:06 -------
Subject: Bug 19148

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-12-27 16:06:15

Modified files:
	gcc            : ChangeLog gimplify.c 

Log message:
	PR c++/19148
	* gimplify.c (gimplify_cond_expr): Add post_p parameter.
	(gimplify_modify_expr_rhs): Adjust call to gimplify_cond_expr.
	(gimplify_expr): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6961&r2=2.6962
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/gimplify.c.diff?cvsroot=gcc&r1=2.98&r2=2.99



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] [4.0 Regression] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
                   ` (9 preceding siblings ...)
  2004-12-25 18:50 ` pinskia at gcc dot gnu dot org
@ 2004-12-27 16:06 ` mmitchel at gcc dot gnu dot org
  2004-12-27 16:06 ` cvs-commit at gcc dot gnu dot org
  2004-12-27 16:14 ` cvs-commit at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-12-27 16:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-12-27 16:06 -------
Fixed in GCC 4.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/19148] [4.0 Regression] ICE: gimplification failed
  2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
                   ` (11 preceding siblings ...)
  2004-12-27 16:06 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-27 16:14 ` cvs-commit at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-27 16:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-12-27 16:13 -------
Subject: Bug 19148

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-12-27 16:13:45

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/expr: cond7.C 

Log message:
	PR c++/19148
	* g++.dg/expr/cond7.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4820&r2=1.4821
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/cond7.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19148


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-12-27 16:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-24 17:21 [Bug c++/19148] New: ICE: gimplification failed bugzilla-gcc at thewrittenword dot com
2004-12-24 17:22 ` [Bug c++/19148] " bugzilla-gcc at thewrittenword dot com
2004-12-24 17:47 ` [Bug c++/19148] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-12-24 17:59 ` pinskia at gcc dot gnu dot org
2004-12-24 18:05 ` pinskia at gcc dot gnu dot org
2004-12-24 20:26 ` mmitchel at gcc dot gnu dot org
2004-12-24 20:28 ` mark at codesourcery dot com
2004-12-24 20:32 ` jason at redhat dot com
2004-12-24 20:33 ` rth at gcc dot gnu dot org
2004-12-25 18:49 ` pinskia at gcc dot gnu dot org
2004-12-25 18:50 ` pinskia at gcc dot gnu dot org
2004-12-27 16:06 ` mmitchel at gcc dot gnu dot org
2004-12-27 16:06 ` cvs-commit at gcc dot gnu dot org
2004-12-27 16:14 ` cvs-commit at gcc dot gnu dot org

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).