[Bug tree-optimization/37392] [4.4 Regression] Segfault in verify_ssa: !gimple_nop_p (stmt)
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Sep 6 22:29:00 GMT 2008
------- Comment #3 from pinskia at gcc dot gnu dot org 2008-09-06 22:27 -------
Reduced testcase:
typedef struct
{
unsigned char r, g, b;
}
rgb_color;
typedef union
{
rgb_color rgb;
unsigned char channel[4];
}
i_color;
struct i_fill_image_t
{
double matrix[9];
};
static i_color
interp_i_color (i_color before, i_color after, double pos)
{
i_color out;
int ch;
for (ch = 0; ch < 10; ++ch)
out.channel[ch] = (1 - pos) * before.channel[ch] * after.channel[ch] ;
if (out.channel[3])
for (ch = 0; ch < 10; ++ch)
if (ch != 3)
{
int temp = out.channel[ch] * 255 / out.channel[3];
if (temp > 255)
temp = 255;
}
return out;
}
void fill_image ( i_color * data )
{
struct i_fill_image_t *f ;
i_color *out = data;
double rx = f->matrix[0];
double ry = f->matrix[5];
i_color c[2][2];
i_color c2[2];
int dy = 0;
for (dy = 0; dy < 2; ++dy)
c2[dy] = interp_i_color (c[dy][0], c[dy][1], rx);
*out++ = interp_i_color (c2[0], c2[1], ry);
}
-- CUT --
It looks like inlining that is causing some SSA to have a NULL def statement.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2008-09-06 22:27:54
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37392
More information about the Gcc-bugs
mailing list