This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32140] [4.3 Regression] Miscompilation with -O1
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2007 21:45:24 -0000
- Subject: [Bug fortran/32140] [4.3 Regression] Miscompilation with -O1
- References: <bug-32140-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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