aboutsummaryrefslogtreecommitdiff
path: root/gcc/genrecog.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-05-09 12:06:20 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2001-05-09 10:06:20 +0000
commit4ea7a307cf53a8be78fb0ef4c8031fa40746f768 (patch)
tree5854b87d364c530d709eed6da005ba4c60ac6efd /gcc/genrecog.c
parent710bbed09da25b2e26526df3ecb6d9e2a327bd41 (diff)
downloadgcc-4ea7a307cf53a8be78fb0ef4c8031fa40746f768.zip
gcc-4ea7a307cf53a8be78fb0ef4c8031fa40746f768.tar.gz
gcc-4ea7a307cf53a8be78fb0ef4c8031fa40746f768.tar.bz2
genrecog.c (write_switch): Avoid outputting of switch for types wider than int.
* genrecog.c (write_switch): Avoid outputting of switch for types wider than int. From-SVN: r41922
Diffstat (limited to 'gcc/genrecog.c')
-rw-r--r--gcc/genrecog.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/genrecog.c b/gcc/genrecog.c
index 5d64378..ba40437 100644
--- a/gcc/genrecog.c
+++ b/gcc/genrecog.c
@@ -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)
{