From 0b64ca40f30eefc43dcfebaaf918a48e1c3b3dcc Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 26 Jul 2016 14:11:21 +0000 Subject: re PR rtl-optimization/71984 (wrong code with -O -mavx512cd) 2016-07-26 Richard Biener PR rtl-optimization/71984 * simplify-rtx.c (simplify_subreg): Use GET_MODE_SIZE and prepare for VOIDmode. * gcc.dg/torture/pr71984.c: New testcase. From-SVN: r238757 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/torture/pr71984.c | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/torture/pr71984.c (limited to 'gcc/testsuite') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5307adf..71d0d84 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-07-26 Richard Biener + + PR rtl-optimization/71984 + * gcc.dg/torture/pr71984.c: New testcase. + 2016-07-26 Robert Suchanek * g++.dg/vect/vect.exp: Add and set new global EFFECTIVE_TARGETS. Call diff --git a/gcc/testsuite/gcc.dg/torture/pr71984.c b/gcc/testsuite/gcc.dg/torture/pr71984.c new file mode 100644 index 0000000..e1dd04b --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr71984.c @@ -0,0 +1,21 @@ +/* { dg-do run { target lp64 } } */ +/* { dg-additional-options "-w -Wno-psabi" } */ + +typedef unsigned char v64u8 __attribute__((vector_size(64))); +typedef unsigned long v64u64 __attribute__((vector_size(64))); +typedef unsigned char u8; + +static u8 __attribute__ ((noinline, noclone)) +foo (v64u64 v64u64_0) +{ + return ((v64u8)(v64u64){0, v64u64_0[0]})[13]; +} + +int +main () +{ + u8 x = foo((v64u64){0x0706050403020100UL}); + if (x != 5) + __builtin_abort (); + return 0; +} -- cgit v1.1