From patchwork Tue Oct 25 14:33:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 686477 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 3t3FyN0rCnz9t2C for ; Wed, 26 Oct 2016 01:33:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=jD25g8Ks; 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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=VhMy/2Vg2jiDrRstEouYsoBzlj0SNpbduPGzqNicp4tHgHZVMa ZF05x5m7cGkTsBBNb1x8eSuuRL3UCkUFIdbYkQSKwSQXqGSgxridkS1dhBBeRHdq hZAoW1zzEx4f06s8udyNVLCQUXAAYnmQOoechjSXQXjrJXHzO71GcKnUQ= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=zjwIpHoBZbCrgETI/l2MvKoTKyg=; b=jD25g8KsH+6RM0Ng6X/o mLouYkj+paQDxKYE/WVZJMxcJypfN4NjYYycWRJIBbQBaG+2/HEfUAL/DY2/Uk4b RQRc88uNIgpAa1GIxG3EeiiWWv+clp9ULNIOwwEdweiX6hYpIGYxd9LYN/Tjd5Iq 9GCJraxtHa4lvIRactRADqk= Received: (qmail 99826 invoked by alias); 25 Oct 2016 14:33:38 -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 99815 invoked by uid 89); 25 Oct 2016 14:33:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1153 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 25 Oct 2016 14:33:27 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B69A21555D for ; Tue, 25 Oct 2016 14:33:26 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-87.phx2.redhat.com [10.3.116.87]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9PEXQEJ008933 for ; Tue, 25 Oct 2016 10:33:26 -0400 To: gcc-patches From: Jeff Law Subject: Fix m68k so it builds with current trunk Message-ID: <281badd7-29fa-88a9-aca4-b501c0cf5d7b@redhat.com> Date: Tue, 25 Oct 2016 08:33:26 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 X-IsSubscribed: yes It's not currently possible to build various crosses with the current trunk due to warning issues. I suspect this is the first of many patches to address those issues. I'm not familiar with the code in question, but based on Maxim's comment the gcc_unreachable ought to be safe. It could possibly even replace the entire else clause here, but I choose to avoid that simply because it's riskier. I've confirmed the various m68k-* targets from config-all.mk will build after this patch. Installed on the trunk. Jeff diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6548386..6bbb32c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2016-10-25 Jeff Law + + * config/m68k/m68k.c (m68k_get_reloc_decoration): Add gcc_unreachable. + 2016-10-25 Martin Liska PR sanitizer/78106 diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index b152ca8..ce56692 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -4550,6 +4550,7 @@ m68k_get_reloc_decoration (enum m68k_reloc reloc) } } } + gcc_unreachable (); case RELOC_TLSGD: return "@TLSGD";