This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/4794: gcc hangs on small, simple code fragment



>Number:         4794
>Category:       c
>Synopsis:       gcc hangs on small, simple code fragment
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 05 12:46:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Fritz Boehm
>Release:        gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-94.Intrinsity)
>Organization:
>Environment:
Red Hat Linux 7.1 running on a K7 1 GHz with 256MB RAM
>Description:
gcc hangs on a simple code fragment.
>How-To-Repeat:
gcc -c bug3.cc
>Fix:
If the boolean in the if clause is explicitly put in a
variable, and this variable is used in the if clause, then
gcc very quickly compiles the code.  Also, if a number of
variables in the if clause are eliminated, the compiler
will finish.  I deleted 11 of the variables and the compile
time went down to 15 seconds or so.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bug3.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug3.cc"

dm9pZCBmb28gKGludCBhLGludCBiLGludCBjLGludCBkLGludCBlLGludCBmLGludCBnLGludCBo
LGludCBpLGludCBqLGludCBrLAoJaW50IGwsaW50IG0saW50IG4saW50IG8saW50IHAsaW50IHEs
aW50IHIsaW50IHMsaW50IHQsaW50IHUsaW50IHYsaW50IHcsCglpbnQgeCxpbnQgeSxpbnQgeixp
bnQgYWEsaW50IGFiLGludCBhYykKeyAKaWYgKCEoKCgoYWMgIT0gMCkgKyAoZCAhPSAwKSArIChj
ICE9IDApICsgKGYgIT0gMCkgKyAoeCAhPSAwKSArICh5ICE9IDApICsKCSh6ICE9IDApICsgKGFh
ICE9IDApICsgKGFiICE9IDApICsgKGcgIT0gMCkgKyAoYiAhPSAwKSArIChhICE9IDApICsKCSho
ICE9IDApICsgKGUgIT0gMCkgKyAocCAhPSAwKSArIChxICE9IDApICsgKG4gIT0gMCkgKyAociAh
PSAwKSArCgkobyAhPSAwKSArICh2ICE9IDApICsgKHcgIT0gMCkgKyAodCAhPSAwKSArICh1ICE9
IDApICsgKHMgIT0gMCkgKwoJKGsgIT0gMCkgKyAobCAhPSAwKSArIChtICE9IDApICsgKGkgIT0g
MCkgKyAoaiAhPSAwKSkgPD0gMSkpKQoJewoJcmV0dXJuOwoJfQp9Cgo=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]