aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@markmitchell.com>1998-09-23 23:28:17 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1998-09-23 23:28:17 +0000
commit59ec66dc6a77fd5a31aa72def478e05f81ba819e (patch)
tree3b24405bdbc98bfccda73944703c58621ce54fc3
parenta5f421658c4dfe336f6b50153ffbe1fbc203107f (diff)
downloadgcc-59ec66dc6a77fd5a31aa72def478e05f81ba819e.zip
gcc-59ec66dc6a77fd5a31aa72def478e05f81ba819e.tar.gz
gcc-59ec66dc6a77fd5a31aa72def478e05f81ba819e.tar.bz2
rtl.h (init_virtual_regs): New function.
* rtl.h (init_virtual_regs): New function. * emit-rtl.c (init_virtual_regs): Define. (insn_emit): Use it. * integrate.c (save_for_inline_copying): Likewise. From-SVN: r22563
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/emit-rtl.c18
-rw-r--r--gcc/integrate.c5
-rw-r--r--gcc/rtl.h1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/local2.C10
5 files changed, 32 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2e46e4d..4a14dcc 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Wed Sep 23 22:32:31 1998 Mark Mitchell <mark@markmitchell.com>
+
+ * rtl.h (init_virtual_regs): New function.
+ * emit-rtl.c (init_virtual_regs): Define.
+ (insn_emit): Use it.
+ * integrate.c (save_for_inline_copying): Likewise.
+
Wed Sep 23 16:22:01 1998 Nick Clifton <nickc@cygnus.com>
* config/arm/thumb.h: The following patches were made by Jim Wilson:
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index e5510a6..e6e0e60 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -3297,6 +3297,18 @@ gen_sequence ()
return result;
}
+/* Put the various virtual registers into REGNO_REG_RTX. */
+
+void
+init_virtual_regs ()
+{
+ regno_reg_rtx[VIRTUAL_INCOMING_ARGS_REGNUM] = virtual_incoming_args_rtx;
+ regno_reg_rtx[VIRTUAL_STACK_VARS_REGNUM] = virtual_stack_vars_rtx;
+ regno_reg_rtx[VIRTUAL_STACK_DYNAMIC_REGNUM] = virtual_stack_dynamic_rtx;
+ regno_reg_rtx[VIRTUAL_OUTGOING_ARGS_REGNUM] = virtual_outgoing_args_rtx;
+ regno_reg_rtx[VIRTUAL_CFA_REGNUM] = virtual_cfa_rtx;
+}
+
/* Initialize data structures and variables in this file
before generating rtl for each function. */
@@ -3339,11 +3351,7 @@ init_emit ()
bzero ((char *) regno_reg_rtx, regno_pointer_flag_length * sizeof (rtx));
/* Put copies of all the virtual register rtx into regno_reg_rtx. */
- regno_reg_rtx[VIRTUAL_INCOMING_ARGS_REGNUM] = virtual_incoming_args_rtx;
- regno_reg_rtx[VIRTUAL_STACK_VARS_REGNUM] = virtual_stack_vars_rtx;
- regno_reg_rtx[VIRTUAL_STACK_DYNAMIC_REGNUM] = virtual_stack_dynamic_rtx;
- regno_reg_rtx[VIRTUAL_OUTGOING_ARGS_REGNUM] = virtual_outgoing_args_rtx;
- regno_reg_rtx[VIRTUAL_CFA_REGNUM] = virtual_cfa_rtx;
+ init_virtual_regs ();
/* Indicate that the virtual registers and stack locations are
all pointers. */
diff --git a/gcc/integrate.c b/gcc/integrate.c
index ad73bd5..d3fb05b 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -561,10 +561,7 @@ save_for_inline_copying (fndecl)
regno_reg_rtx = reg_map;
/* Put copies of all the virtual register rtx into the new regno_reg_rtx. */
- regno_reg_rtx[VIRTUAL_INCOMING_ARGS_REGNUM] = virtual_incoming_args_rtx;
- regno_reg_rtx[VIRTUAL_STACK_VARS_REGNUM] = virtual_stack_vars_rtx;
- regno_reg_rtx[VIRTUAL_STACK_DYNAMIC_REGNUM] = virtual_stack_dynamic_rtx;
- regno_reg_rtx[VIRTUAL_OUTGOING_ARGS_REGNUM] = virtual_outgoing_args_rtx;
+ init_virtual_regs ();
/* Likewise each label rtx must have a unique rtx as its copy. */
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 8b88a7e..dc432f3 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1310,6 +1310,7 @@ extern void add_insn_after PROTO ((rtx, rtx));
extern void reorder_insns_with_line_notes PROTO ((rtx, rtx, rtx));
extern void emit_insn_after_with_line_notes PROTO ((rtx, rtx, rtx));
extern enum rtx_code classify_insn PROTO ((rtx));
+extern void init_virtual_regs PROTO ((void));
extern rtx emit PROTO ((rtx));
/* Query and clear/ restore no_line_numbers. This is used by the
switch / case handling in stmt.c to give proper line numbers in
diff --git a/gcc/testsuite/g++.old-deja/g++.other/local2.C b/gcc/testsuite/g++.old-deja/g++.other/local2.C
new file mode 100644
index 0000000..2d17b33
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/local2.C
@@ -0,0 +1,10 @@
+// Build don't link:
+// Special g++ Options: -O2
+
+void f ()
+{
+ struct Init {
+ Init () {
+ }
+ };
+}