From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85388 invoked by alias); 24 Feb 2015 14:26:46 -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 Received: (qmail 85352 invoked by uid 48); 24 Feb 2015 14:26:43 -0000 From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65192] New: [avr-tiny] ICE in tiny_valid_direct_memory_access_range Date: Tue, 24 Feb 2015 14:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: ice-checking X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: senthil_kumar.selvaraj at atmel dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cf_gcctarget Message-ID: 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: 2015-02/txt/msg02653.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65192 Bug ID: 65192 Summary: [avr-tiny] ICE in tiny_valid_direct_memory_access_range Product: gcc Version: 5.0 Status: UNCONFIRMED Keywords: ice-checking Severity: normal Priority: P3 Component: target Assignee: senthil_kumar.selvaraj at atmel dot com Reporter: gjl at gcc dot gnu.org Target: avr if configured with --enable-checking=all avr-gcc 5.0 fails to build libgcc for avrtiny: conftest.c:11:1: internal compiler error: RTL check: expected elt 0 type 'e' or 'u', have 'i' (rtx reg) in tiny_valid_direct_memory_access_range, at config/avr/avr.c:3228 main () ^ 0x8721938 rtl_check_failed_type2(rtx_def const*, int, int, int, char const*, int, char const*) ../../../gcc.gnu.org/trunk/gcc/rtl.c:722 0x8abfcac tiny_valid_direct_memory_access_range(rtx_def*, machine_mode) ../../../gcc.gnu.org/trunk/gcc/config/avr/avr.c:3228 0x8b08e6f gen_movsi(rtx_def*, rtx_def*) ../../../gcc.gnu.org/trunk/gcc/config/avr/avr.md:680 0x83fc788 insn_gen_fn::operator()(rtx_def*, rtx_def*) const ../../../gcc.gnu.org/trunk/gcc/recog.h:303 0x83fc788 emit_move_insn_1(rtx_def*, rtx_def*) ../../../gcc.gnu.org/trunk/gcc/expr.c:3546 0x83fcb6b emit_move_insn(rtx_def*, rtx_def*) ../../../gcc.gnu.org/trunk/gcc/expr.c:3641 0x82e3f23 init_set_costs() ../../../gcc.gnu.org/trunk/gcc/cfgloopanal.c:371 0x87806ce backend_init_target ../../../gcc.gnu.org/trunk/gcc/toplev.c:1717 0x87806ce initialize_rtl() ../../../gcc.gnu.org/trunk/gcc/toplev.c:1820 0x84869ed init_function_start(tree_node*) ../../../gcc.gnu.org/trunk/gcc/function.c:4892 0x830c3a6 cgraph_node::expand() ../../../gcc.gnu.org/trunk/gcc/cgraphunit.c:1857 0x830dca6 expand_all_functions ../../../gcc.gnu.org/trunk/gcc/cgraphunit.c:2006 0x830dca6 symbol_table::compile() ../../../gcc.gnu.org/trunk/gcc/cgraphunit.c:2359 0x830fa5c symbol_table::finalize_compilation_unit() ../../../gcc.gnu.org/trunk/gcc/cgraphunit.c:2436 0x817d593 c_write_global_declarations() ../../../gcc.gnu.org/trunk/gcc/c/c-decl.c:10803 Please submit a full bug report, with preprocessed source if appropriate. This is because x = XEXP (op, 0) under the assumption that op is always MEM which is not the case. It might also be REG or SUBREG. BTW, using tiny_valid_direct_memory_access_range or similar in insn condition in order to refuse some addresses is a bad approach. Better use legitimate_address_p and similar hooks.