Commit 8318d4ce by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/55665 (Missing DW_TAG_lexical_block PC range)

	PR debug/55665
	* tree-inline.c (remap_decls): Change nonlocalized_list
	to pointer to pointer to vector from pointer to vector.
	(remap_block): Pass address of BLOCK_NONLOCALIZED_VARS.

	* g++.dg/guality/pr55665.C: New test.

From-SVN: r194461
parent a42a906c
2012-12-12 Jakub Jelinek <jakub@redhat.com> 2012-12-12 Jakub Jelinek <jakub@redhat.com>
PR debug/55665
* tree-inline.c (remap_decls): Change nonlocalized_list
to pointer to pointer to vector from pointer to vector.
(remap_block): Pass address of BLOCK_NONLOCALIZED_VARS.
PR sanitizer/55508 PR sanitizer/55508
* builtin-attrs.def (ATTR_TMPURE_NOTHROW_LEAF_LIST, * builtin-attrs.def (ATTR_TMPURE_NOTHROW_LEAF_LIST,
ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST): New. ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST): New.
2012-12-12 Jakub Jelinek <jakub@redhat.com> 2012-12-12 Jakub Jelinek <jakub@redhat.com>
PR debug/55665
* g++.dg/guality/pr55665.C: New test.
* lib/gcc-dg.exp (${tool}_load): Handle non-existing * lib/gcc-dg.exp (${tool}_load): Handle non-existing
set_target_env_var the same as if it is empty list. set_target_env_var the same as if it is empty list.
(dg-set-target-env-var): Fix up error message. (dg-set-target-env-var): Fix up error message.
......
// PR debug/55655
// { dg-do run }
// { dg-options "-g" }
extern "C" void abort ();
struct A { A (int); int a; };
__attribute__((noinline, noclone)) int
bar (void)
{
return 40;
}
__attribute__((noinline, noclone)) void
foo (int x)
{
__asm volatile ("" : : "r" (x) : "memory");
}
A::A (int x)
{
static int p = bar ();
foo (p); // { dg-final { gdb-test 23 "p" "40" } }
a = ++p;
}
int
main ()
{
A a (42);
if (a.a != 41)
abort ();
}
...@@ -536,7 +536,7 @@ can_be_nonlocal (tree decl, copy_body_data *id) ...@@ -536,7 +536,7 @@ can_be_nonlocal (tree decl, copy_body_data *id)
} }
static tree static tree
remap_decls (tree decls, vec<tree, va_gc> *nonlocalized_list, remap_decls (tree decls, vec<tree, va_gc> **nonlocalized_list,
copy_body_data *id) copy_body_data *id)
{ {
tree old_var; tree old_var;
...@@ -557,7 +557,7 @@ remap_decls (tree decls, vec<tree, va_gc> *nonlocalized_list, ...@@ -557,7 +557,7 @@ remap_decls (tree decls, vec<tree, va_gc> *nonlocalized_list,
if ((!optimize || debug_info_level > DINFO_LEVEL_TERSE) if ((!optimize || debug_info_level > DINFO_LEVEL_TERSE)
&& !DECL_IGNORED_P (old_var) && !DECL_IGNORED_P (old_var)
&& nonlocalized_list) && nonlocalized_list)
vec_safe_push (nonlocalized_list, old_var); vec_safe_push (*nonlocalized_list, old_var);
continue; continue;
} }
...@@ -575,7 +575,7 @@ remap_decls (tree decls, vec<tree, va_gc> *nonlocalized_list, ...@@ -575,7 +575,7 @@ remap_decls (tree decls, vec<tree, va_gc> *nonlocalized_list,
if ((!optimize || debug_info_level > DINFO_LEVEL_TERSE) if ((!optimize || debug_info_level > DINFO_LEVEL_TERSE)
&& !DECL_IGNORED_P (old_var) && !DECL_IGNORED_P (old_var)
&& nonlocalized_list) && nonlocalized_list)
vec_safe_push (nonlocalized_list, old_var); vec_safe_push (*nonlocalized_list, old_var);
} }
else else
{ {
...@@ -622,7 +622,7 @@ remap_block (tree *block, copy_body_data *id) ...@@ -622,7 +622,7 @@ remap_block (tree *block, copy_body_data *id)
/* Remap its variables. */ /* Remap its variables. */
BLOCK_VARS (new_block) = remap_decls (BLOCK_VARS (old_block), BLOCK_VARS (new_block) = remap_decls (BLOCK_VARS (old_block),
BLOCK_NONLOCALIZED_VARS (new_block), &BLOCK_NONLOCALIZED_VARS (new_block),
id); id);
if (id->transform_lang_insert_block) if (id->transform_lang_insert_block)
......
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