Segmentation fault when compiling GCC with new RTL pass
Tomasz Jankowski
tomcioj@gmail.com
Tue Oct 2 20:18:00 GMT 2012
Hello,
I'm implementing new RTL pass in GCC. I attached current C source with
my RTL pass. I have to use GCC v4.5.1 port for OpenRISC project.
Basically I want to discover all "SET" insns which moves constant
immediate to register. Then I want to insert additional instruction
call right after this move instruction (for now I just want to insert
a copy of found "SET" insn). When I compile this pass with commented
"add_insn_after(...)" (line 70 in attachment) GCC compiles fine and
after installation it discovers SET insn properly. When I uncomment
this "add_insn_after(...)" compilation fails with message:
(...)
../../gcc-4.5.1/gcc/crtstuff.c: In function ‘__do_global_dtors_aux’:
../../gcc-4.5.1/gcc/crtstuff.c:332:1: internal compiler error:
Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
(...)
I run my pass just after "expand" pass. This is first time I'm trying
to modify GCC. What am I doing wrong?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rns.c
Type: text/x-csrc
Size: 2173 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20121002/773434c0/attachment.bin>
More information about the Gcc-help
mailing list