* genrecog.c (write_switch): Avoid outputting of switch for
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 May 2001 10:06:20 +0000 (10:06 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 9 May 2001 10:06:20 +0000 (10:06 +0000)
types wider than int.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41922 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/genrecog.c

index a5e6fd2..8e72bd4 100644 (file)
@@ -1,3 +1,8 @@
+Wed May  9 12:05:39 CEST 2001  Jan Hubicka  <jh@suse.cz>
+
+       * genrecog.c (write_switch): Avoid outputting of switch for
+       types wider than int.
+
 2001-05-03  Andrew Haley  <aph@cambridge.redhat.com>
 
        * reload1.c (copy_eh_notes): New function.
index 5d64378..ba40437 100644 (file)
@@ -1860,6 +1860,10 @@ write_switch (start, depth)
           || type == DT_elt_one_int
           || type == DT_elt_zero_wide)
     {
+      /* The argument is casted to int.  In case HOST_WIDE_INT is more exact,
+         we can't safely construct switch statement over it.  */
+      if (type == DT_elt_zero_wide && HOST_BITS_PER_WIDE_INT > sizeof (int) * CHAR_BIT)
+         return p;
       printf ("  switch (");
       switch (type)
        {