GCC freezing for a Multiply Chain

2010-02-15 Thread Balaji.Iyer
Hello Everyone,
I am creating a benchmark, where I have a following code:

x1 = a * b
x2 = x1 * a;
x3 = x1* x2;
x4 = x2 * x3;
x5 = x3 * x4;
x6 = x5 * x6;
  . . . 
  . . .
   x1000 = x999 * x998;



 When I do this, and compile using -O3/-O2/-O1, the compiler freezes. Am I 
doing anything wrong? 

GCC Version: 4.2.1
Platform: x86_64 (in macOS Snow Leopard).

I also tested this on a i386 (Red Hat 4.3.2-7) machine with gcc 4.3.2 and I had 
the same response.

Please CC me in the response since I m not a subscribed member of this mailing 
list. 

Any help is highly appreciated!

Thanks,


Balaji V. Iyer.


Help with an Wierd Error

2010-04-02 Thread Balaji.Iyer
Hello Everyone,
  I am trying to build an OpenRISC port of GCC. I am not getting much 
response from the OR32 people, and this error sounds a bit generic from google 
searches so I thought if someone would know how to solve it.

I build binutils, gcc and newlib  as they mentioned in the or32 website. But 
now I am getting this wierd error when I am trying to compile "Hello World" 
program

==
or32-elf-gcc -v /tmp/test.c
Reading specs from /opt/or32/lib/gcc/or32-elf/4.2.2/specs
Target: or32-elf
Configured with: ../gcc-4.2.2/configure --target=or32-elf --prefix=/opt/or32 
--with-gnu-as --with-gnu-ld --disable-libssp --with-newlib --enable-languages=c 
--disable-checking
Thread model: single
gcc version 4.2.2
 /opt/or32/libexec/gcc/or32-elf/4.2.2/cc1 -quiet -v test.c -quiet -dumpbase 
test.c -auxbase test -version -o 
/var/folders/kX/kXco8IKOGbKCP9ef7v-8KTI/-Tmp-//cch1Gb3x.s
ignoring nonexistent directory 
"/opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/or32/lib/gcc/or32-elf/4.2.2/include
 /opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/include
End of search list.
GNU C version 4.2.2 (or32-elf)
compiled by GNU C version 4.2.1 (Apple Inc. build 5646) (dot 1).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9e4259fc872a297ae129c5bc285bd4ea
 /opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/bin/as -o 
/var/folders/kX/kXco8IKOGbKCP9ef7v-8KTI/-Tmp-//ccMYERCM.o 
/var/folders/kX/kXco8IKOGbKCP9ef7v-8KTI/-Tmp-//cch1Gb3x.s
 /opt/or32/libexec/gcc/or32-elf/4.2.2/collect2 
/opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/lib/crt0.o 
-L/opt/or32/lib/gcc/or32-elf/4.2.2 
-L/opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/lib 
/var/folders/kX/kXco8IKOGbKCP9ef7v-8KTI/-Tmp-//ccMYERCM.o -lgcc -lc -lgcc 
-lor32 -lc -lgcc -lc -lor32
/opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/lib/crt0.o: In function 
`loop':
(.text+0x54): undefined reference to `_stack'
/opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/lib/crt0.o: In function 
`loop':
(.text+0x64): undefined reference to `___bss_start'
/opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/lib/crt0.o: In function 
`loop':
(.text+0x6c): undefined reference to `__end'
/opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/lib/libc.a(lib_a-findfp.o):
 In function `__sfmoreglue':
/home_dir/Research/OpenRISC/b-gcc/or32-elf/newlib/libc/stdio/../../../../../gcc-4.2.2/newlib/libc/stdio/findfp.c:88:
 undefined reference to `___mulsi3'
/opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/lib/libor32.a(sbrk.o): In 
function `sbrk':
/home_dir/Research/OpenRISC/b-gcc/or32-elf/libgloss/or32/../../../../gcc-4.2.2/libgloss/or32/sbrk.c:37:
 undefined reference to `__stack'
/home_dir/Research/OpenRISC/b-gcc/or32-elf/libgloss/or32/../../../../gcc-4.2.2/libgloss/or32/sbrk.c:35:
 undefined reference to `__end'
/opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/lib/libc.a(lib_a-vfprintf.o):
 In function `_vfprintf_r':
/home_dir/Research/OpenRISC/b-gcc/or32-elf/newlib/libc/stdio/../../../../../gcc-4.2.2/newlib/libc/stdio/vfprintf.c:1314:
 undefined reference to `___umodsi3'
/home_dir/Research/OpenRISC/b-gcc/or32-elf/newlib/libc/stdio/../../../../../gcc-4.2.2/newlib/libc/stdio/vfprintf.c:1315:
 undefined reference to `___udivsi3'
/home_dir/Research/OpenRISC/b-gcc/or32-elf/newlib/libc/stdio/../../../../../gcc-4.2.2/newlib/libc/stdio/vfprintf.c:1597:
 undefined reference to `___modsi3'
/home_dir/Research/OpenRISC/b-gcc/or32-elf/newlib/libc/stdio/../../../../../gcc-4.2.2/newlib/libc/stdio/vfprintf.c:1598:
 undefined reference to `___divsi3'
/opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/lib/libc.a(lib_a-dtoa.o): 
In function `quorem':
/home_dir/Research/OpenRISC/b-gcc/or32-elf/newlib/libc/stdlib/../../../../../gcc-4.2.2/newlib/libc/stdlib/dtoa.c:60:
 undefined reference to `___udivsi3'
/home_dir/Research/OpenRISC/b-gcc/or32-elf/newlib/libc/stdlib/../../../../../gcc-4.2.2/newlib/libc/stdlib/dtoa.c:73:
 undefined reference to `___mulsi3'
/home_dir/Research/OpenRISC/b-gcc/or32-elf/newlib/libc/stdlib/../../../../../gcc-4.2.2/newlib/libc/stdlib/dtoa.c:74:
 undefined reference to `___mulsi3'
/opt/or32/lib/gcc/or32-elf/4.2.2/../../../../or32-elf/lib/libc.a(lib_a-mprec.o):
 In function `__multiply':
/home_dir/Research/OpenRISC/b-gcc/or32-elf/newlib/libc/stdlib/../../../../../gcc-4.2.2/newlib/libc/stdlib/mprec.c:366:
 undefined reference to `___mulsi3'
/home_dir/Research/OpenRISC/b-gcc/or32-elf/newlib/libc/stdlib/../../../../../gcc-4.2.2/newlib/libc/stdlib/mprec.c:368:
 undefined reference to `___mulsi3'
/home_dir/Research/OpenRISC/b-gcc/or32-elf/newlib/libc/stdlib/../../../../../gcc-4.2.2/newlib/libc/stdlib/mprec.c:383:
 undefined reference to `___mulsi3'
/opt/or32/lib/gcc/or32-elf/4.2