Commit 271d01df by Richard Guenther Committed by Richard Biener

re PR bootstrap/51572 (LTO bootstrap failed with bootstrap-profiled)

2011-12-16  Richard Guenther  <rguenther@suse.de>

	PR lto/51572
	* dwarf2out.c (gen_type_die_with_usage): Use the context of
	the TYPE_DECL as well if it is file-scope.

	* gcc.dg/lto/pr51572-1_0.c: New testcase.

From-SVN: r182401
parent 002aad3f
2011-12-16 Richard Guenther <rguenther@suse.de>
PR lto/51572
* dwarf2out.c (gen_type_die_with_usage): Use the context of
the TYPE_DECL as well if it is file-scope.
2011-12-15 DJ Delorie <dj@redhat.com>
* config/rl78/rl78.md (return): Rename to rl78_return.
......@@ -18842,8 +18842,9 @@ gen_type_die_with_usage (tree type, dw_die_ref context_die,
/* Use the DIE of the containing namespace as the parent DIE of
the type description DIE we want to generate. */
if (DECL_CONTEXT (TYPE_NAME (type))
&& TREE_CODE (DECL_CONTEXT (TYPE_NAME (type))) == NAMESPACE_DECL)
if (DECL_FILE_SCOPE_P (TYPE_NAME (type))
|| (DECL_CONTEXT (TYPE_NAME (type))
&& TREE_CODE (DECL_CONTEXT (TYPE_NAME (type))) == NAMESPACE_DECL))
context_die = get_context_die (DECL_CONTEXT (TYPE_NAME (type)));
TREE_ASM_WRITTEN (type) = 1;
......
2011-12-16 Richard Guenther <rguenther@suse.de>
PR lto/51572
* gcc.dg/lto/pr51572-1_0.c: New testcase.
2011-12-15 Jason Merrill <jason@redhat.com>
PR c++/51458
......
/* { dg-lto-do link } */
/* { dg-lto-options { { -flto -g } } } */
typedef int T;
void fn (void)
{
static T t;
}
int main() {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment