------- Comment #3 from rguenth at gcc dot gnu dot org 2008-03-23 13:09 ------- -ftree-loop-linear has known problems that were addressed only in 4.3.0, so this is probably a dup of one of those.
Reduced testcase: static inline int min(const int x, const int y) { return (x <= y) ? x : y; } static inline int max(const int x, const int y) { return (y <= x) ? x : y; } struct GPixel { unsigned char b; unsigned char g; unsigned char r; }; void YCbCr_to_RGB(GPixel *p, int w, int h, int rowsize) { for (int i=0; i<h; i++,p+=rowsize) { GPixel *q = p; for (int j=0; j<w; j++,q++) { signed char y = ((signed char*)q)[0]; signed char b = ((signed char*)q)[1]; signed char r = ((signed char*)q)[2]; int t1 = b >> 2 ; int t2 = r + (r >> 1); int t3 = y + 128 - t1; int tr = y + 128 + t2; int tg = t3 - (t2 >> 1); int tb = t3 + (b << 1); q->r = max(0,min(255,tr)); q->g = max(0,min(255,tg)); q->b = max(0,min(255,tb)); } } } -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal Status|UNCONFIRMED |NEW Component|c++ |tree-optimization Ever Confirmed|0 |1 Keywords| |ice-on-valid-code Known to fail| |4.2.3 Known to work| |4.1.2 4.3.0 Last reconfirmed|0000-00-00 00:00:00 |2008-03-23 13:09:24 date| | Summary|GCC 4.2.3 ICE on valid code:|[4.2 Regression] GCC 4.2.3 |KDE 3.5.9 libdjvu |ICE on valid code: KDE 3.5.9 |compilation fails |libdjvu compilation fails Target Milestone|--- |4.2.4 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35672