* Re: [Linux-ia64] gcc-3.2 bug
@ 2003-03-05 2:03 David Mosberger
0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger @ 2003-03-05 2:03 UTC (permalink / raw)
To: linux-ia64
>>>>> On Tue, 28 Jan 2003 14:58:28 -0700, Alex Williamson <alex_williamson@hp.com> said:
Alex> I've been trying to figure out why agpgart_be.c won't
Alex> compile on ia64 w/ gcc-3.2, and I've got a pretty simple test
Alex> case that seems to show a compiler bug. Not being much of a
Alex> tools guy, I figured I'd toss it out here. If I compile with
Alex> -O2, I get an undefined reference much like I see in the
Alex> kernel:
Alex> # gcc -O2 -o test test.c /tmp/ccQCPFMM.o(.text+0xa0): In
Alex> function `main': : undefined reference to `.L13' collect2: ld
Alex> returned 1 exit status
Alex> If I compile w/o optimization or w/ gcc-2.96, it works fine.
Alex> It also works fine on x86 w/ gcc-3.2. Here's my gcc info:
Hans tried this with gcc-3.3 and the latest CVS gcc and both worked
fine (I was able to reproduce the bug with 3.2.2). Looks like the
problem might have been fixed already.
--david
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Linux-ia64] gcc-3.2 bug
@ 2003-01-28 21:58 Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2003-01-28 21:58 UTC (permalink / raw)
To: linux-ia64
[-- Attachment #1: Type: text/plain, Size: 1401 bytes --]
I've been trying to figure out why agpgart_be.c won't compile on
ia64 w/ gcc-3.2, and I've got a pretty simple test case that seems
to show a compiler bug. Not being much of a tools guy, I figured
I'd toss it out here. If I compile with -O2, I get an undefined
reference much like I see in the kernel:
# gcc -O2 -o test test.c
/tmp/ccQCPFMM.o(.text+0xa0): In function `main':
: undefined reference to `.L13'
collect2: ld returned 1 exit status
If I compile w/o optimization or w/ gcc-2.96, it works fine. It
also works fine on x86 w/ gcc-3.2. Here's my gcc info:
# gcc -v
Reading specs from /usr/lib/gcc-lib/ia64-linux/3.2.2/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2
--enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc ia64-linux
Thread model: posix
gcc version 3.2.2 20030124 (Debian prerelease)
This is the Debian unstable 3.2.2-0pre6. I'll file a bug there too.
Test case attached. Thanks,
Alex
--
Alex Williamson Linux Development Lab
alex_williamson@hp.com Hewlett Packard
970-898-9173 Fort Collins, CO
[-- Attachment #2: test.c --]
[-- Type: text/x-csrc, Size: 445 bytes --]
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char **argv)
{
int arg, value = 0;
printf("%s %d\n",argv[0], atoi(argv[1]));
arg = atoi(argv[1]);
switch (arg) {
case 0:
value += arg;
break;
case 1:
value += arg;
break;
case 2:
value += arg;
break;
case 3:
value += arg;
break;
case 4:
value += arg;
break;
default:
value = 0;
break;
}
printf("value = %d\n",value);
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-05 2:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-05 2:03 [Linux-ia64] gcc-3.2 bug David Mosberger
-- strict thread matches above, loose matches on Subject: below --
2003-01-28 21:58 Alex Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox