This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/26300] [4.1 Regression] ICE in trunc_int_for_mode
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Feb 2006 14:56:01 -0000
- Subject: [Bug middle-end/26300] [4.1 Regression] ICE in trunc_int_for_mode
- References: <bug-26300-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jakub at gcc dot gnu dot org 2006-02-15 14:55 -------
Well, undefined behavior only if you reach it.
The original code looked like:
if (((type) == (Qnothing)))
return IMAGE_NOTHING;
if (((type) == (Qtext)))
return IMAGE_TEXT;
if (((type) == (Qmono_pixmap)))
return IMAGE_MONO_PIXMAP;
if (((type) == (Qcolor_pixmap)))
return IMAGE_COLOR_PIXMAP;
if (((type) == (Qpointer)))
return IMAGE_POINTER;
if (((type) == (Qsubwindow)))
return IMAGE_SUBWINDOW;
if (((type) == (Qwidget)))
return IMAGE_WIDGET;
maybe_signal_simple_error("Invalid image-instance type", type,
Qimage, errb);
return IMAGE_UNKNOWN;
where IMAGE_UNKNOWN is 0, guess the authors just assume this will never happen.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26300