This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix expand_debug_expr ICE on generic vectors (PR debug/44136)


On Fri, May 14, 2010 at 8:08 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> With generic vectors we end up with (concatn:BLK [4x (const_double:SF 0)])
> and similar stuff in op0.
>
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux.
> Ok for trunk?

Ok.

Thanks,
Richard.

> 2010-05-14 ?Jakub Jelinek ?<jakub@redhat.com>
>
> ? ? ? ?PR debug/44136
> ? ? ? ?* cfgexpand.c (expand_debug_expr): If non-memory op0
> ? ? ? ?has BLKmode, return NULL.
>
> ? ? ? ?* gcc.dg/pr44136.c: New test.
>
> --- gcc/cfgexpand.c.jj ?2010-05-07 17:47:38.000000000 +0200
> +++ gcc/cfgexpand.c ? ? 2010-05-14 13:09:42.000000000 +0200
> @@ -2561,13 +2561,14 @@ expand_debug_expr (tree exp)
> ? ? ? ? if (bitpos < 0)
> ? ? ? ? ? return NULL;
>
> + ? ? ? if (GET_MODE (op0) == BLKmode)
> + ? ? ? ? return NULL;
> +
> ? ? ? ?if ((bitpos % BITS_PER_UNIT) == 0
> ? ? ? ? ? ?&& bitsize == GET_MODE_BITSIZE (mode1))
> ? ? ? ? ?{
> ? ? ? ? ? ?enum machine_mode opmode = GET_MODE (op0);
>
> - ? ? ? ? ? gcc_assert (opmode != BLKmode);
> -
> ? ? ? ? ? ?if (opmode == VOIDmode)
> ? ? ? ? ? ? ?opmode = mode1;
>
> --- gcc/testsuite/gcc.dg/pr44136.c.jj ? 2010-05-14 16:59:19.000000000 +0200
> +++ gcc/testsuite/gcc.dg/pr44136.c ? ? ?2010-05-14 17:00:14.000000000 +0200
> @@ -0,0 +1,27 @@
> +/* PR debug/44136 */
> +/* { dg-do compile } */
> +/* { dg-options "-w -O2 -g" } */
> +/* { dg-options "-w -O2 -g -mno-sse" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
> +
> +#define vector __attribute((vector_size(16)))
> +vector float a;
> +
> +float
> +foo (float b)
> +{
> + ?vector float c = { 0, 0, 0, 0 };
> + ?vector float d = { 0, 0, 0, 0 };
> + ?d += c;
> + ?return ((float *)&c)[2];
> +}
> +
> +float
> +bar (vector float a, int b, vector float c)
> +{
> + ?vector float e = c * a;
> + ?a = (vector float) { 0, 0, 0, 0 };
> + ?c = (vector float) { 0, 0, 0, 0 };
> + ?float d = ((float *)&a)[0];
> + ?float f = ((float *)&c)[0];
> + ?return d * f;
> +}
>
> ? ? ? ?Jakub
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]