http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57896 --- Comment #9 from UroÅ¡ Bizjak --- (In reply to Vittorio Zecca from comment #6) > As an aside, in gcc 4.8.1 source code, before line 6995 of gcc/expr.c I put > > printf("\nexpr.c:6995 value->code=%d NUM_RTX_CODE=%d\n",(int) > value->code,NUM_RTX_CODE); > gcc_assert((int) value->code < NUM_RTX_CODE); > > and I get an ICE there because value->code is 34816 and NUM_RTX_CODE is 145 > > Indeed at line 6995 ARITHMETIC_P (value) accesses rtx_class[(int) > value->code] > but the array rtx_class has only NUM_RTX_CODE elements. > However, I do not know how this is relevant to this issue. This one points to infrastructure problem. Adding a debug patch: --cut here-- Index: explow.c =================================================================== --- explow.c (revision 207910) +++ explow.c (working copy) @@ -186,8 +186,13 @@ plus_constant (enum machine_mode mode, rtx x, HOST } if (c != 0) - x = gen_rtx_PLUS (mode, x, GEN_INT (c)); + { + rtx z = GEN_INT (c); + printf ("cccccc, %li\n", c); + debug_rtx (z); + x = gen_rtx_PLUS (mode, x, z); + } if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF) return x; else if (all_constant) --cut here-- ~/gcc-build-48/gcc/cc1 pr57896.c ... __get_cpuidcccccc, -4 (const_int -4 [0xfffffffffffffffc]) cccccc, -16 (const_int -16 [0xfffffffffffffff0]) cccccc, -24 (const_int -24 [0xffffffffffffffe8]) cccccc, -32 (const_int -32 [0xffffffffffffffe0]) cccccc, -40 (??? bad code 47104 ) pr57896.c: In function ‘__get_cpuid’: pr57896.c:5:5: internal compiler error: in emit_move_insn_1, at expr.c:3437 int __get_cpuid (unsigned int __level, unsigned int *__eax, unsigned int *__ebx, unsigned int *__ecx, unsigned int *__edx) { ^ 0x62d74d emit_move_insn_1(rtx_def*, rtx_def*) /home/uros/gcc-svn/branches/gcc-4_8-branch/gcc/expr.c:3437 0x62d7b5 emit_move_insn(rtx_def*, rtx_def*) /home/uros/gcc-svn/branches/gcc-4_8-branch/gcc/expr.c:3535 Please note that the debug patch only encloses GEN_INT (...) >From gcc-bugs-return-444241-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Feb 19 18:03:54 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 15188 invoked by alias); 19 Feb 2014 18:03:54 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 14781 invoked by uid 48); 19 Feb 2014 18:03:48 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/37743] Bogus printf format warning with __builtin_bswap32. Date: Wed, 19 Feb 2014 18:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg01998.txt.bz2 Content-length: 299 http://gcc.gnu.org/bugzilla/show_bug.cgi?id7743 --- Comment #12 from Jakub Jelinek --- Created attachment 32173 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id2173&actioníit gcc49-pr37743.patch Untested fix. The deprecation can hopefully be done separately.