diff options
-rw-r--r-- | gcc/match.pd | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr104467.c | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/match.pd b/gcc/match.pd index 4fe5909..d9d8359 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -6943,7 +6943,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) TREE_TYPE (TREE_TYPE (ctor))) ? type : build_vector_type (TREE_TYPE (TREE_TYPE (ctor)), - count)); + count * k)); res = (constant_p ? build_vector_from_ctor (evtype, vals) : build_constructor (evtype, vals)); } diff --git a/gcc/testsuite/gcc.dg/torture/pr104467.c b/gcc/testsuite/gcc.dg/torture/pr104467.c new file mode 100644 index 0000000..c3bfb60 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr104467.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-mavx" { target x86_64-*-* i?86-*-* } } */ + +unsigned long __attribute__((__vector_size__ (8 * sizeof (long)))) u; +signed long __attribute__((__vector_size__ (8 * sizeof (long)))) s; + +void +foo (void) +{ + s &= u + (0, 0); +} |