From patchwork Wed Aug 12 14:37:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 506673 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8F83D14016A for ; Thu, 13 Aug 2015 00:37:19 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=ZnPaCtIu; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=u4YC2N0ux7f6Z71V82UFgDmLrQ95TegRUE8c7b8oQFFhYO /KkIG2ERi90AjCmC814M0X4BMYUplDzeZ42W1+sw+DWCzRitj5FVmBaIJU1XT2O6 uG9KjlpVkhfrzzPhG9hAmMHKMvPTt1ZmKLg8PPwHwRSkPisDxr4nrDtndZ8xA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=P+VWY+6DrVr2sHExfsVNgE0oG/o=; b=ZnPaCtIuXPso/c8BgU0W a14xiRj2xPxriBmUXsb7UpQ9tbGkSbKmqemO0tgB7jITTFdkncxdbaIkxDTuoRir Nh3QMHHFinlLz+5P38yP7UizvXjo9sLZV56I95EQPG9rdvCleYHIkopvnWG2MO+4 JJVXM9yD/QDcrL3aJZAO/Fg= Received: (qmail 110605 invoked by alias); 12 Aug 2015 14:37:12 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 110594 invoked by uid 89); 12 Aug 2015 14:37:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 12 Aug 2015 14:37:11 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-34-eNk7zcimRgONZ5QbqhzDPg-1; Wed, 12 Aug 2015 15:37:05 +0100 Received: from [10.2.207.50] ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 12 Aug 2015 15:37:05 +0100 Message-ID: <55CB5A10.80203@arm.com> Date: Wed, 12 Aug 2015 15:37:04 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH][AArch64][committed] Do not ICE after apologising for -mcmodel=large -fPIC X-MC-Unique: eNk7zcimRgONZ5QbqhzDPg-1 X-IsSubscribed: yes Hi all, If we try to compile a file with -mcmodel=large -fPIC we will emit a sorry in initialize_aarch64_code_model because that combination is not implemented. However, there is a missing break in that case statement and we end up falling through to the gcc_unreachable and ICE'ing. The right thing here is to break. The sorry () already suppresses generation of any result so there's no risk of proceeding with wrong codegen. Bootstrappped and tested on aarch64. Applied as obvious with r226815. Thanks, Kyrill 2015-08-12 Kyrylo Tkachov * config/aarch64/aarch64.c (initialize_aarch64_code_model): Break after -mcmodel=large -fPIC sorry. commit 227760c90ec4316193f5a4b8a11378faedb3e039 Author: Kyrylo Tkachov Date: Mon Aug 10 16:09:14 2015 +0100 [AArch64] Do not ICE after apologising for -mcmodel=large -fPIC diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index e00a069..87ed777 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -7950,6 +7950,7 @@ initialize_aarch64_code_model (struct gcc_options *opts) case AARCH64_CMODEL_LARGE: sorry ("code model %qs with -f%s", "large", opts->x_flag_pic > 1 ? "PIC" : "pic"); + break; default: gcc_unreachable (); }