aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-09-03 16:46:39 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2010-09-03 16:46:39 +0200
commit87df9ea5a056a88a4fd1f28236155b30bac08ced (patch)
tree34695d8a7b5cea828396ff58d0246f0b55ae0485
parent15a54c10cb41f5a84583f7359c347706a6b90c5d (diff)
downloadgcc-87df9ea5a056a88a4fd1f28236155b30bac08ced.zip
gcc-87df9ea5a056a88a4fd1f28236155b30bac08ced.tar.gz
gcc-87df9ea5a056a88a4fd1f28236155b30bac08ced.tar.bz2
re PR middle-end/45484 (Invalid memory access in gcc.c-torture/execute/builtins/sprintf-chk.c)
PR middle-end/45484 * dwarf2out.c (flush_queued_reg_saves): Rename to... (dwarf2out_flush_queued_reg_saves): ... this. No longer static. (dwarf2out_frame_debug_expr, dwarf2out_frame_debug): Adjust callers. * dwarf2out.h (dwarf2out_flush_queued_reg_saves): New prototype. * config/i386/i386.c (output_set_got): Call it. From-SVN: r163823
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/i386/i386.c8
-rw-r--r--gcc/dwarf2out.c13
-rw-r--r--gcc/dwarf2out.h1
4 files changed, 17 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fafdbab..b527fe0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2010-09-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/45484
+ * dwarf2out.c (flush_queued_reg_saves): Rename to...
+ (dwarf2out_flush_queued_reg_saves): ... this. No longer static.
+ (dwarf2out_frame_debug_expr, dwarf2out_frame_debug): Adjust callers.
+ * dwarf2out.h (dwarf2out_flush_queued_reg_saves): New prototype.
+ * config/i386/i386.c (output_set_got): Call it.
+
2010-09-03 Michael Matz <matz@suse.de>
PR middle-end/45415
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 0ff2993..3a8484a 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -8119,13 +8119,7 @@ output_set_got (rtx dest, rtx label ATTRIBUTE_UNUSED)
/* Ensure all queued register saves are flushed before the
call. */
if (dwarf2out_do_frame ())
- {
- rtx insn;
- start_sequence ();
- insn = emit_barrier ();
- end_sequence ();
- dwarf2out_frame_debug (insn, false);
- }
+ dwarf2out_flush_queued_reg_saves ();
#endif
xops[2] = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (name));
xops[2] = gen_rtx_MEM (QImode, xops[2]);
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 7c4c523..31d4413 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -471,7 +471,6 @@ static void output_cfi (dw_cfi_ref, dw_fde_ref, int);
static void output_cfi_directive (dw_cfi_ref);
static void output_call_frame_info (int);
static void dwarf2out_note_section_used (void);
-static void flush_queued_reg_saves (void);
static bool clobbers_queued_reg_save (const_rtx);
static void dwarf2out_frame_debug_expr (rtx, const char *);
@@ -1712,8 +1711,8 @@ queue_reg_save (const char *label, rtx reg, rtx sreg, HOST_WIDE_INT offset)
/* Output all the entries in QUEUED_REG_SAVES. */
-static void
-flush_queued_reg_saves (void)
+void
+dwarf2out_flush_queued_reg_saves (void)
{
struct queued_reg_save *q;
@@ -2458,7 +2457,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label)
{
/* We interpret reg_save differently with stack_realign set.
Thus we must flush whatever we have queued first. */
- flush_queued_reg_saves ();
+ dwarf2out_flush_queued_reg_saves ();
gcc_assert (cfa_store.reg == REGNO (XEXP (src, 0)));
fde->stack_realign = 1;
@@ -2705,7 +2704,7 @@ dwarf2out_frame_debug (rtx insn, bool after_p)
size_t i;
/* Flush any queued register saves. */
- flush_queued_reg_saves ();
+ dwarf2out_flush_queued_reg_saves ();
/* Set up state for generating call frame debug info. */
lookup_cfa (&cfa);
@@ -2733,7 +2732,7 @@ dwarf2out_frame_debug (rtx insn, bool after_p)
}
if (!NONJUMP_INSN_P (insn) || clobbers_queued_reg_save (insn))
- flush_queued_reg_saves ();
+ dwarf2out_flush_queued_reg_saves ();
if (!RTX_FRAME_RELATED_P (insn))
{
@@ -2841,7 +2840,7 @@ dwarf2out_frame_debug (rtx insn, bool after_p)
We could probably check just once, here, but this is safer than
removing the check above. */
if (clobbers_queued_reg_save (insn))
- flush_queued_reg_saves ();
+ dwarf2out_flush_queued_reg_saves ();
}
/* Determine if we need to save and restore CFI information around this
diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h
index d70b26f..d5b958d 100644
--- a/gcc/dwarf2out.h
+++ b/gcc/dwarf2out.h
@@ -22,6 +22,7 @@ extern void dwarf2out_decl (tree);
extern void dwarf2out_frame_debug (rtx, bool);
extern void dwarf2out_cfi_begin_epilogue (rtx);
extern void dwarf2out_frame_debug_restore_state (void);
+extern void dwarf2out_flush_queued_reg_saves (void);
extern void debug_dwarf (void);
struct die_struct;