public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/53908] New: [4.7 Regression] csa removes needed memory load
@ 2012-07-10  3:06 hp at gcc dot gnu.org
  2012-07-10  9:05 ` [Bug rtl-optimization/53908] " mikpe at it dot uu.se
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: hp at gcc dot gnu.org @ 2012-07-10  3:06 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53908
           Summary: [4.7 Regression] csa removes needed memory load
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hp@gcc.gnu.org
              Host: x86_64-linux
            Target: x86_64-linux-gnu, cris-axis-elf,
                    crisv32-axis-linux-gnu


Created attachment 27768
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27768
Repeat with e.g. cc1 -O2 ba2.c

Observed with gcc-4_7-branch revision 189394.
The attached test-case calls
is_basic(user_name) < 0 && is_digest(user_name) < 0
with *user_name = NULL.
The call to is_basic "fails"; returns < 0 without writing to *user_name.
The call to is_digest is successful and furthermore writes *user_name (a char
**).  Next, *user_item = find_user(*user_name) is called, but the load of
*user_name after the is_digest call is lost; wrongly eliminated in favor of the
load after the call to is_basic.

A dump shows wrong code first in the ".207r.csa" pass (for
crisv32-axis-linux-gnu, likely for x86_64 as well).

The test-case does not expose the bug on trunk r189401.
Not observed with a gcc-4.3-based toolchain (cris-*), not observed with (host)
"Debian 4.4.5-8". Unknown 4.5, 4.6.


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

end of thread, other threads:[~2012-11-08 22:23 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10  3:06 [Bug rtl-optimization/53908] New: [4.7 Regression] csa removes needed memory load hp at gcc dot gnu.org
2012-07-10  9:05 ` [Bug rtl-optimization/53908] " mikpe at it dot uu.se
2012-07-10  9:09 ` rguenth at gcc dot gnu.org
2012-07-10 10:11 ` mikpe at it dot uu.se
2012-07-10 17:03 ` hp at gcc dot gnu.org
2012-07-10 19:55 ` mikpe at it dot uu.se
2012-07-10 22:50 ` [Bug rtl-optimization/53908] [4.6/4.7 " mikpe at it dot uu.se
2012-07-11  6:27 ` hjl.tools at gmail dot com
2012-07-11  8:05 ` hjl.tools at gmail dot com
2012-07-11  9:46 ` mikpe at it dot uu.se
2012-07-11 12:38 ` hjl.tools at gmail dot com
2012-07-13  6:53 ` hp at gcc dot gnu.org
2012-07-13  8:53 ` hp at gcc dot gnu.org
2012-07-13  8:59 ` hp at gcc dot gnu.org
2012-07-13 17:22 ` hp at gcc dot gnu.org
2012-07-13 17:23 ` hp at gcc dot gnu.org
2012-07-13 17:27 ` hp at gcc dot gnu.org
2012-07-13 17:39 ` [Bug rtl-optimization/53908] [4.6 " steven at gcc dot gnu.org
2012-07-13 17:41 ` steven at gcc dot gnu.org
2012-07-13 19:05 ` steven at gcc dot gnu.org
2012-07-13 19:10 ` hp at gcc dot gnu.org
2012-07-16  9:36 ` steven at gcc dot gnu.org
2012-11-08 22:23 ` steven 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).