Commit aa2a43d2 by Richard Guenther Committed by Richard Biener

re PR debug/48703 (segfault in canonicalize_for_substitution)

2011-04-21  Richard Guenther  <rguenther@suse.de>

	PR lto/48703
	* tree.c (free_lang_data_in_decl): Do not zero TREE_TYPE of
	DECL_NAME.

	* g++.dg/lto/pr48207-2_0.C: New testcase.
	* g++.dg/lto/pr48207-3_0.C: Likewise.

From-SVN: r172830
parent 4d931f41
2011-04-21 Richard Guenther <rguenther@suse.de>
PR lto/48703
* tree.c (free_lang_data_in_decl): Do not zero TREE_TYPE of
DECL_NAME.
2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
* gimple.c (walk_gimple_op) <GIMPLE_CALL>: Fix couple of oversights.
......
2011-04-21 Richard Guenther <rguenther@suse.de>
PR lto/48703
* g++.dg/lto/pr48207-2_0.C: New testcase.
* g++.dg/lto/pr48207-3_0.C: Likewise.
2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/volatile5.adb: New test.
......
// { dg-lto-do link }
// { dg-lto-options { { -flto -g } } }
namespace {
typedef struct {
int x;
} Foo;
}
int main () {}
// { dg-lto-do link }
// { dg-lto-options { { -flto -g } } }
void bar(void) {}
void foo(void)
{
typedef enum { ABC } DEF;
bar();
}
int main () {}
......@@ -4561,10 +4561,6 @@ free_lang_data_in_decl (tree decl)
TREE_LANG_FLAG_5 (decl) = 0;
TREE_LANG_FLAG_6 (decl) = 0;
/* Identifiers need not have a type. */
if (DECL_NAME (decl))
TREE_TYPE (DECL_NAME (decl)) = NULL_TREE;
free_lang_data_in_one_sizepos (&DECL_SIZE (decl));
free_lang_data_in_one_sizepos (&DECL_SIZE_UNIT (decl));
if (TREE_CODE (decl) == FIELD_DECL)
......
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