Hi , all
There is a small case for bug1004 (http://bugs.open64.net/show_bug.
cgi?id=1004)
Testcase
int foo(int a)
{
if (a == 0)
return 1;
else
return foo(a - 1) + 10;
}
int main()
{
return foo(10);
}
CMD
opencc a.c -ipa -keep -show
Error
### Assertion failure at line 310 of
/home/rfshen/workspace/trunk/build_trunk_x8664/osprey/../../osprey/common/co
m/dwarf_DST.cxx:
### Compiler Error during Inline processing phase:
### Illegal attempt to append DST child
IPA processing aborted
Or
opencc INTERNAL ERROR:
/home/rfshen/workspace/trunk/build_trunk_x8664/x8664_bin/lib/gcc-lib/x86_64-
open64-linux/5.0/ipa_link died due to signal 11
Part of backtrace
#2 0xf7e8e110 in DST_enter_inlined_subroutine (parent={byte_idx = 0,
block_idx = 12830}, inl_routine=
{byte_idx = 144, block_idx = 12829}, begin_label=80215,
end_label=80215, caller_file_dst=0x8338c58,
callee_file_dst=0x8338c58, symtab=0x832cf88, caller_file_m=0x88b3100,
callee_file_m=0x88b3100, cross_file_id=0)
at
/home/rfshen/workspace/trunk/build_trunk_x8664/osprey/../../osprey/be/com/cl
one_DST_utils.cxx:847
#3 0xf7e8ed14 in DST_enter_cloned_childs (parent={byte_idx = 0, block_idx =
12830}, inl_routine=
{byte_idx = 56, block_idx = 12829}, symtab=0x832cf88,
caller_file_dst=0x8338c58, callee_file_dst=0x8338c58,
parent_file_index=0, inlined=1, caller_file_m=0x88b3100,
callee_file_m=0x88b3100)
at
/home/rfshen/workspace/trunk/build_trunk_x8664/osprey/../../osprey/be/com/cl
one_DST_utils.cxx:461
#4 0xf7e8e233 in DST_enter_inlined_subroutine (parent={byte_idx = 56,
block_idx = 12829}, inl_routine=
{byte_idx = 56, block_idx = 12829}, begin_label=82978,
end_label=81442, caller_file_dst=0x8338c58,
callee_file_dst=0x8338c58, symtab=0x832cf88, caller_file_m=0x88b3100,
callee_file_m=0x88b3100, cross_file_id=0)
at
/home/rfshen/workspace/trunk/build_trunk_x8664/osprey/../../osprey/be/com/cl
one_DST_utils.cxx:874
#5 0xf7e8ed14 in DST_enter_cloned_childs (parent={byte_idx = 56, block_idx
= 12829}, inl_routine=
{byte_idx = 88, block_idx = 12828}, symtab=0x832cf88,
caller_file_dst=0x8338c58, callee_file_dst=0x8338c58,
parent_file_index=0, inlined=1, caller_file_m=0x88b3100,
callee_file_m=0x88b3100)
at
/home/rfshen/workspace/trunk/build_trunk_x8664/osprey/../../osprey/be/com/cl
one_DST_utils.cxx:461
#6 0xf7e8e233 in DST_enter_inlined_subroutine (parent={byte_idx = 88,
block_idx = 12828}, inl_routine=
{byte_idx = 88, block_idx = 12828}, begin_label=82973,
end_label=81437, caller_file_dst=0x8338c58,
callee_file_dst=0x8338c58, symtab=0x832cf88, caller_file_m=0x88b3100,
callee_file_m=0x88b3100, cross_file_id=0)
at
/home/rfshen/workspace/trunk/build_trunk_x8664/osprey/../../osprey/be/com/cl
one_DST_utils.cxx:874
#7 0xf7e8ed14 in DST_enter_cloned_childs (parent={byte_idx = 88, block_idx
= 12828}, inl_routine=
{byte_idx = 144, block_idx = 12827}, symtab=0x832cf88,
caller_file_dst=0x8338c58, callee_file_dst=0x8338c58,
parent_file_index=0, inlined=1, caller_file_m=0x88b3100,
callee_file_m=0x88b3100)
at
/home/rfshen/workspace/trunk/build_trunk_x8664/osprey/../../osprey/be/com/cl
one_DST_utils.cxx:461
#8 0xf7e8e233 in DST_enter_inlined_subroutine (parent={byte_idx = 144,
block_idx = 12827}, inl_routine=
{byte_idx = 144, block_idx = 12827}, begin_label=82968,
end_label=81432, caller_file_dst=0x8338c58,
callee_file_dst=0x8338c58, symtab=0x832cf88, caller_file_m=0x88b3100,
callee_file_m=0x88b3100, cross_file_id=0)
at
/home/rfshen/workspace/trunk/build_trunk_x8664/osprey/../../osprey/be/com/cl
one_DST_utils.cxx:874
#9 0xf7e8ed14 in DST_enter_cloned_childs (parent={byte_idx = 144, block_idx
= 12827}, inl_routine=
{byte_idx = 176, block_idx = 12826}, symtab=0x832cf88,
caller_file_dst=0x8338c58, callee_file_dst=0x8338c58,
parent_file_index=0, inlined=1, caller_file_m=0x88b3100,
callee_file_m=0x88b3100)
For this case, there will be dead recursion between(DST_enter_cloned_childs
and DST_enter_inlined_subroutine).
DST merge is at the end of IPA:Process
I don’t know why the directly recursion edge is judged to be inlined
before.
Could you please help me?
Thx very much.
发件人: shenrfen [mailto:shenr...@gmail.com]
发送时间: 2012年8月16日 15:18
收件人: 'Xiaojing Zhang'; 'Jian-Xin Lai'
主题: 答复: 答复: regression related with your check-in rev3993
好的,谢谢!
如果是这样的话,估计应该是前面判断的 地方存在问题。
你认为呢?
发件人: Xiaojing Zhang [mailto:xiaojing70...@gmail.com]
发送时间: 2012年8月16日 13:49
收件人: shenrfen
主题: Re: 答复: regression related with your check-in rev3993
Hi, shenrfen,
我看了其它case,也都是直接递归的。
2012/8/15 Xiaojing Zhang <xiaojing70...@gmail.com>
Hi, shenrfen,
我这里有一些failed 的case, 我先minimize 一下看看再给你
对直接递归应该不会被inline吧?
2012/8/15 shenrfen <shenr...@gmail.com>
Hi ,jing & jianxin.
我发现只有直接递归的时候会出先 bug1004。
写了个简单的间接递归的case,是正确的。
不知道你那里有没有更多failure的case。
我在想,IPA阶段是先判断一条边是否可以被inline,然后再执行inline这个
动作的。
对于一个直接递归这样一条边,该不该 inline呢?
发件人: shenrfen [mailto:shenr...@gmail.com]
发送时间: 2012年8月13日 11:01
收件人: 'Xiaojing Zhang'
主题: 答复: regression related with your check-in rev3993
Hi, jing
I did not see this mail until now as I was on vacation in last two
weeks.
I will check bug1004 now.
Thx.
发件人: Xiaojing Zhang [mailto:xiaojing70...@gmail.com]
发送时间: 2012年8月6日 16:23
收件人: shenrfen
主题: Re: regression related with your check-in rev3993
Hi, shenrfen,
With the "DST_get_dirname" declaration problem solved, there still another
regression persists, I have filed bug1004 for this problem, please have a
look ASAP, thank you.
2012/8/2 Xiaojing Zhang <xiaojing70...@gmail.com>
Hi, shenrfen,
There is a regression caused by your check-in of rev 3993. could you please
have a look?
For the small case list of bug1003, it will got link failure.
===========
Test case:
1.c
extern void foo(int a);
int main()
{
foo(135);
}
=======
2.c
extern void goo(int a);
void foo(int a)
{
too(a);
}
========
3.c
int goo(int a)
{
//printf("a = %d\n", a);
too(a);
}
void too(int a)
{
printf("a = %d\n", a);
}
with command:
opencc 1.c 2.c 3.c �Cipa
Error:
../lib/gcc-lib/x86_64-open64-linux/5.0/ipa_link: symbol lookup error:
.../lib/gcc-lib/x86_64-open64-linux/5.0/ipa.so: undefined symbol:
_Z15DST_get_dirnamet
openCC INTERNAL ERROR: .../lib/gcc-lib/x86_64-open64-linux/5.0/ipa_link
returned non-zero status 127
In osprey/common/com/dwarf_DST_producer.cxx: the function DST_get_dirname is
declared as “static char*”, However, I find in
osprey/be/com/clone_DST_utils.cxx, there is an “extern char*
DST_get_dirname”, a static function can’t be “extern”, and removing the
"static" is able to solve this problem, please make it sure, thank you.
Regards,
zhang, xiao-jing
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel