public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/5471: gcc crashes when compiling test.c with -O3 but works fine with -O2
@ 2002-01-23 15:56 lahorani
  0 siblings, 0 replies; 2+ messages in thread
From: lahorani @ 2002-01-23 15:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5471
>Category:       c
>Synopsis:       gcc crashes when compiling test.c with -O3 but works fine with -O2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 23 15:56:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Sumeet
>Release:        gcc version 2.95.3 20010315 (SuSE)
>Organization:
>Environment:
Output from gcc -v -save-temps

Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
 /usr/lib/gcc-lib/i486-suse-linux/2.95.3/cpp0 -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__OPTIMIZE__ -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di486 -D__i486 -D__i486__ foo.c foo.i
GNU CPP version 2.95.3 20010315 (SuSE) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i486-suse-linux/2.95.3/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/include/g++
 /usr/lib/gcc-lib/i486-suse-linux/2.95.3/../../../../i486-suse-linux/include
End of omitted list.
 /usr/lib/gcc-lib/i486-suse-linux/2.95.3/cc1 foo.i -quiet -dumpbase foo.c -O3 -version -o foo.s
GNU C version 2.95.3 20010315 (SuSE) (i486-suse-linux) compiled by GNU C version 2.95.3 20010315 (SuSE).
>Description:
gcc crashes when compiling the attached test.c with -O3. The
compilation goes through fine with -O2. 

I've just reduced this testcase to use int * everywhere but
in reality I have structures and func1() is a function which
has side-effects and modifies the the contents of Iterator.
>How-To-Repeat:
gcc -O3 test.c
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-unknown-content-type-cfile; name="test.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.c"

dm9pZCAqZnVuYzEoaW50ICphKTsKaW50IGZ1bmMyKGludCAqYSk7Cgp2b2lkIGZ1bmMzKCkKewog
IGludCAqSXRlcmF0b3I7CgogIEl0ZXJhdG9yID0gKGludCAqKTA7IAoKICB3aGlsZSAoMSkgewog
ICAgaW50ICBQb3NpdGlvbiAgICAgICA9IDA7CiAgICBpbnQgIGk7CiAgICBpbnQgKiBPcGVyYW5k
ICA9IGZ1bmMxKEl0ZXJhdG9yKTsKCiAgICBpZiAoT3BlcmFuZCA9PSAoaW50ICopMCkgYnJlYWs7
IAoKICAgIGlmIChmdW5jMihPcGVyYW5kKSkKICAgICAgUG9zaXRpb24gPSAxOwoKICAgIGZvciAo
aSA9IFBvc2l0aW9uOyBpID49IDA7IGktLSkKICAgIHsKICAgIH0gIAogIH0KCiAgcmV0dXJuOwp9
Cg==


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

* Re: c/5471: gcc crashes when compiling test.c with -O3 but works fine with -O2
@ 2002-01-23 20:42 rodrigc
  0 siblings, 0 replies; 2+ messages in thread
From: rodrigc @ 2002-01-23 20:42 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, lahorani, nobody

Synopsis: gcc crashes when compiling test.c with -O3 but works fine with -O2

State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Wed Jan 23 20:42:25 2002
State-Changed-Why:
    Works with gcc 3.0.3

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


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

end of thread, other threads:[~2002-01-24  4:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-23 15:56 c/5471: gcc crashes when compiling test.c with -O3 but works fine with -O2 lahorani
2002-01-23 20:42 rodrigc

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