------- Comment #16 from pinskia at gcc dot gnu dot org 2007-06-17 21:45 ------- I was wrong in marking this as a middle-end issue. We have: char[0:D.1026][1:4] * __result.0; char * temp.87; ... temp.87 = &(*__result.0)[0]; __builtin_memset (temp.87 + (<unnamed-unsigned:32>) _s1, 32, 4 - _s1); ----------- cut ----------
The midde-end thinks it can combine &(*__result.0)[0] + (<unnamed-unsigned:32>) _s1 to just &(*__result.0)[(<unnamed-unsigned:32>) _s1] when it should have combined it to &(*__result.0)[0][(<unnamed-unsigned:32>) _s1] So &(*__result.0)[0] is wrong, it should have been: &(*__result.0)[0][0]. Let me see if I can figure out where to fix the front-end. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Component|middle-end |fortran http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32140