From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24701 invoked by alias); 5 Oct 2010 13:36:29 -0000 Received: (qmail 24615 invoked by uid 22791); 5 Oct 2010 13:36:28 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID,TW_CX X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Oct 2010 13:36:24 +0000 From: "belagod at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/45847] ICE in supportable_widening_operation X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: belagod at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 X-Bugzilla-Changed-Fields: CC In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Tue, 05 Oct 2010 13:36:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-10/txt/msg00404.txt.bz2 Message-ID: <20101005133600.NKbnrBhXI31o7UclvB9NqOhtFOnFX_Ps_wjTDNUje2s@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45847 belagod at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |belagod at gcc dot gnu.org --- Comment #1 from belagod at gcc dot gnu.org 2010-10-05 13:36:16 UTC --- (In reply to comment #0) > The following sample causes gcc ICE on arm > > int decode_subframe_lpc(int channel, int pred_order) > { > int i, j; > int qlevel; > int coeffs[pred_order]; > int *decoded = channel; > long long sum; > for (i = pred_order; i < channel; i++) { > for (j = 0; j < pred_order; j++) > sum += (long long)coeffs[j] * decoded[i-j-1]; > decoded[i] += sum >> qlevel; > } > > return 0; > } > > here is the commandline to reproduce it, it only happens at O3 > > arm-none-linux-gnueabi-gcc-4.6.0 -march=armv7-a -mtune=cortex-a8 -mfpu=neon > -mfloat-abi=softfp flacdec.i -c -O3 > > > here is backtrace > > Analyzing compilation unit > Performing interprocedural optimizations > <*free_lang_data> > Assembling > functions: > decode_subframe_lpc > Program received signal SIGSEGV, Segmentation fault. > 0x085bfa6a in supportable_widening_operation (code=WIDEN_MULT_EXPR, > stmt=0xb7f942d8, vectype_out=0x0, vectype_in=0xb7de8660, decl1=0xbffff26c, > decl2=0xbffff26c, code1=0xbffff268, code2=0xbffff268, > multi_step_cvt=0xbffff264, interm_types=0xbffff260) > at > /home/kraj/work/cross/arm-none-linux-gnueabi/../../gcc-trunk/gcc/tree-vect-stmts.c:5193 > 5193 if (insn_data[icode1].operand[0].mode != TYPE_MODE (wide_vectype) > > > here is the compiler configure > > $ arm-none-linux-gnueabi-gcc-4.6.0 -v > Using built-in specs. > COLLECT_GCC=arm-none-linux-gnueabi-gcc-4.6.0 > COLLECT_LTO_WRAPPER=/home/kraj/work/cross/arm-none-linux-gnueabi/tools/libexec/gcc/arm-none-linux-gnueabi/4.6.0/lto-wrapper > Target: arm-none-linux-gnueabi > Configured with: > /home/kraj/work/cross/arm-none-linux-gnueabi/../../gcc-trunk/configure > --target=arm-none-linux-gnueabi > --prefix=/home/kraj/work/cross/arm-none-linux-gnueabi/tools > --with-sysroot=/home/kraj/work/cross/arm-none-linux-gnueabi/sysroot > --enable-__cxa_atexit --disable-libssp --disable-libgomp --disable-libmudflap > --enable-languages=c,c++ > Thread model: posix > gcc version 4.6.0 20100927 (experimental) (GCC) I've just posted a patch that fixes this. See http://gcc.gnu.org/ml/gcc-patches/2010-10/msg00323.html