gcc 4.8.4 code generation issue

John Klos <[email protected]>
Newsgroups gmane.os.netbsd.ports.m68k,gmane.os.netbsd.ports.mac68k
Message-ID <[email protected]>
Hi,

If anyone who knows gcc well would like an example of a code generation 
problem, take a look at BIND in pkgsrc:

net/bind910/work/bind-9.10.1-P1/lib/dns/gen.c

Compiling with -O2 creates a binary that dumps core:

./gen -s . -t > include/dns/enumtype.h
[1]   Segmentation fault (core dumped) ./gen -s . -t >i...
*** Error code 139

If I change -O2 to -O, it works:

making all in /usr/pkgsrc/net/bind910/work/bind-9.10.1-P1/lib/dns
gcc -O -fno-reorder-blocks -I/usr/include -I../../lib/isc/include 
-I/usr/include -L/usr/lib -Wl,-rpath,/usr/lib -Wl,-R/usr/lib 
-Wl,-R/usr/local/lib -o gen ./gen.c

(works)

Thanks,
John
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.