public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/11068] New: GCC 3.2.X miscompiles Firebird 1.5 with -O1
@ 2003-06-02 20:52 skidder@bssys.com
  2003-06-02 21:12 ` [Bug optimization/11068] " dhazeghi@yahoo.com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: skidder@bssys.com @ 2003-06-02 20:52 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=11068

           Summary: GCC 3.2.X miscompiles Firebird 1.5 with -O1
           Product: gcc
           Version: 3.2.2
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P4
         Component: optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: skidder@bssys.com
                CC: gcc-bugs@gcc.gnu.org
 GCC build triplet: i586-pc-linux-gnu
  GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu

Problem is reproducable using GCC 3.2.1 or 3.2.3 on 
Mandrake 8.0 with GLIBC 2.3.1

Here is the testcase:
=== test.cpp =====================
#include <stdio.h>

#define USHORT unsigned short
#define UCHAR unsigned char

USHORT get_numeric() {
        return 42388;
}

int main ()
{
USHORT          length, l;
UCHAR           *buffer, static_buffer [1024];

length = (USHORT)get_numeric();

/* Allocate blob buffer is static buffer is too short */

if (!length || length + 1 <= (USHORT)(sizeof (static_buffer)) ) {
    buffer = static_buffer;
        printf("Shit happened !");
}
else
    {
        printf("Works fine");
    l = length + 1;
//    buffer = BURP_ALLOC (l);
        return 1;
    }

}
========================
g++ test.cpp
./a.out
Works fine
========================
g++ -O1 test.cpp
./a.out
Shit happened !
========================



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug optimization/11068] GCC 3.2.X miscompiles Firebird 1.5 with -O1
  2003-06-02 20:52 [Bug optimization/11068] New: GCC 3.2.X miscompiles Firebird 1.5 with -O1 skidder@bssys.com
@ 2003-06-02 21:12 ` dhazeghi@yahoo.com
  2003-06-03  9:16 ` skidder@bssys.com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: dhazeghi@yahoo.com @ 2003-06-02 21:12 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=11068


dhazeghi@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From dhazeghi@yahoo.com  2003-06-02 21:12 -------
Hello,

with gcc 3.2, your testcase fails. With gcc 3.3 branch and mainline (20030512), it appears to work 
fine, on my i686-pc-linux-gnu system. Can you verify whether gcc 3.3 fixes the problem for you? 
Thanks,

Dara



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug optimization/11068] GCC 3.2.X miscompiles Firebird 1.5 with -O1
  2003-06-02 20:52 [Bug optimization/11068] New: GCC 3.2.X miscompiles Firebird 1.5 with -O1 skidder@bssys.com
  2003-06-02 21:12 ` [Bug optimization/11068] " dhazeghi@yahoo.com
@ 2003-06-03  9:16 ` skidder@bssys.com
  2003-06-03 10:36 ` dhazeghi@yahoo.com
  2004-04-21  1:12 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: skidder@bssys.com @ 2003-06-03  9:16 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=11068



------- Additional Comments From skidder@bssys.com  2003-06-03 09:16 -------
Users report that GCC 3.3 (from SuSE unstable) really fixes the problem.
We'll try to switch to 3.3 then. Sorry for the disturbance.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug optimization/11068] GCC 3.2.X miscompiles Firebird 1.5 with -O1
  2003-06-02 20:52 [Bug optimization/11068] New: GCC 3.2.X miscompiles Firebird 1.5 with -O1 skidder@bssys.com
  2003-06-02 21:12 ` [Bug optimization/11068] " dhazeghi@yahoo.com
  2003-06-03  9:16 ` skidder@bssys.com
@ 2003-06-03 10:36 ` dhazeghi@yahoo.com
  2004-04-21  1:12 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: dhazeghi@yahoo.com @ 2003-06-03 10:36 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=11068


dhazeghi@yahoo.com changed:

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


------- Additional Comments From dhazeghi@yahoo.com  2003-06-03 10:36 -------
Confirmed fixed on 3.3 by submitter's users. Closed. If it turns out there are 
other firebird related compilation problems with gcc 3.3, by all means submits 
bug reports for them.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug optimization/11068] GCC 3.2.X miscompiles Firebird 1.5 with -O1
  2003-06-02 20:52 [Bug optimization/11068] New: GCC 3.2.X miscompiles Firebird 1.5 with -O1 skidder@bssys.com
                   ` (2 preceding siblings ...)
  2003-06-03 10:36 ` dhazeghi@yahoo.com
@ 2004-04-21  1:12 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-21  1:12 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.0                       |3.3


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


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

end of thread, other threads:[~2004-04-21  1:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-02 20:52 [Bug optimization/11068] New: GCC 3.2.X miscompiles Firebird 1.5 with -O1 skidder@bssys.com
2003-06-02 21:12 ` [Bug optimization/11068] " dhazeghi@yahoo.com
2003-06-03  9:16 ` skidder@bssys.com
2003-06-03 10:36 ` dhazeghi@yahoo.com
2004-04-21  1:12 ` 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).