This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix ICE in mem_loc_descriptor (PR debug/49567)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Jun 2011 10:18:36 +0200
- Subject: [committed] Fix ICE in mem_loc_descriptor (PR debug/49567)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
My assumption that SIGN/ZERO_EXTEND will always have MODE_INT class mode
was provably wrong, as can be seen on the attached testcase where mode
is integer vector. Fixed thusly, bootstrapped/regtested on x86_64-linux
and i686-linux, committed as obvious.
2011-06-29 Jakub Jelinek <jakub@redhat.com>
PR debug/49567
* dwarf2out.c (mem_loc_descriptor) <case ZERO_EXTEND>: Give up
for non-MODE_INT modes instead of asserting the mode has MODE_INT
class.
* gcc.target/i386/pr49567.c: New test.
--- gcc/dwarf2out.c.jj 2011-06-23 10:13:58.000000000 +0200
+++ gcc/dwarf2out.c 2011-06-28 16:12:08.000000000 +0200
@@ -14762,7 +14762,8 @@ mem_loc_descriptor (rtx rtl, enum machin
case SIGN_EXTEND:
case ZERO_EXTEND:
- gcc_assert (GET_MODE_CLASS (mode) == MODE_INT);
+ if (GET_MODE_CLASS (mode) != MODE_INT)
+ break;
op0 = mem_loc_descriptor (XEXP (rtl, 0), GET_MODE (XEXP (rtl, 0)),
mem_mode, VAR_INIT_STATUS_INITIALIZED);
if (op0 == 0)
--- gcc/testsuite/gcc.target/i386/pr49567.c.jj 2011-06-28 19:02:11.000000000 +0200
+++ gcc/testsuite/gcc.target/i386/pr49567.c 2011-06-28 19:01:41.000000000 +0200
@@ -0,0 +1,13 @@
+/* PR debug/49567 */
+/* { dg-do compile } */
+/* { dg-options "-g -O2 -msse4" } */
+
+#include <x86intrin.h>
+
+__m128
+foo (__m128i x)
+{
+ __m128i y;
+ y = _mm_cvtepi16_epi32 (x);
+ return _mm_cvtepi32_ps (y);
+}
Jakub