https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91307

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
The name to function is given here:
get_file_function_name

Breakpoint 1, get_file_function_name (type=0x7fffffffd670 "I_65535_0") at
/home/marxin/Programming/gcc/gcc/tree.c:9809
9809      if (first_global_object_name)
(gdb) bt
#0  get_file_function_name (type=0x7fffffffd670 "I_65535_0") at
/home/marxin/Programming/gcc/gcc/tree.c:9809
#1  0x0000000000ab7c9b in cgraph_build_static_cdtor_1 (which=<optimized out>,
body=0x7ffff78958e0, priority=65535, final=<optimized out>,
optimization=0x7ffff7895880, target=0x7ffff789c558) at
/home/marxin/Programming/gcc/gcc/ipa.c:845
#2  0x0000000000ab830b in build_cdtor (ctor_p=true, cdtors=...) at
/home/marxin/Programming/gcc/gcc/tree.h:3258
#3  0x0000000000ab877d in build_cdtor_fns (dtors=0x7fffffffd7d0,
ctors=0x7fffffffd720) at /home/marxin/Programming/gcc/gcc/ipa.c:1064
#4  ipa_cdtor_merge () at /home/marxin/Programming/gcc/gcc/ipa.c:1093
#5  0x0000000000bb9f1a in execute_one_pass (pass=0x2263e60) at
/home/marxin/Programming/gcc/gcc/passes.c:2474
#6  0x0000000000bbb927 in execute_ipa_pass_list (pass=0x2263e60) at
/home/marxin/Programming/gcc/gcc/passes.c:2914
#7  0x00000000007e1e51 in do_whole_program_analysis () at
/home/marxin/Programming/gcc/gcc/context.h:48
#8  lto_main () at /home/marxin/Programming/gcc/gcc/lto/lto.c:628
#9  0x0000000000c8c900 in compile_file () at
/home/marxin/Programming/gcc/gcc/toplev.c:456
#10 0x00000000007ba21b in do_compile () at
/home/marxin/Programming/gcc/gcc/toplev.c:2190
#11 toplev::main (this=this@entry=0x7fffffffda6e, argc=<optimized out>,
argc@entry=19, argv=<optimized out>, argv@entry=0x7fffffffdb68) at
/home/marxin/Programming/gcc/gcc/toplev.c:2325
#12 0x00000000007bdd2f in main (argc=19, argv=0x7fffffffdb68) at
/home/marxin/Programming/gcc/gcc/main.c:39

So when one uses --save-temps:

gcc -flto pr91307-*.c -o a.out --save-temps && objdump -S a.out | grep GLOBAL
generating: _GLOBAL__I_65535_0_pr91307_1.o

We can probably give a better name in WPA.

Reply via email to