From patchwork Mon Jun 6 17:51:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [committed] Fix ICE on vector shift in dwarf2out (PR debug/49294) Date: Mon, 06 Jun 2011 07:51:45 -0000 From: Jakub Jelinek X-Patchwork-Id: 98968 Message-Id: <20110606175145.GU17079@tyan-ft48-01.lab.bos.redhat.com> To: gcc-patches@gcc.gnu.org Hi! Trying to create vector zero_extend is wrong, while mem_loc_descriptor will for now fail for vector modes, the code attempted to expand zero_extend anyway. Fixed thusly, committed to trunk as obvious after bootstrapping/regtesting on x86_64-linux and i686-linux. 2011-06-06 Jakub Jelinek PR debug/49294 * dwarf2out.c (mem_loc_descriptor) : Give up for non-MODE_INT modes. * gcc.dg/debug/pr49294.c: New test. Jakub --- gcc/dwarf2out.c.jj 2011-06-06 10:24:41.000000000 +0200 +++ gcc/dwarf2out.c 2011-06-06 10:30:05.000000000 +0200 @@ -14904,6 +14904,8 @@ mem_loc_descriptor (rtx rtl, enum machin goto do_shift; do_shift: + if (GET_MODE_CLASS (mode) != MODE_INT) + break; op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode, VAR_INIT_STATUS_INITIALIZED); { --- gcc/testsuite/gcc.dg/debug/pr49294.c.jj 2011-06-06 10:39:41.000000000 +0200 +++ gcc/testsuite/gcc.dg/debug/pr49294.c 2011-06-06 10:39:21.000000000 +0200 @@ -0,0 +1,14 @@ +/* PR debug/49294 */ +/* { dg-do compile } */ + +typedef __attribute__ ((vector_size ((8) * sizeof (short)))) short V; + +int k; +V v; + +void +foo (void) +{ + V w = { k, k, k, k, k, k, k, k }; + V x = v >> w; +}