public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/12072] New: set constants generate wrong code
@ 2003-08-26 22:51 hebisch at math dot uni dot wroc dot pl
  2003-08-27 15:46 ` [Bug middle-end/12072] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hebisch at math dot uni dot wroc dot pl @ 2003-08-26 22:51 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: set constants generate wrong code
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hebisch at math dot uni dot wroc dot pl
                CC: gcc-bugs at gcc dot gnu dot org

Backend tries to emit identical constants only once, however the
test for equality in reversed (negated), so two constants are
unified when hashes are equal and constants are not equal. The
problem affects GNU Pascal (IMHO "standard" frontends do not use
sets so problem can not be reproduced with them). The following
patch fixes the problem:
--- gcc.orig/varasm.c   Sat Aug 16 19:06:03 2003
+++ gcc/varasm.c        Sat Aug 16 19:04:13 2003
@@ -2411,7 +2411,7 @@
          if (get_set_constructor_bytes (t2, tmp2, len) != NULL_TREE)
            return 0;

-         return memcmp (tmp1, tmp2, len) != 0;
+         return memcmp (tmp1, tmp2, len) == 0;
        }
       else
        {


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

end of thread, other threads:[~2003-12-09 18:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-26 22:51 [Bug middle-end/12072] New: set constants generate wrong code hebisch at math dot uni dot wroc dot pl
2003-08-27 15:46 ` [Bug middle-end/12072] " pinskia at gcc dot gnu dot org
2003-10-02 14:29 ` hebisch at math dot uni dot wroc dot pl
2003-10-02 14:56 ` zlomek at gcc dot gnu dot org
2003-12-09 18:19 ` dhazeghi at yahoo dot com

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