summaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorechristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-09-26 21:39:14 +0000
committerechristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-09-26 21:39:14 +0000
commit52a1461180b27b592219b18a1ce36f7c5800ef23 (patch)
tree34b3332ef230bf8803ef36ae89dea79af18bdcea /gcc/except.c
parentb44dc256b9239df0b6fcd8fb4388609e0f7c77d3 (diff)
downloadgcc-52a1461180b27b592219b18a1ce36f7c5800ef23.tar.gz
2002-09-24 Eric Christopher <echristo@redhat.com>
* except.c (expand_builtin_extract_return_address): Handle case where Pmode != ptr_mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57552 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/except.c b/gcc/except.c
index 26a231b87db..08c0aa27ab2 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2993,6 +2993,16 @@ expand_builtin_extract_return_addr (addr_tree)
{
rtx addr = expand_expr (addr_tree, NULL_RTX, Pmode, 0);
+ if (GET_MODE (addr) != Pmode
+ && GET_MODE (addr) != VOIDmode)
+ {
+#ifdef POINTERS_EXTEND_UNSIGNED
+ addr = convert_memory_address (Pmode, addr);
+#else
+ addr = convert_to_mode (Pmode, addr, 0);
+#endif
+ }
+
/* First mask out any unwanted bits. */
#ifdef MASK_RETURN_ADDR
expand_and (Pmode, addr, MASK_RETURN_ADDR, addr);