diff options
-rw-r--r-- | gcc/config/i386/i386.cc | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr79754.c | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index 6b97a2b..cf246e7 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -1876,10 +1876,14 @@ type_natural_mode (const_tree type, const CUMULATIVE_ARGS *cum, { machine_mode innermode = TYPE_MODE (TREE_TYPE (type)); - /* There are no XFmode vector modes. */ + /* There are no XFmode vector modes ... */ if (innermode == XFmode) return mode; + /* ... and no decimal float vector modes. */ + if (DECIMAL_FLOAT_MODE_P (innermode)) + return mode; + if (TREE_CODE (TREE_TYPE (type)) == REAL_TYPE) mode = MIN_MODE_VECTOR_FLOAT; else diff --git a/gcc/testsuite/gcc.target/i386/pr79754.c b/gcc/testsuite/gcc.target/i386/pr79754.c new file mode 100644 index 0000000..27845c9 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr79754.c @@ -0,0 +1,7 @@ +/* PR target/79754 */ +/* { dg-do compile } */ +/* { dg-options "-Wno-psabi" } */ + +typedef _Decimal32 V __attribute__ ((vector_size(16))); + +V fn1 (V a) { return a; } |