aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-07-14 23:04:45 +0000
committerJeff Law <law@gcc.gnu.org>1999-07-14 17:04:45 -0600
commit40c0c3cf73f72f33767cfe1d35c82a2533667ba3 (patch)
tree3c92b146117019253e661275aba5815528562f9a /gcc
parent87afbee625a00e6f657534f7959a28cec762320c (diff)
downloadgcc-40c0c3cf73f72f33767cfe1d35c82a2533667ba3.zip
gcc-40c0c3cf73f72f33767cfe1d35c82a2533667ba3.tar.gz
gcc-40c0c3cf73f72f33767cfe1d35c82a2533667ba3.tar.bz2
emit-rtl.c (gen_realpart): Issue an error for cases GCC can not handle at this time instead of silently...
* emit-rtl.c (gen_realpart): Issue an error for cases GCC can not handle at this time instead of silently generating incorrect code. (gen_imagpart): Likewise. From-SVN: r28105
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/emit-rtl.c10
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 62228a9..d854d08 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
Wed Jul 14 23:28:06 1999 Jeffrey A Law (law@cygnus.com)
+ * emit-rtl.c (gen_realpart): Issue an error for cases GCC can not
+ handle at this time instead of silently generating incorrect code.
+ (gen_imagpart): Likewise.
+
* reload.c (find_reloads): Emit a USE for a pseudo register without
a hard register if we could not create an optional reload for the
pseudo.
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 0b310f2..4519a23 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -966,6 +966,11 @@ gen_realpart (mode, x)
{
if (GET_CODE (x) == CONCAT && GET_MODE (XEXP (x, 0)) == mode)
return XEXP (x, 0);
+ else if (WORDS_BIG_ENDIAN
+ && GET_MODE_BITSIZE (mode) < BITS_PER_WORD
+ && REG_P (x)
+ && REGNO (x) < FIRST_PSEUDO_REGISTER)
+ fatal ("Unable to access real part of complex value in a hard register on this target");
else if (WORDS_BIG_ENDIAN)
return gen_highpart (mode, x);
else
@@ -984,6 +989,11 @@ gen_imagpart (mode, x)
return XEXP (x, 1);
else if (WORDS_BIG_ENDIAN)
return gen_lowpart (mode, x);
+ else if (!WORDS_BIG_ENDIAN
+ && GET_MODE_BITSIZE (mode) < BITS_PER_WORD
+ && REG_P (x)
+ && REGNO (x) < FIRST_PSEUDO_REGISTER)
+ fatal ("Unable to access imaginary part of complex value in a hard register on this target");
else
return gen_highpart (mode, x);
}