This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Unbreak ia64 bootstrap (PR debug/45006)


On Tue, Jul 20, 2010 at 01:11:00PM -0700, Richard Henderson wrote:
> Hmm.  I tried to see what ppc64 would generate here, but couldn't seem to
> prod the test case into stuffing the constant into the debug info.

static void foo (void) __attribute__((used));
static void foo (void)
{
}

void bar (void)
{
  void (*p) () = foo;
}

has it for ppc64 (for ia64 not right now, as DECL_MODE != TYPE_MODE in
expand_debug_expr prevents it).  ppc64 produces at -O2 -g -dA -m64:
	.byte	0x4	 # uleb128 0x4; (DIE (0x9b) DW_TAG_variable)
	.ascii "p\0"	 # DW_AT_name
	.byte	0x1	 # DW_AT_decl_file (tt.c)
	.byte	0x8	 # DW_AT_decl_line
	.4byte	0xb7	 # DW_AT_type
	.byte	0xa	 # DW_AT_location
	.byte	0x3	 # DW_OP_addr
	.8byte	foo
	.byte	0x9f	 # DW_OP_stack_value
which is I think correct, as unlike ia64 on ppc64 foo here is the function
descriptor symbol in .opd.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]