summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2014-01-03 15:54:12 +0000
committerpfg <pfg@FreeBSD.org>2014-01-03 15:54:12 +0000
commit9a82e509569ff74c1002158301932901028fffe7 (patch)
treef3fe0b8fc5cd98aad0a7b8c3b6635aaf6b625b86
parentb1d31e28109c70d3cf066cc72e027163f211add7 (diff)
downloadFreeBSD-src-9a82e509569ff74c1002158301932901028fffe7.zip
FreeBSD-src-9a82e509569ff74c1002158301932901028fffe7.tar.gz
MFC r259655 (partial), r259944:
gcc: merge small upstream changes. Fix for PR c++/29928 Backport from mainline: 2007-04-24 Hui-May Chang <hm.chang@apple.com> * reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction. Obtained from: gcc 4.3 (rev. r124115, 124724: GPLv2)
-rw-r--r--contrib/gcc/ChangeLog.gcc435
-rw-r--r--contrib/gcc/cp/ChangeLog.gcc436
-rw-r--r--contrib/gcc/cp/rtti.c4
-rw-r--r--contrib/gcc/reload1.c27
4 files changed, 31 insertions, 11 deletions
diff --git a/contrib/gcc/ChangeLog.gcc43 b/contrib/gcc/ChangeLog.gcc43
index a6b6908..e997b96 100644
--- a/contrib/gcc/ChangeLog.gcc43
+++ b/contrib/gcc/ChangeLog.gcc43
@@ -145,6 +145,11 @@
alignment for amdfam10 architecture. Increasing the max loop
alignment to 24 bytes.
+2007-04-24 Hui-May Chang <hm.chang@apple.com> (r124115)
+
+ * reload1.c (merge_assigned_reloads) : Do not merge a RELOAD_OTHER
+ instruction with a RELOAD_FOR_OPERAND_ADDRESS instruction.
+
2007-04-16 Lawrence Crowl <crowl@google.com> (r123909)
* doc/invoke.texi (Debugging Options): Add documentation for the
diff --git a/contrib/gcc/cp/ChangeLog.gcc43 b/contrib/gcc/cp/ChangeLog.gcc43
index c291237..056fc15 100644
--- a/contrib/gcc/cp/ChangeLog.gcc43
+++ b/contrib/gcc/cp/ChangeLog.gcc43
@@ -33,6 +33,12 @@
* mangle.c (write_real_cst): Use 'unsigned long' for %lx.
+2007-05-14 Paolo Carlini <pcarlini@suse.de> (r124724)
+
+ PR c++/29928
+ * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
+ type only if is a class type (5.2.8/4).
+
2007-05-05 Geoffrey Keating <geoffk@apple.com> (r124467)
PR 31775
diff --git a/contrib/gcc/cp/rtti.c b/contrib/gcc/cp/rtti.c
index 5e58e5c..f1a045c 100644
--- a/contrib/gcc/cp/rtti.c
+++ b/contrib/gcc/cp/rtti.c
@@ -238,7 +238,7 @@ get_tinfo_decl_dynamic (tree exp)
/* Peel off cv qualifiers. */
type = TYPE_MAIN_VARIANT (type);
- if (!VOID_TYPE_P (type))
+ if (CLASS_TYPE_P (type))
type = complete_type_or_else (type, exp);
if (!type)
@@ -430,7 +430,7 @@ get_typeid (tree type)
that is the operand of typeid are always ignored. */
type = TYPE_MAIN_VARIANT (type);
- if (!VOID_TYPE_P (type))
+ if (CLASS_TYPE_P (type))
type = complete_type_or_else (type, NULL_TREE);
if (!type)
diff --git a/contrib/gcc/reload1.c b/contrib/gcc/reload1.c
index 30ea7f3..0cc2e7f 100644
--- a/contrib/gcc/reload1.c
+++ b/contrib/gcc/reload1.c
@@ -6238,15 +6238,23 @@ merge_assigned_reloads (rtx insn)
transfer_replacements (i, j);
}
- /* If this is now RELOAD_OTHER, look for any reloads that load
- parts of this operand and set them to RELOAD_FOR_OTHER_ADDRESS
- if they were for inputs, RELOAD_OTHER for outputs. Note that
- this test is equivalent to looking for reloads for this operand
- number. */
- /* We must take special care with RELOAD_FOR_OUTPUT_ADDRESS; it may
- share registers with a RELOAD_FOR_INPUT, so we can not change it
- to RELOAD_FOR_OTHER_ADDRESS. We should never need to, since we
- do not modify RELOAD_FOR_OUTPUT. */
+ /* If this is now RELOAD_OTHER, look for any reloads that
+ load parts of this operand and set them to
+ RELOAD_FOR_OTHER_ADDRESS if they were for inputs,
+ RELOAD_OTHER for outputs. Note that this test is
+ equivalent to looking for reloads for this operand
+ number.
+
+ We must take special care with RELOAD_FOR_OUTPUT_ADDRESS;
+ it may share registers with a RELOAD_FOR_INPUT, so we can
+ not change it to RELOAD_FOR_OTHER_ADDRESS. We should
+ never need to, since we do not modify RELOAD_FOR_OUTPUT.
+
+ It is possible that the RELOAD_FOR_OPERAND_ADDRESS
+ instruction is assigned the same register as the earlier
+ RELOAD_FOR_OTHER_ADDRESS instruction. Merging these two
+ instructions will cause the RELOAD_FOR_OTHER_ADDRESS
+ instruction to be deleted later on. */
if (rld[i].when_needed == RELOAD_OTHER)
for (j = 0; j < n_reloads; j++)
@@ -6254,6 +6262,7 @@ merge_assigned_reloads (rtx insn)
&& rld[j].when_needed != RELOAD_OTHER
&& rld[j].when_needed != RELOAD_FOR_OTHER_ADDRESS
&& rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
+ && rld[j].when_needed != RELOAD_FOR_OPERAND_ADDRESS
&& (! conflicting_input
|| rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS
|| rld[j].when_needed == RELOAD_FOR_INPADDR_ADDRESS)
OpenPOWER on IntegriCloud