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

* [Bug middle-end/12072] set constants generate wrong code
  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 ` pinskia at gcc dot gnu dot org
  2003-10-02 14:29 ` hebisch at math dot uni dot wroc dot pl
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-27 15:46 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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-08-27 15:46:20
               date|                            |


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-27 15:46 -------
I agree with you. Also GNU Pascal is should be a first-class citizen, any news on importing it in for 
3.5?
Could you post your patch on gcc-patches@ after reading http://gcc.gnu.org/contribute.html.


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

* [Bug middle-end/12072] set constants generate wrong code
  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
  3 siblings, 0 replies; 5+ messages in thread
From: hebisch at math dot uni dot wroc dot pl @ 2003-10-02 14:29 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



------- Additional Comments From hebisch at math dot uni dot wroc dot pl  2003-10-02 14:29 -------
I posted the patch as:
http://gcc.gnu.org/ml/gcc-patches/2003-08/msg01825.html
No reaction.
By the way, GPC to work correctly have to patch the backend, and
at least 7 patches can be classified as bug fixes. All deal with
constructs not used by "standard" backends.
I trying to bring GPC as close to GCC as possible, but the frontend
still needs some fixes to work really well with gcc-3.3 and
currently it barely compiles with gcc-3.4 snapshots.


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

* [Bug middle-end/12072] set constants generate wrong code
  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
  3 siblings, 0 replies; 5+ messages in thread
From: zlomek at gcc dot gnu dot org @ 2003-10-02 14:56 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


zlomek at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From zlomek at gcc dot gnu dot org  2003-10-02 14:56 -------
http://gcc.gnu.org/ml/gcc-patches/2003-10/msg00139.html


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

* [Bug middle-end/12072] set constants generate wrong code
  2003-08-26 22:51 [Bug middle-end/12072] New: set constants generate wrong code hebisch at math dot uni dot wroc dot pl
                   ` (2 preceding siblings ...)
  2003-10-02 14:56 ` zlomek at gcc dot gnu dot org
@ 2003-12-09 18:19 ` dhazeghi at yahoo dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-12-09 18:19 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4


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


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