http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53088

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-04-24 
15:07:21 UTC ---
At few places in cgraph code we set location to get those late diagnostics
right. It sort of makes sense for function wide diagnostics, but it is not this
one.

(gdb) bt
#0  inform (location=1925, gmsgid=0x379f4b8 "the ABI of passing union with long
double has changed in GCC 4.4") at ../../gcc/diagnostic.c:745
#1  0x00000000029a5f2b in classify_argument (mode=BLKmode, type=0x7ffff77a9498,
classes=0x7fffffffded0, bit_offset=0) at ../../gcc/config/i386/i386.c:6124
#2  0x00000000029a6635 in examine_argument (mode=BLKmode, type=0x7ffff77a9498,
in_return=0, int_nregs=0x7fffffffdf38, sse_nregs=0x7fffffffdf34) at
../../gcc/config/i386/i386.c:6311
#3  0x00000000029a71e9 in function_arg_advance_64 (cum=0x7fffffffe090,
mode=BLKmode, type=0x7ffff77a9498, words=2, named=1 '\001') at
../../gcc/config/i386/i386.c:6661
#4  0x00000000029a748c in ix86_function_arg_advance (cum_v={magic = 0x4a6f0a0,
p = 0x7fffffffe090}, mode=BLKmode, type=0x7ffff77a9498, named=1 '\001') at
../../gcc/config/i386/i386.c:6715
#5  0x0000000000ea45dd in gimplify_parameters () at ../../gcc/function.c:3572
#6  0x00000000010217b5 in gimplify_body (fndecl=0x7ffff77c6100, do_parms=1
'\001') at ../../gcc/gimplify.c:8140
#7  0x0000000001022e0a in gimplify_function_tree (fndecl=0x7ffff77c6100) at
../../gcc/gimplify.c:8278
#8  0x0000000000a8a229 in cgraph_analyze_function (node=0x7ffff7697750) at
../../gcc/cgraphunit.c:608
#9  0x0000000000a8b472 in cgraph_analyze_functions () at
../../gcc/cgraphunit.c:901
#10 0x0000000000a901cf in cgraph_finalize_compilation_unit () at
../../gcc/cgraphunit.c:2416
#11 0x000000000050e4f4 in c_write_global_declarations () at
../../gcc/c-decl.c:10043
#12 0x0000000001985ba3 in compile_file () at ../../gcc/toplev.c:572
#13 0x0000000001987f7d in do_compile () at ../../gcc/toplev.c:1939
#14 0x00000000019880d2 in toplev_main (argc=3, argv=0x7fffffffe7c8) at
../../gcc/toplev.c:2015
#15 0x000000000074efbb in main (argc=3, argv=0x7fffffffe7c8) at
../../gcc/main.c:36

I guess the catch is that gimplify_body is the last one knowing what statement
it is looking at.  I would expected expansion to set the source location,
right?
Outputting this on functio ndeclaration, that is still avaiable to the
cummulative arguments API is not quite right, because we would not handle
indirect calls.

Honza

Reply via email to