public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/4302: wrong code generated
@ 2002-02-19  7:39 jakub
  0 siblings, 0 replies; 6+ messages in thread
From: jakub @ 2002-02-19  7:39 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, wilco

Synopsis: wrong code generated

State-Changed-From-To: open->closed
State-Changed-By: jakub
State-Changed-When: Tue Feb 19 07:38:59 2002
State-Changed-Why:
    Fixed by http://gcc.gnu.org/ml/gcc-patches/2001-12/msg01959.html

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4302


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

* Re: c/4302: wrong code generated
@ 2001-09-13  9:26 Andreas Jaeger
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Jaeger @ 2001-09-13  9:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/4302; it has been noted by GNATS.

From: Andreas Jaeger <aj@suse.de>
To: Wilco van Hoogstraeten <wilco@trimedia.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/4302: wrong code generated
Date: Thu, 13 Sep 2001 18:22:01 +0200

 I've tested this with GCC 2.95.3 and it works fine there. This bug is
 a regression from GCC 2.95.3,
 
 Thanks Wilco for the test case - and sorry for my misinterpretation of
 the code :-(
 
 Andreas
 -- 
  Andreas Jaeger
   SuSE Labs aj@suse.de
    private aj@arthur.inka.de
     http://www.suse.de/~aj


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

* Re: c/4302: wrong code generated
@ 2001-09-12 11:46 Andreas Jaeger
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Jaeger @ 2001-09-12 11:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/4302; it has been noted by GNATS.

From: Andreas Jaeger <aj@suse.de>
To: Wilco van Hoogstraeten <wilco@trimedia.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/4302: wrong code generated
Date: Wed, 12 Sep 2001 20:27:32 +0200

 Wilco van Hoogstraeten <wilco@trimedia.com> writes:
 
 > Andreas Jaeger wrote:
 > > wilco@trimedia.com writes:
 >> 
 > [...]
 > > > >Description:
 >> > Wrong code generated:
 >> >
 >> > marilyn % cat tmp.i
 >> > extern int printf( const char* args, ... );
 >> >
 >> > int main( )
 >> > {
 >> >   long long X, Y;
 >> >
 >> >   Y = -3000000000LL > (X = 0);
 >> 
 >> There's no bug here: X is not initialized at this point.  Therefore
 >> the value of (X=0) is undefined,
 >> 
 > Excuse me???? The value of (X=0) is defined and is 0.
 
 The values of X and Y are undefined, local variables don't have any
 defined value.
 
 > Anyway, if you do not believe in C semantics, you could have tried
 > to initialise X before rejecting the bug:
 
 Please read the standards before you start accusing somebody!
 
 > extern int printf( const char* args, ... );
 >
 > % cat tmp.i
 > int main( )
 > {
 >    long long X = 0, Y;
 >
 >    Y = -3000000000LL > (X = 0);
 >
 >    printf( "%s (%lld)\n", Y != 0 ? "FAIL" : "OK", Y );
 >
 >    return 0;
 > }
 > % gcc tmp.i
 > % a.out
 > FAIL (1)
 > %
 
 I've reproduced this with GCC 3.0.1 and GCC 3.1 on i686, this is
 really a bug.
 
 Andreas
 -- 
  Andreas Jaeger
   SuSE Labs aj@suse.de
    private aj@arthur.inka.de
     http://www.suse.de/~aj


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

* Re: c/4302: wrong code generated
@ 2001-09-12  9:06 Wilco van Hoogstraeten
  0 siblings, 0 replies; 6+ messages in thread
From: Wilco van Hoogstraeten @ 2001-09-12  9:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/4302; it has been noted by GNATS.

From: Wilco van Hoogstraeten <wilco@trimedia.com>
To: Andreas Jaeger <aj@suse.de>
Cc: wilco@trimedia.com, gcc-gnats@gcc.gnu.org
Subject: Re: c/4302: wrong code generated
Date: Wed, 12 Sep 2001 08:59:01 -0700

 Andreas Jaeger wrote:
 > wilco@trimedia.com writes:
 > 
 [...]
 > > >Description:
 > > Wrong code generated:
 > >
 > > marilyn % cat tmp.i
 > > extern int printf( const char* args, ... );
 > >
 > > int main( )
 > > {
 > >   long long X, Y;
 > >
 > >   Y = -3000000000LL > (X = 0);
 > 
 > There's no bug here: X is not initialized at this point.  Therefore
 > the value of (X=0) is undefined,
 > 
 Excuse me???? The value of (X=0) is defined and is 0.
 
 Anyway, if you do not believe in C semantics, you could have tried
 to initialise X before rejecting the bug:
 
 extern int printf( const char* args, ... );
 
 % cat tmp.i
 int main( )
 {
    long long X = 0, Y;
 
    Y = -3000000000LL > (X = 0);
 
    printf( "%s (%lld)\n", Y != 0 ? "FAIL" : "OK", Y );
 
    return 0;
 }
 % gcc tmp.i
 % a.out
 FAIL (1)
 %
 
 Wilco.


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

* Re: c/4302: wrong code generated
@ 2001-09-11 22:36 Andreas Jaeger
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Jaeger @ 2001-09-11 22:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/4302; it has been noted by GNATS.

From: Andreas Jaeger <aj@suse.de>
To: wilco@trimedia.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/4302: wrong code generated
Date: Wed, 12 Sep 2001 07:27:34 +0200

 wilco@trimedia.com writes:
 
 [...]
 > configured with: ./configure
 
 Please don't configure in the source directory but use a separate
 build directory instead.  You should always run make bootstrap instead
 of make as you apparently did.
 
 > >Description:
 > Wrong code generated:
 >
 > marilyn % cat tmp.i
 > extern int printf( const char* args, ... );
 >
 > int main( )
 > {
 >   long long X, Y;
 >
 >   Y = -3000000000LL > (X = 0);
 
 There's no bug here: X is not initialized at this point.  Therefore
 the value of (X=0) is undefined,
 
 Andreas
 -- 
  Andreas Jaeger
   SuSE Labs aj@suse.de
    private aj@arthur.inka.de
     http://www.suse.de/~aj


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

* c/4302: wrong code generated
@ 2001-09-11 16:26 wilco
  0 siblings, 0 replies; 6+ messages in thread
From: wilco @ 2001-09-11 16:26 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4302
>Category:       c
>Synopsis:       wrong code generated
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 11 16:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     wilco@trimedia.com
>Release:        gcc version 3.0.1
>Organization:
>Environment:
System: Linux marilyn 2.2.18 #1 Wed Jan 24 12:28:55 GMT 2001 i686 unknown
Architecture: i686

        <machine, os, target, libraries (multiple lines)>
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure
>Description:
Wrong code generated:

marilyn % cat tmp.i
extern int printf( const char* args, ... );

int main( )
{
  long long X, Y;

  Y = -3000000000LL > (X = 0);

  printf( "%s (%lld)\n", Y != 0 ? "FAIL" : "OK", Y );

  return 0;
}
marilyn % gcc -v tmp.i
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/specs
Configured with: ./configure 
Thread model: single
gcc version 3.0.1
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/cc1 -fpreprocessed tmp.i -quiet -dumpbase tmp.i -version -o /tmp/ccPPR17m.s
GNU CPP version 3.0.1 (cpplib) (i386 Linux/ELF)
GNU C version 3.0.1 (i686-pc-linux-gnu)
        compiled by GNU C version 2.95.3 20010315 (release).
 as --traditional-format -V -Qy -o /tmp/ccos1TcB.o /tmp/ccPPR17m.s
GNU assembler version 2.10.91 (i486-suse-linux) using BFD version 2.10.0.33
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/crtbegin.o -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1 -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/../../.. /tmp/ccos1TcB.o -lgcc -lc -lgcc /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.0.1/crtend.o /usr/lib/crtn.o
marilyn % a.out
FAIL (1)
marilyn % 
>How-To-Repeat:
See description. Fails on all opt levels.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-02-19 15:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-19  7:39 c/4302: wrong code generated jakub
  -- strict thread matches above, loose matches on Subject: below --
2001-09-13  9:26 Andreas Jaeger
2001-09-12 11:46 Andreas Jaeger
2001-09-12  9:06 Wilco van Hoogstraeten
2001-09-11 22:36 Andreas Jaeger
2001-09-11 16:26 wilco

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