public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/4389: Improper constant folding
@ 2002-02-21  6:16 jakub
  0 siblings, 0 replies; 3+ messages in thread
From: jakub @ 2002-02-21  6:16 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jakub, mac

Synopsis: Improper constant folding

State-Changed-From-To: analyzed->closed
State-Changed-By: jakub
State-Changed-When: Thu Feb 21 04:59:21 2002
State-Changed-Why:
    Fixed.

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


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

* Re: c/4389: Improper constant folding
@ 2002-02-19  9:40 jakub
  0 siblings, 0 replies; 3+ messages in thread
From: jakub @ 2002-02-19  9:40 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jakub, mac, nobody

Synopsis: Improper constant folding

Responsible-Changed-From-To: unassigned->jakub
Responsible-Changed-By: jakub
Responsible-Changed-When: Tue Feb 19 09:36:25 2002
Responsible-Changed-Why:
    Mine.

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


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

* c/4389: Improper constant folding
@ 2001-09-24 22:46 mac
  0 siblings, 0 replies; 3+ messages in thread
From: mac @ 2001-09-24 22:46 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4389
>Category:       c
>Synopsis:       Improper constant folding
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 24 22:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     mac@culver.net
>Release:        unknown-1.0
>Organization:
>Environment:
cc -v -save-temps vvv.c                                     ~/September.2001
Using builtin specs.
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
 /usr/libexec/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=91 -Di386 -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -D__i386__ -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__ -D__i386 -Asystem(unix) -Asystem(NetBSD) -Acpu(i386) -Amachine(i386) vvv.c vvv.i
GNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2 release) (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
End of search list.
 /usr/libexec/cc1 vvv.i -quiet -dumpbase vvv.c -version -o vvv.s
GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i386-netbsd) compiled by GNU C version egcs-2.91.66 19990314 (egcs-1.1.2 release).
 as -o vvv.o vvv.s
 /usr/libexec/collect2 -m elf_i386 -dc -dp -e __start -dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crtbegin.o -L/usr/libexec vvv.o -lgcc -lc -lgcc /usr/lib/crtend.o
>Description:
Improper constant folding; ends up causing segfault

In the program, below, in the last printf(), the address
of matrix[N-1][N-1] is improperly computed.
>How-To-Repeat:
#define N 10000
float matrix[N][N];
void main( void )
{
  int i=9999;
  matrix[i][i] = (float)random();
  printf( "The last element is: %12.10f\n", matrix[i][i] );
  printf( "The last element is: %12.10f\n", matrix[N-1][N-1] );
}
>Fix:

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


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

end of thread, other threads:[~2002-02-21 12:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-21  6:16 c/4389: Improper constant folding jakub
  -- strict thread matches above, loose matches on Subject: below --
2002-02-19  9:40 jakub
2001-09-24 22:46 mac

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