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
2010-02-23 Jason Merrill <jason@redhat.com>
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.
PR c++/42837
* stor-layout.c (place_field): Don't warn about unnecessary
DECL_PACKED if the type is packed.
if (is_gimple_reg (var))
{
TREE_USED (var) = 0;
if (is_gimple_reg (var))
{
TREE_USED (var) = 0;
- ggc_free (t);
- continue;
}
/* We didn't set a block for static or extern because it's hard
to tell the difference between a global variable (re)declared
}
/* We didn't set a block for static or extern because it's hard
to tell the difference between a global variable (re)declared
TREE_USED (var) = 1;
if (expand_now)
TREE_USED (var) = 1;
if (expand_now)
+ expand_one_var (var, true, true);
+
+ next:
+ if (DECL_ARTIFICIAL (var) && !DECL_IGNORED_P (var))
- expand_one_var (var, true, true);
- if (DECL_ARTIFICIAL (var) && !DECL_IGNORED_P (var))
- {
- rtx rtl = DECL_RTL_IF_SET (var);
+ rtx rtl = DECL_RTL_IF_SET (var);
- /* Keep artificial non-ignored vars in cfun->local_decls
- chain until instantiate_decls. */
- if (rtl && (MEM_P (rtl) || GET_CODE (rtl) == CONCAT))
- {
- TREE_CHAIN (t) = cfun->local_decls;
- cfun->local_decls = t;
- continue;
- }
+ /* Keep artificial non-ignored vars in cfun->local_decls
+ chain until instantiate_decls. */
+ if (rtl && (MEM_P (rtl) || GET_CODE (rtl) == CONCAT))
+ {
+ TREE_CHAIN (t) = cfun->local_decls;
+ cfun->local_decls = t;
+ continue;
+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
2010-02-23 Jakub Jelinek <jakub@redhat.com>
PR target/43139
* gcc.dg/march.c: New.
* gcc.dg/march-generic.c: New.
* gcc.dg/mtune.c: New.
* gcc.dg/march.c: New.
* gcc.dg/march-generic.c: New.
* gcc.dg/mtune.c: New.
2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/43083
2010-02-22 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/43083
--- /dev/null
+// 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];
+}
if { ! [string match "*: target system does not support the * debug format*" \
$comp_output] } {
remove-build-file "trivial.S"
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]] \
if { ! [string match "*: target system does not support the * debug format*" \
$comp_output] } {
remove-build-file "trivial.S"
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]] \