public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: middle-end/6679: wrong code generated for dead code
@ 2002-11-07 14:35 reichelt
  0 siblings, 0 replies; 3+ messages in thread
From: reichelt @ 2002-11-07 14:35 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, rveldema

Synopsis: wrong code generated for dead code

State-Changed-From-To: open->analyzed
State-Changed-By: reichelt
State-Changed-When: Thu Nov  7 14:35:06 2002
State-Changed-Why:
    Confirmed.
    
    BTW, the preprocessed source was corrupted.
    I restored it and compressed it.

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


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

* Re: middle-end/6679: wrong code generated for dead code
@ 2002-11-08  3:22 reichelt
  0 siblings, 0 replies; 3+ messages in thread
From: reichelt @ 2002-11-08  3:22 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, rveldema

Synopsis: wrong code generated for dead code

State-Changed-From-To: analyzed->closed
State-Changed-By: reichelt
State-Changed-When: Fri Nov  8 03:22:43 2002
State-Changed-Why:
    Because this PR is quite large and slightly corrupted,
    I created a new one - PR 8502 - with a reduced testcase
    to make bug-fixing easier ;-)

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


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

* Re: middle-end/6679: wrong code generated for dead code
@ 2002-11-07 15:06 Volker Reichelt
  0 siblings, 0 replies; 3+ messages in thread
From: Volker Reichelt @ 2002-11-07 15:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR middle-end/6679; it has been noted by GNATS.

From: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org,
        rveldema@cs.vu.nl
Cc:  
Subject: Re: middle-end/6679: wrong code generated for dead code
Date: Fri, 8 Nov 2002 00:52:44 +0100

 Hi,
 
 the problem can be demonstrated with the following testcase:
 
 --------------------------snip here-------------------------
 bool foo (int i)
 {
     switch (i)
     {
         case 0: return false;
         case 1: return false;
         case 2: return false;
         case 3: return false;
         case 4: return false;
     }
 
     return false;
 }
 
 int main() { return 0; }
 --------------------------snip here-------------------------
 
 Compiling this with gcc 3.1, 3.2 or the 3.2-branch on i686-pc-linux-gnu I get
 the following error message:
 
 /tmp/ccii3YKY.o: In function `foo(int)':
 /tmp/ccii3YKY.o(.text+0x11): undefined reference to `.L8'
 collect2: ld returned 1 exit status
 
 The assembler code for the function "foo" is:
 
 	.align 2
 .globl _Z3fooi
 	.type	_Z3fooi,@function
 _Z3fooi:
 .LFB1:
 	pushl	%ebp
 .LCFI0:
 	movl	%esp, %ebp
 .LCFI1:
 	cmpl	$4, 8(%ebp)
 	ja	.L1
 	movl	8(%ebp), %eax
 	sall	$2, %eax
 	movl	.L8(%eax), %eax     <--------- !!!!!
 .L1:
 	movl	$0, %eax
 	popl	%ebp
 	ret
 .LFE1:
 .Lfe1:
 	.size	_Z3fooi,.Lfe1-_Z3fooi
 
 Note that the problem disappears with only four cases in the switch statement.
 
 The problem doesn't arise on the main trunk, though.
 Because this is a regression from 3.0.x, I rate the PR as "high priority".
 
 Greetings,
 Volker
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6679
 
 


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

end of thread, other threads:[~2002-11-08 11:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-07 14:35 middle-end/6679: wrong code generated for dead code reichelt
2002-11-07 15:06 Volker Reichelt
2002-11-08  3:22 reichelt

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