recog.c (validate_replace_rtx_1): Instead of aborting just make sure the change won...
authorJakub Jelinek <jakub@redhat.com>
Wed, 4 Apr 2001 15:14:24 +0000 (17:14 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 4 Apr 2001 15:14:24 +0000 (17:14 +0200)
* 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.

From-SVN: r41083

gcc/ChangeLog
gcc/recog.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20010326-1.c [new file with mode: 0644]

index d99ef4affcb95d17926dc40248a8c186445eacd5..5f23f3cd69469149a066e214732bd1c2de38a86a 100644 (file)
@@ -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.
index bc7c712de24816ef1deaae97b8251c6b2dc77ec0..bbecd5b719e10385c805680c43cb40ea3d036f10 100644 (file)
@@ -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)
                  {
index c72d2def208ba3247f38b20d1eee2381c2234f81..225f9280257186a0b7f54a38d6cb947806470779 100644 (file)
@@ -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 (file)
index 0000000..43acf45
--- /dev/null
@@ -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;
+}