mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-15 17:10:02 +08:00
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
This commit is contained in:
parent
a42a906c42
commit
8318d4ce56
@ -1,5 +1,10 @@
|
||||
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
|
||||
* builtin-attrs.def (ATTR_TMPURE_NOTHROW_LEAF_LIST,
|
||||
ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST): New.
|
||||
|
@ -1,5 +1,8 @@
|
||||
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
|
||||
set_target_env_var the same as if it is empty list.
|
||||
(dg-set-target-env-var): Fix up error message.
|
||||
|
33
gcc/testsuite/g++.dg/guality/pr55665.C
Normal file
33
gcc/testsuite/g++.dg/guality/pr55665.C
Normal file
@ -0,0 +1,33 @@
|
||||
// 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)
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
tree old_var;
|
||||
@ -557,7 +557,7 @@ remap_decls (tree decls, vec<tree, va_gc> *nonlocalized_list,
|
||||
if ((!optimize || debug_info_level > DINFO_LEVEL_TERSE)
|
||||
&& !DECL_IGNORED_P (old_var)
|
||||
&& nonlocalized_list)
|
||||
vec_safe_push (nonlocalized_list, old_var);
|
||||
vec_safe_push (*nonlocalized_list, old_var);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -575,7 +575,7 @@ remap_decls (tree decls, vec<tree, va_gc> *nonlocalized_list,
|
||||
if ((!optimize || debug_info_level > DINFO_LEVEL_TERSE)
|
||||
&& !DECL_IGNORED_P (old_var)
|
||||
&& nonlocalized_list)
|
||||
vec_safe_push (nonlocalized_list, old_var);
|
||||
vec_safe_push (*nonlocalized_list, old_var);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -622,7 +622,7 @@ remap_block (tree *block, copy_body_data *id)
|
||||
|
||||
/* Remap its variables. */
|
||||
BLOCK_VARS (new_block) = remap_decls (BLOCK_VARS (old_block),
|
||||
BLOCK_NONLOCALIZED_VARS (new_block),
|
||||
&BLOCK_NONLOCALIZED_VARS (new_block),
|
||||
id);
|
||||
|
||||
if (id->transform_lang_insert_block)
|
||||
|
Loading…
Reference in New Issue
Block a user