Commit 3adcf52c by Jason Merrill Committed by Jason Merrill

re PR debug/42800 (VLA DW_AT_upper_bound is no longer emitted)

	PR debug/42800
	* cfgexpand.c (expand_used_vars): Keep artificial non-ignored vars
	in cfun->local_decls even if they have register types.

From-SVN: r157014
parent a3b20e90
2010-02-23 Jason Merrill <jason@redhat.com>
PR debug/42800
* cfgexpand.c (expand_used_vars): Keep artificial non-ignored vars
in cfun->local_decls even if they have register types.
PR c++/42837
* stor-layout.c (place_field): Don't warn about unnecessary
DECL_PACKED if the type is packed.
......
......@@ -1331,8 +1331,7 @@ expand_used_vars (void)
if (is_gimple_reg (var))
{
TREE_USED (var) = 0;
ggc_free (t);
continue;
goto next;
}
/* We didn't set a block for static or extern because it's hard
to tell the difference between a global variable (re)declared
......@@ -1353,8 +1352,9 @@ expand_used_vars (void)
TREE_USED (var) = 1;
if (expand_now)
{
expand_one_var (var, true, true);
next:
if (DECL_ARTIFICIAL (var) && !DECL_IGNORED_P (var))
{
rtx rtl = DECL_RTL_IF_SET (var);
......@@ -1368,7 +1368,6 @@ expand_used_vars (void)
continue;
}
}
}
ggc_free (t);
}
......
2010-02-23 Jason Merrill <jason@redhat.com>
PR debug/42800
* gcc.dg/debug/dwarf2/dwarf2.exp: Run c-c++-common dwarf2 tests.
* g++.dg/debug/dwarf2/dwarf2.exp: Likewise.
* c-c++-common/dwarf2/vla1.c: New.
2010-02-23 Jakub Jelinek <jakub@redhat.com>
PR target/43139
......
// PR debug/42800
// { dg-options "-gdwarf-2 -dA" }
// { dg-final { scan-assembler "DW_AT_upper_bound" } }
int
f (int i)
{
char a[i];
return a[0];
}
......@@ -35,7 +35,7 @@ set comp_output [g++_target_compile \
if { ! [string match "*: target system does not support the * debug format*" \
$comp_output] } {
remove-build-file "trivial.S"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[C\]]] \
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/dwarf2/*.c]] \
"" $DEFAULT_CFLAGS
}
......
......@@ -35,7 +35,7 @@ set comp_output [gcc_target_compile \
if { ! [string match "*: target system does not support the * debug format*" \
$comp_output] } {
remove-build-file "trivial.S"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\] $srcdir/c-c++-common/dwarf2/*.c]] \
"" $DEFAULT_CFLAGS
}
......
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