summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-04 15:14:24 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-04 15:14:24 +0000
commit1c49fb1f6d95bd8a5c98fc9417f9354a3f368066 (patch)
treeec8563114db54fbaaa6a2bcedb46d6d00989d62a /gcc
parent9193bd65cc0783a5fc8a85ee46117c0877b5c3df (diff)
downloadgcc-1c49fb1f6d95bd8a5c98fc9417f9354a3f368066.tar.gz
* recog.c (validate_replace_rtx_1): Instead of aborting just make
sure the change won't be validated. * gcc.c-torture/compile/20010326-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41083 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/recog.c8
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20010326-1.c16
4 files changed, 32 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d99ef4affcb..5f23f3cd694 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-04 Jakub Jelinek <jakub@redhat.com>
+
+ * recog.c (validate_replace_rtx_1): Instead of aborting just make
+ sure the change won't be validated.
+
Wed Apr 4 00:45:38 EDT 2001 John Wehle (john@feith.com)
* rtl.h (set_noop_p): Declare.
diff --git a/gcc/recog.c b/gcc/recog.c
index bc7c712de24..bbecd5b719e 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -625,7 +625,13 @@ validate_replace_rtx_1 (loc, from, to, object)
inner_mode = SImode;
if (GET_MODE_CLASS (mode) != MODE_INT)
- abort ();
+ {
+ /* Substitute in something that we know won't be
+ recognized. */
+ to = gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
+ validate_change (object, loc, to, 1);
+ return;
+ }
if (BYTES_BIG_ENDIAN || WORDS_BIG_ENDIAN)
{
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c72d2def208..225f9280257 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2001-04-04 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.c-torture/compile/20010326-1.c: New test.
+
2001-04-03 Alexandre Oliva <aoliva@redhat.com>
* g++.old-deja/g++.ext/instantiate1.C: Adjust to accommodate
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010326-1.c b/gcc/testsuite/gcc.c-torture/compile/20010326-1.c
new file mode 100644
index 00000000000..43acf4588ca
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20010326-1.c
@@ -0,0 +1,16 @@
+float d;
+int e, f;
+
+void foo (void)
+{
+ struct { float u, v; } a = {0.0, 0.0};
+ float b;
+ int c;
+
+ c = e;
+ if (c == 0)
+ c = f;
+ b = d;
+ if (a.v < b)
+ a.v = b;
+}