Bug 21248 - ICE in convert_move, at expr.c:339
Summary: ICE in convert_move, at expr.c:339
Status: RESOLVED DUPLICATE of bug 21173
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.1
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-04-27 10:35 UTC by Peter Wright
Modified: 2005-04-28 02:34 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.1.0 4.0.1
Known to fail: 4.0.0
Last reconfirmed: 2005-04-27 13:35:28


Attachments
The command line generating the error. (512 bytes, text/plain)
2005-04-27 10:39 UTC, Peter Wright
Details
Output as generated from command line. (1.14 KB, text/plain)
2005-04-27 10:39 UTC, Peter Wright
Details
preprocessed file (gzipped due to size - *.ii.gz) as required by bug-submit guidelines (187.66 KB, application/octet-stream)
2005-04-27 10:46 UTC, Peter Wright
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Wright 2005-04-27 10:35:36 UTC
Building kdelibs 3.4 with gcc 4.0.0 on i686-pc-linux-gnu.

Failed with "internal compiler error" on kimgio/exr.cpp.

Command line as follows:

/bin/sh ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I.
-I.. -I../dcop -I../kdecore -I../kio/kssl -I../kio -I../dcop -I../libltdl
-I../dcop -I../libltdl -I../kdefx -I../kdecore -I../kdecore -I../kdeui -I../kio
-I../kio/kio -I../kio/kfile -I.. -I/opt/qt/include -I/usr/X11R6/include
-I/opt/kde/include  -Drestrict= -I/usr/include/OpenEXR    -DQT_THREAD_SUPPORT 
-D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi
-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts
-Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -march=i686 -O2
-pipe -Wformat-security -Wmissing-format-attribute -fno-exceptions
-fno-check-new -fno-common -fno-exceptions -fno-check-new -fno-common
-fvisibility=hidden -fvisibility-inlines-hidden  -DQT_CLEAN_NAMESPACE
-DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -fexceptions
-c -o exr.lo exr.cpp -v -save-temps >& gcc4-bug-output.txt
Comment 1 Peter Wright 2005-04-27 10:39:13 UTC
Created attachment 8751 [details]
The command line generating the error.
Comment 2 Peter Wright 2005-04-27 10:39:52 UTC
Created attachment 8752 [details]
Output as generated from command line.
Comment 3 Peter Wright 2005-04-27 10:46:51 UTC
Created attachment 8753 [details]
preprocessed file (gzipped due to size - *.ii.gz) as required by bug-submit guidelines

Note: gzipped due to uncompressed size > 1 meg.
Comment 4 Andrew Pinski 2005-04-27 13:25:48 UTC
I cannot reproduce this on the mainline or "4.0.0 20050410",  I will build a 4.0.0 release later today, 
this might also be already fixed on the 4.0 branch too.
Comment 5 Richard Biener 2005-04-27 13:35:26 UTC
ICE in gcc/expr.c:3087

emit_move_insn is called with y == NULL.

#0  emit_move_insn (x=0x42dbc170, y=0x0)
    at /net/alwazn/home/rguenth/src/gcc/gcc4.0/gcc/expr.c:3087
#1  0x081d2ddc in convert_modes (mode=QImode, oldmode=SFmode, x=0x42dbc170, 
    unsignedp=0) at /net/alwazn/home/rguenth/src/gcc/gcc4.0/gcc/expr.c:800
#2  0x081d31a5 in convert_to_mode (mode=QImode, x=0xa, unsignedp=10)
    at /net/alwazn/home/rguenth/src/gcc/gcc4.0/gcc/expr.c:694
#3  0x081d43a2 in store_expr (exp=0x4021b6c0, target=0x42d8f660, 
    call_param_p=0) at /net/alwazn/home/rguenth/src/gcc/gcc4.0/gcc/expr.c:4181
#4  0x081d589e in expand_assignment (to=0x42db2000, from=0x5)
    at /net/alwazn/home/rguenth/src/gcc/gcc4.0/gcc/expr.c:3990
#5  0x081cc4b3 in expand_expr_real_1 (exp=Variable "exp" is not available.
)
    at /net/alwazn/home/rguenth/src/gcc/gcc4.0/gcc/expr.c:8136
#6  0x081cfa6e in expand_expr_real (exp=0x42daa9fc, target=0x40144210, 
    tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
    at /net/alwazn/home/rguenth/src/gcc/gcc4.0/gcc/expr.c:6358
#7  0x0832b796 in expand_expr_stmt (exp=0x42daa9fc)
    at /net/alwazn/home/rguenth/src/gcc/gcc4.0/gcc/expr.h:482
#8  0x0834fb15 in tree_expand_cfg ()
    at /net/alwazn/home/rguenth/src/gcc/gcc4.0/gcc/cfgexpand.c:1133
...
Comment 6 Serge Belyshev 2005-04-28 02:34:51 UTC
// reduced testcase, compile with -O1 -free-pre

template <class T> inline T klamp (T a, T l, T h)
{
    return (a < l)? l : ((a > h)? h : a);
}

int foo (char);

int f (void)
{
 float r;
 return foo (klamp (r * 1.1f, 0.f, 255.f));
}

reverting patch from bug 21173 exposes this bug, so this is a dup.

*** This bug has been marked as a duplicate of 21173 ***