From patchwork Thu Aug 11 15:14:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 109629 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]) by ozlabs.org (Postfix) with SMTP id 22B8CB6F85 for ; Fri, 12 Aug 2011 01:14:35 +1000 (EST) Received: (qmail 25767 invoked by alias); 11 Aug 2011 15:14:33 -0000 Received: (qmail 25758 invoked by uid 22791); 11 Aug 2011 15:14:32 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Aug 2011 15:14:17 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7BFEHQu005719 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Aug 2011 11:14:17 -0400 Received: from anchor.twiddle.net (vpn-229-100.phx2.redhat.com [10.3.229.100]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p7BFEG8o015132 for ; Thu, 11 Aug 2011 11:14:17 -0400 Message-ID: <4E43F1C8.6070809@redhat.com> Date: Thu, 11 Aug 2011 08:14:16 -0700 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 MIME-Version: 1.0 To: GCC Patches Subject: Fix boot/50018 X-IsSubscribed: yes 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 The reduced test case for m68k showed a TLS symbol given to emit_single_push_insn, which resulted in a call insn inside a sequence that I didn't expect. We don't see this on i686 because we pretend that the TLS call isn't a call. Or something. Bootstrapped on i586 for sanity. Committed. r~ PR bootstrap/50018 * expr.c (fixup_args_size_notes): Accept and ignore normal calls. diff --git a/gcc/expr.c b/gcc/expr.c index f0b76e1..997eb3e 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -3567,8 +3567,10 @@ fixup_args_size_notes (rtx prev, rtx last, int end_args_size) /* Look for a call_pop pattern. */ if (CALL_P (insn)) { - /* We're not supposed to see non-pop call patterns here. */ - gcc_assert (GET_CODE (pat) == PARALLEL); + /* We have to allow non-call_pop patterns for the case + of emit_single_push_insn of a TLS address. */ + if (GET_CODE (pat) != PARALLEL) + continue; /* All call_pop have a stack pointer adjust in the parallel. The call itself is always first, and the stack adjust is @@ -3583,7 +3585,8 @@ fixup_args_size_notes (rtx prev, rtx last, int end_args_size) break; } /* We'd better have found the stack pointer adjust. */ - gcc_assert (i > 0); + if (i == 0) + continue; /* Fall through to process the extracted SET and DEST as if it was a standalone insn. */ }