This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Fix ICE for vec_ld and vec_st of array when compiled with g++
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- Date: Fri, 3 Jun 2016 13:17:03 -0500
- Subject: Re: [PATCH, rs6000] Fix ICE for vec_ld and vec_st of array when compiled with g++
- Authentication-results: sourceware.org; auth=none
- References: <91EC9DA4-2497-46BC-960D-0C20C050B244 at linux dot vnet dot ibm dot com>
On Fri, Jun 03, 2016 at 11:41:26AM -0500, Bill Schmidt wrote:
> When changing vec_ld and vec_st to be expanded during parsing, I
> missed a subtle case that happens only for C++. If the base address
> argument has an array type, this doesnât get converted to a pointer.
> For our purposes, we need the pointer, and itâs safe to make that
> conversion, so this patch performs that adjustment. Iâve added a
> test to the C++ torture bucket to verify this now works.
>
> Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no
> regressions. Is this ok for trunk, and eventual backport to the 6 branch?
Okay. A few questions about the testcase...
> +++ b/gcc/testsuite/g++.dg/torture/ppc-ldst-array.C
> @@ -0,0 +1,18 @@
> +/* { dg-do compile { target { powerpc64*-*-* } } } */
> +/* { dg-skip-if "do not override mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
> +/* { dg-options "-O0 -mcpu=power8" } */
It's torture, do you need to force -O0? And the skip isn't necessary I think?
Segher