This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/7289: wrong code generated for switch statement
- From: blair dot kelly at att dot net
- To: gcc-bugs at gcc dot gnu dot org
- Cc: paterno at fnal dot gov
- Date: Mon, 29 Jul 2002 01:20:28 +0000
- Subject: Re: c/7289: wrong code generated for switch statement
I believe the following code demonstrates the
problem discussed in c/7289.
Reading specs from
/home/bfkelly/public/gcc-3.1.1/SunOS/lib/gcc-lib/sparc-sun-solaris2.8/3.1.1/specs
Configured with: ../gcc-3.1.1/configure
--enable-languages=c
--prefix=/home/bfkelly/public/gcc-3.1.1/SunOS
Thread model: posix
gcc version 3.1.1
/*
Produces undefined symbol .LL10 in object file
when compiled with NO optimization.
gcc-3.1.1 -O2 -c foo.c
nm foo.o
gcc-3.1.1 -c foo.c
nm foo.o
*/
void foo(a, b)
int a;
int b;
{
switch (a)
{
case 0:
case 1:
case 2:
case 4:
case 5:
break;
case 3:
if (b == 0) {
;
}
break;
}
}