public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/54963] New: Wrong code generated for libgfortran/generated/eoshift3_8.c on SH
@ 2012-10-17 23:49 kkojima at gcc dot gnu.org
  2012-10-20  6:33 ` [Bug target/54963] [4.8 Regression] " kkojima at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: kkojima at gcc dot gnu.org @ 2012-10-17 23:49 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54963

             Bug #: 54963
           Summary: Wrong code generated for
                    libgfortran/generated/eoshift3_8.c on SH
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kkojima@gcc.gnu.org
            Target: sh*-*-*


Created attachment 28469
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28469
A test case

Several fortran tests using some eoshift functions fail on
sh4-unknown-linux-gnu for a while.  The above test case is
a reduced one which fails sh-elf with -O2 -ml -m4.  The right
result would be "adhbeh..." but it wrongly returns "ticzzz...".
It seems that the compiler allocates a stack slot at r15+60
for "len" variable first for the line 126:

   len = ((array)->dim[dim]._ubound + 1 - (array)->dim[dim].lower_bound);

then computes len - abs (sh) for the line 184;

   for (n = 0; n < len - delta; n++)

using "len" variable at r15+68.  The error went away with
-fno-ira-share-spill-slots.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-11-01  0:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-17 23:49 [Bug middle-end/54963] New: Wrong code generated for libgfortran/generated/eoshift3_8.c on SH kkojima at gcc dot gnu.org
2012-10-20  6:33 ` [Bug target/54963] [4.8 Regression] " kkojima at gcc dot gnu.org
2012-10-20  9:29 ` olegendo at gcc dot gnu.org
2012-10-28 23:01 ` olegendo at gcc dot gnu.org
2012-10-29  0:59 ` kkojima at gcc dot gnu.org
2012-10-29 11:13 ` olegendo at gcc dot gnu.org
2012-10-30  1:04 ` olegendo at gcc dot gnu.org
2012-10-30  2:46 ` kkojima at gcc dot gnu.org
2012-10-30  9:23 ` olegendo at gcc dot gnu.org
2012-11-01  0:01 ` olegendo at gcc dot gnu.org
2012-11-01  0:13 ` kkojima at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).