public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/4308: Optimisation problem (constant folding?)
@ 2002-02-19  8:28 jakub
  0 siblings, 0 replies; 2+ messages in thread
From: jakub @ 2002-02-19  8:28 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, wilco

Synopsis: Optimisation problem (constant folding?)

State-Changed-From-To: open->closed
State-Changed-By: jakub
State-Changed-When: Tue Feb 19 08:27:53 2002
State-Changed-Why:
    Fixed by http://gcc.gnu.org/ml/gcc-patches/2001-11/msg00513.html

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


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

* c/4308: Optimisation problem (constant folding?)
@ 2001-09-12 11:16 wilco
  0 siblings, 0 replies; 2+ messages in thread
From: wilco @ 2001-09-12 11:16 UTC (permalink / raw)
  To: gcc-gnats; +Cc: wilco

>Number:         4308
>Category:       c
>Synopsis:       Optimisation problem (constant folding?)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 12 11:15:59 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        3.0.1
>Organization:
>Environment:
System: Linux marilyn 2.2.18 #1 Wed Jan 24 12:28:55 GMT 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure 
>Description:
Looks like a constant folding problem with 64-bit signed shift. See
How-To-Repeat for input file.

>How-To-Repeat:

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

int main( )
{
   long long C = 1ULL << 63, X;
   int       Y = 32;

   X = C >> (Y & 31);

   printf( "%s (%llx)\n", X != C ? "FAIL" : "OK", X );

   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/ccrQWXBe.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/cc8zOk9j.o /tmp/ccrQWXBe.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/cc8zOk9j.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
OK (8000000000000000)
marilyn % gcc -O tmp.i
marilyn % a.out
FAIL (ffffffff00000000)
marilyn %

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


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-19  8:28 c/4308: Optimisation problem (constant folding?) jakub
  -- strict thread matches above, loose matches on Subject: below --
2001-09-12 11:16 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).