From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9509 invoked by alias); 26 Dec 2013 09:41:41 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 9496 invoked by uid 89); 26 Dec 2013 09:41:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: SJOEDG01.corp.atmel.com Received: from nasmtp02.atmel.com (HELO SJOEDG01.corp.atmel.com) (204.2.163.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 26 Dec 2013 09:41:38 +0000 Received: from apsmtp01.atmel.com (10.168.254.31) by sjoedg01.corp.atmel.com (10.64.253.30) with Microsoft SMTP Server (TLS) id 14.2.347.0; Thu, 26 Dec 2013 01:50:27 -0800 Received: from PENCHT01.corp.atmel.com (10.168.5.161) by apsmtp01.atmel.com (10.168.254.31) with Microsoft SMTP Server (TLS) id 14.2.347.0; Thu, 26 Dec 2013 17:49:48 +0800 Received: from atmel.com (10.168.5.13) by cas-ap.atmel.com (10.168.5.161) with Microsoft SMTP Server (TLS) id 14.2.342.3; Thu, 26 Dec 2013 17:41:26 +0800 Date: Thu, 26 Dec 2013 09:41:00 -0000 From: Senthil Kumar Selvaraj To: CC: Subject: [IRA] Segfault in ira_costs.c:find_costs_and_classes for AVR target Message-ID: <20131226094124.GA28905@atmel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline User-Agent: Mutt/1.5.22 (2013-10-16) X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00223.txt.bz2 Hi, gcc.c-torture/compile/pr34856.c and a couple of other tests segfault for the AVR target. Looking at the code, I found that the x_ira_register_move_cost array[TImode] is NULL, while the code goes on to dereference it (ira_register_move_cost [ALLOCNO_MODE (a)][best][aclass] at line 1832). I looked at the code that populates the array, and found that it does explicitly allow the array to have NULL entries for certain modes, atleast during initialization. I'm not really sure how this should be fixed - is NULL valid or is the AVR target violating some invariant? Regards Senthil