From patchwork Sat Nov 11 12:01:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janus Weil X-Patchwork-Id: 837028 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-466576-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="X670fZb4"; dkim-atps=neutral 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 3yYwW92xzpz9t3Z for ; Sat, 11 Nov 2017 23:02:11 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=svQnMwFYuHzsPxQjLmbV0jvwKCbRXWBraF0wD+bjfkgUZp bLR7ADlcIEdQvMH0nuUS1JLNUSmDFETZ+pIEwA7wXAhly0KfHE9IWMwtAuMpqoVy L8PnKJe6rpB6klDc4EcK2vyTNMY+luKxvFF508cDjWNlweYj0jiYCQeFT65qI= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=r4uHHPXodva3MUlNKQLiZXX0Zwg=; b=X670fZb4vEK7PavRbGwu W84TRTwoHI/PlxqwYtaEv8A5XXugKh9B8NLCD3qCS7vEMrU0s7P4UuYULGvCBfOV yMZHmeV9IdrrZO8GbOdzqwTL2krXfr+3anZ1/5u1afuNtEHiW5brzSaXm52oWWq7 jW/ZE+tQwkR/YA0x/c2eCZc= Received: (qmail 80703 invoked by alias); 11 Nov 2017 12:02:03 -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 80682 invoked by uid 89); 11 Nov 2017 12:02:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=recovery, Hx-languages-length:1697, weil, janusgccgnuorg X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-yw0-f182.google.com Received: from mail-yw0-f182.google.com (HELO mail-yw0-f182.google.com) (209.85.161.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 11 Nov 2017 12:02:01 +0000 Received: by mail-yw0-f182.google.com with SMTP id k3so10131908ywk.8; Sat, 11 Nov 2017 04:02:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=lZuQOtoeIBd5D/73XbNq81C/dt79XQHZx3xypeOTX/Q=; b=HlduuEdTMcZK0c7Hbjg0v0C2d8mxskv404mzA+AYd2uL0cliE8z8ynNj54zWQE5/M3 DX0L6YDEsLisFA1urkuPsnyx5NLT8tC11zKYqzI8wlGPSI95LraDzHtx0WOhAm1f2iHY 4MgVzb3gdPDkRYtqHJMO+uloT1JIiihMqZjMjiczpWJ1NfiC646+qOEI9Xrq5A6Fed+p d49qn1WNDQkdXYdzvoXOnZEgKrYjV+T9KyG41+fGLfoRLrE1IXyChd51IXPcoT5Du5pm 8gwZUBBtkFTWexHM3/FbudZOdQaVys36LuFnZVdc4ANDqMYweh77kWp8U2EtxK87oFZT UzcA== X-Gm-Message-State: AJaThX4Xg1D8CfpfGDcOZwq8Ni1WHyR7YWQ+4hTs4JQwXX0Qkzk1CNg1 arX/RJngwsbJprVhXyl3hHJuq4Aia9jsLw7WoHTjbQ== X-Google-Smtp-Source: AGs4zMa4x0Q60+cmjstyalfPVr5NJ0ImJdx97ObVuXDdnBn7UqU51bXdqU6/SXZibc75T1HIa7O2DXElrj+bnLhlzkE= X-Received: by 10.37.1.65 with SMTP id 62mr449309ybb.402.1510401719860; Sat, 11 Nov 2017 04:01:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.162.201 with HTTP; Sat, 11 Nov 2017 04:01:59 -0800 (PST) From: Janus Weil Date: Sat, 11 Nov 2017 13:01:59 +0100 Message-ID: Subject: [Patch, Fortran] PR 82932: [8 Regression] [OOP] ICE in update_compcall_arglist, at fortran/resolve.c:5837 To: gfortran , gcc-patches Hi all, here is a close-to-trivial patch for an ICE-on-invalid problem. It regtests cleanly. Ok for trunk? (If there are no objections, I'd like to commit this in the coming days.) Cheers, Janus 2017-11-11 Janus Weil PR fortran/82932 * resolve.c (update_compcall_arglist): Improve error recovery, remove a gcc_assert. 2017-11-11 Janus Weil PR fortran/82932 * gfortran.dg/typebound_call_29.f90: New test. Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 253982) +++ gcc/fortran/resolve.c (working copy) @@ -5834,7 +5834,9 @@ update_compcall_arglist (gfc_expr* e) return true; } - gcc_assert (tbp->pass_arg_num > 0); + if (tbp->pass_arg_num <= 0) + return false; + e->value.compcall.actual = update_arglist_pass (e->value.compcall.actual, po, tbp->pass_arg_num, tbp->pass_arg);