This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/32140] [4.3 Regression] Miscompilation with -O1



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]