You are not logged in.
Pages: 1
Hi,
I'm trying to use the PCC, the Portable C Compiler. I'm studying how does a compiler work, and I prefer
to use PCC because it's quick and simple. GCC, the GNU compiler, is more optimized but more complex.
I installed the ''pcc'' packet from AUR, and it seems to compile everything. But all binaries from PCC
awfully crash and dumps a core for segmentation fault just after they start. I tried with a simple
program (the classic, trivial ''Hello World'').
This is the debug I tried:
$ pcc -g main.c
$ gdb a.out
Reading symbols from /tmp/a.out...done.
(gdb) run
Starting program: /tmp/a.out
Program received signal SIGSEGV, Segmentation fault.
0x00000001 in ?? ()
(gdb) backtrace
#0 0x00000001 in ?? ()
#1 0x08048341 in __do_global_ctors_aux ()
#2 0x0804827c in _init ()
#3 0x080481e1 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)
Can someone help?
Thanks!
Last edited by mghis (2011-06-17 14:59:38)
Offline
Well, I can confirm it's not just you. "Hello world" segfaults for me, as well, but works fine when compiled with GCC or TCC.
I'd look into it, but PCC's site is currently down. Bummer.
Last edited by Guff (2011-06-17 15:31:43)
Offline
Now it's up. I filed a bug. Thanks for any help!
--mghis
Offline
Pages: 1