public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/23567] New: [3.4/4.0 regression] if-conversion causes wrong code
@ 2005-08-25 21:44 belyshev at depni dot sinp dot msu dot ru
  2005-08-25 22:12 ` [Bug rtl-optimization/23567] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2005-08-25 21:44 UTC (permalink / raw)
  To: gcc-bugs

This patch:

2003-11-02  Roger Sayle  <roger@eyesopen.com>

	PR optimization/10817
	* ifcvt.c (noce_emit_move_insn): Improve documentation comment.
	(noce_try_move): New function to optimize an if-the-else into an
	unconditional move, i.e. "if (a!=b) x=a; else x=b" into "x=a".
	(noce_process_if_block): Attempt simplification with noce_try_move.

causes wrong codegen for this testcase, (taken from debian bug #325050, see
bugs.debian.org/cgi-bin/bugreport.cgi?bug=325050 )

-----------------------------
struct
{
  int len;
  char *name;
} s;

int main (void)
{
  s.len = 0;
  s.name = "";
  if (s.name [s.len] != 0)
    s.name [s.len] = 0;
  return 0;
}
-----------------------------

This looks very similar to PR 13400.

-- 
           Summary: [3.4/4.0 regression] if-conversion causes wrong code
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belyshev at depni dot sinp dot msu dot ru
                CC: gcc-bugs at gcc dot gnu dot org,sayle at gcc dot gnu dot
                    org


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


^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <bug-23567-7958@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2005-11-07 13:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-25 21:44 [Bug rtl-optimization/23567] New: [3.4/4.0 regression] if-conversion causes wrong code belyshev at depni dot sinp dot msu dot ru
2005-08-25 22:12 ` [Bug rtl-optimization/23567] " pinskia at gcc dot gnu dot org
2005-08-25 23:23 ` [Bug rtl-optimization/23567] [3.4/4.0/4.1 " pinskia at gcc dot gnu dot org
2005-08-29  9:44 ` debian-gcc at lists dot debian dot org
2005-08-29 17:40 ` jakub at gcc dot gnu dot org
2005-09-27 16:15 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-23567-7958@http.gcc.gnu.org/bugzilla/>
2005-10-22 21:56 ` pinskia at gcc dot gnu dot org
2005-10-25 16:24 ` steven at gcc dot gnu dot org
2005-10-31  5:39 ` mmitchel at gcc dot gnu dot org
2005-11-03 21:00 ` steven at gcc dot gnu dot org
2005-11-04 10:52 ` jakub at gcc dot gnu dot org
2005-11-07  8:02 ` jakub at gcc dot gnu dot org
2005-11-07  8:28 ` jakub at gcc dot gnu dot org
2005-11-07 13:17 ` pinskia at gcc dot gnu dot 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).