Daniel Berlin wrote:
On 3/30/07, Antoine Eiche <[EMAIL PROTECTED]> wrote:
Daniel Berlin wrote:
> On 3/27/07, Antoine Eiche <[EMAIL PROTECTED]> wrote:
>> Dear all,
>>
>> I want to insert functions calls during a new pass.
>
> Which version of GCC?
> The problem is to
>> create parameters. At this time, I successfully create a function call
>> with two constante as parameter and insert it (I can see that in the
>> asm's code). But, I want to give the address of an array and a constante
>> to this function.
>> I think the problem is the creation of the node which contains the
>> address of the array.
>>
>> For example:
>> I get from the code (in tree "rhs"):
>> a[i]
>> I want build a node like that:
>> &a[i]
>> and build a function call like that:
>> foo(constante,&a[i])
>>
>> This is the error message when a try to compile a program with my pass :
>>
>> tab.c: In function 'main':
>> tab.c:7: erreur interne du compilateur: dans lookup_subvars_for_var, à
>> tree-flow-inline.h:1629
>>
> Can you send a backtrace?
>
> This means nothing has created the variable annotation for a.
Hi,

My version of gcc:

version gcc 4.3.0 20070316 (experimental)

I try to do a backtrace with gcc but the program exit normally. So, I
try to put a breakpoint but :

Are you debugging gcc or cc1?
you need to be debugging cc1

(use -v with your compiled gcc to get the cc1 command line it uses,
and just run "gdb --args <cc1 command line it is using>"


(gdb) b tree-flow-inline.h:1629
No source file named tree-flow-inline.h.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (tree-flow-inline.h:1629) pending.


I'm sorry but I can't show you a backtrace. (I do compilation with
option "-g")
How I can put a breakpoint ?


Hi,

It is the backtrace :

#0  lookup_subvars_for_var (var=0xb7c3f370) at tree-flow-inline.h:1628
#1 0x085b3cf0 in get_subvars_for_var (var=0xb7c3f370) at tree-flow-inline.h:1646 #2 0x085b3500 in verify_ssa_name (ssa_name=0xb7c47570, is_virtual=1 '\001') at ../.././gcc/tree-ssa.c:139 #3 0x085b619a in verify_ssa (check_modified_stmt=0 '\0') at ../.././gcc/tree-ssa.c:660 #4 0x0854a982 in verify_loop_closed_ssa () at ../.././gcc/tree-ssa-loop-manip.c:430 #5 0x08372213 in execute_function_todo (data=0x41) at ../.././gcc/passes.c:921 #6 0x08371cd9 in do_per_function (callback=0x8371f3c <execute_function_todo>, data=0x41) at ../.././gcc/passes.c:758
#7  0x08372275 in execute_todo (flags=65) at ../.././gcc/passes.c:936
#8 0x083726d2 in execute_one_pass (pass=0x8a060c0) at ../.././gcc/passes.c:1081 #9 0x08372754 in execute_pass_list (pass=0x8a060c0) at ../.././gcc/passes.c:1111 #10 0x08372770 in execute_pass_list (pass=0x8a05e00) at ../.././gcc/passes.c:1112 #11 0x08372770 in execute_pass_list (pass=0x8a05680) at ../.././gcc/passes.c:1112 #12 0x084a94ea in tree_rest_of_compilation (fndecl=0xb7c33e00) at ../.././gcc/tree-optimize.c:412 #13 0x080d8a55 in c_expand_body (fndecl=0xb7c33e00) at ../.././gcc/c-common.c:4276 #14 0x0868bc11 in cgraph_expand_function (node=0xb7b75900) at ../.././gcc/cgraphunit.c:1015 #15 0x0868be01 in cgraph_expand_all_functions () at ../.././gcc/cgraphunit.c:1084
#16 0x0868c3c3 in cgraph_optimize () at ../.././gcc/cgraphunit.c:1287
#17 0x080736f2 in c_write_global_declarations () at ../.././gcc/c-decl.c:7930
#18 0x08424a18 in compile_file () at ../.././gcc/toplev.c:1063
#19 0x08426343 in do_compile () at ../.././gcc/toplev.c:2124
#20 0x084263a5 in toplev_main (argc=4, argv=0xbfca4c64) at ../.././gcc/toplev.c:2156
#21 0x081167fa in main (argc=0, argv=0x0) at ../.././gcc/main.c:35

Thanks for your help.

Reply via email to