Package: gcc-3.2 Version: 3.2.2-0pre6 Severity: important On ia64, the attached, simple test program fails to link with optimization turned on. Here's the output: # gcc -O2 -o test test.c /tmp/ccQCPFMM.o(.text+0xa0): In function `main': : undefined reference to `.L13' collect2: ld returned 1 exit status Works w/o optimization or w/ gcc-2.96 -- Alex Williamson Linux Development Lab alex_williamson@hp.com Hewlett Packard 970-898-9173 Fort Collins, CO
#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;
}