From patchwork Mon Jul 30 05:10:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 143118 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3642748ljj; Sun, 29 Jul 2018 22:11:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfaTMYGCmge/FVCzgWsr8DRbE834pXoQSZ22MJhL2dOhdPq7uLpVuPvPOxFBl48vrOtE7Oo X-Received: by 2002:a62:411a:: with SMTP id o26-v6mr6447928pfa.111.1532927462022; Sun, 29 Jul 2018 22:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532927462; cv=none; d=google.com; s=arc-20160816; b=blERr7ykR5NcvdENThTSGmd8qb7QR7nx+wxp9J18xWdQCagMZkvQLGOKdHNvGzIJb2 GykTJ5fVYyGC2GXgqE6FIkyzNgq7eV+JVSVDgIQSWpqDVK5HgPnACLIP/bYhRSiEGHQk HYqOGfFTcR0gk+Yz39A544x7cbDmNM9ZQBzFgtynfVTh8anikMo5YEQZPYtD3BeHdAJY g0kdSAvhis1WpqQufINk08FULYpezEjpzWbbf7F9nDQVqBq98Ep5UkbrIszZ3l2trmAS ct5brO7he7rwVT5gZ5fwcU82KcGyV6aRawHM9Qiun1macrWUcFMT3Q8xDSHQNXViYiYa 5dwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=7RrFrMxVKw/pIfewtvQddO45CM4yZHFaMKzdr3CHHv0=; b=vPV1Q9VgLduh3auzp3Ig/zDc8nqiFU0PqnVfGKzVoYs/fsWQ+9cI6UdqQnDZpT12ao WXULp0upx9HUsZJASU4gVaxNxxx97l2YwxIHl4APgNRcl/lRQuAM3nbXIb/1oLEM6/O/ WcsRuSZaa48cJnuPW2ynboGLx8d1Nm6ZShUt3v+i8D+EkbsiKSr8F571HdHQjZZXrG6+ dmASMq/7v2zpIu4h9fyO3wpi3maw7dyRlgbdkcMHlHA6Qd4JUjkmwlPsrqK42M5vUv9q 2MEcgZsiXNr3FS1JF1+arak6tND3JK00qUdV+fIPaT+mDGj7nO1gJaOfS1cqMsmN99jt 95SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=vgWb2gzk; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id b205-v6si10673530pfb.358.2018.07.29.22.11.01; Sun, 29 Jul 2018 22:11:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=vgWb2gzk; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 1B0F378D81; Mon, 30 Jul 2018 05:10:59 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by mail.openembedded.org (Postfix) with ESMTP id 0E59978D6E for ; Mon, 30 Jul 2018 05:10:54 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id x5-v6so6569190pgp.7 for ; Sun, 29 Jul 2018 22:10:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=F6f0T68fz6kwJN5cIMEJSp5V15yCSkdj0dZl6SrGQwo=; b=vgWb2gzkkPNFOtDgoPIBiQz3BTSUFcceEvLW6sYpT1sRN1DVUv3BQ575A8AnM9OKs6 y/lZ4G6QR3XWkcgeCn5EZHY0iT7x96tSzRlTz2V1ACN3WpDHFxaX7jou0Z1VR5EwlTjh FXi9zVMBhC3nNYpLiWItwAZAarcbd5cO6aFku0pr3n+/a+Wj0AmiEetsLf3jNCQEUTMx JXGHmTajGqCzcK6GbGr1xa6lxxWMe04tloWv0u2QKQFHtDeqCGzPbu67A7SO/pBjWes+ +UzSO5dP10YylcLX4RLBFc67nuk7V8wXvI/fI6fkAn4QuQKn7Jdu8RCrGXvQhplq5aHB jcEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=F6f0T68fz6kwJN5cIMEJSp5V15yCSkdj0dZl6SrGQwo=; b=eNC0pCh42jTQ1o+H/mttGMZCrKqLE3+HsbZm9dOuyoW2x92ROemK6SkHizEirK53jx wx8zGjTFyr4RCo6B6Yhav4t0DAPCNxY16q+jNaBUnVHuQk2cFHFgPAOchg9qHR/qMx5y ddZvOD/PLKSQEKC+CiXCeHIZS9ZXlB8CFtXa0XEcc4M3EILVp6Dsy/GmsDTAKArzzaju sLqVJPAiHu+qtTaeljfpmPCkv+wg9iloZz8YokgG51z3M9BqY1Q1LNuKTgWk8ugGWf0Z 86161pUlUyiyZHyfXj6lKuobJovEK6yw5Xxfi1f0kkWKb5o+1B8uRCG00VaePVmhtr/4 BeQA== X-Gm-Message-State: AOUpUlHKfD+APQB2pBmIFx5ruZTqYH3h1cRNNgO5xd2Qy1jmyBZPxA8t hBpbW3SME1xzZvQBgK9zUbiofu0K X-Received: by 2002:a63:1a20:: with SMTP id a32-v6mr14997953pga.446.1532927455674; Sun, 29 Jul 2018 22:10:55 -0700 (PDT) Received: from aurora.jms.id.au ([45.124.203.18]) by smtp.gmail.com with ESMTPSA id b67-v6sm16153689pfd.74.2018.07.29.22.10.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Jul 2018 22:10:54 -0700 (PDT) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Mon, 30 Jul 2018 14:40:50 +0930 From: Joel Stanley To: openembedded-core@lists.openembedded.org Date: Mon, 30 Jul 2018 14:40:28 +0930 Message-Id: <20180730051029.5530-2-joel@jms.id.au> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730051029.5530-1-joel@jms.id.au> References: <20180730051029.5530-1-joel@jms.id.au> Subject: [OE-core] [PATCH v2 1/2] gcc-7.3: Fix build on ppc64le hosts X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org When building on ppc64le hosts that have GCC 8 (such as Ubuntu 18.10) the GCC build bootstrap fails. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86162 This is a fix that was applied to the upstream GCC 7 branch. Change-Id: I7796d2a999ec420805dd1c6cf0a1ecba1de5a897 Signed-off-by: Joel Stanley --- meta/recipes-devtools/gcc/gcc-7.3.inc | 1 + ...c64le-build-Partial-backport-r256656.patch | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch -- 2.17.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/gcc/gcc-7.3.inc b/meta/recipes-devtools/gcc/gcc-7.3.inc index b816f7d12f81..81320dc52a59 100644 --- a/meta/recipes-devtools/gcc/gcc-7.3.inc +++ b/meta/recipes-devtools/gcc/gcc-7.3.inc @@ -79,6 +79,7 @@ SRC_URI = "\ BACKPORTS = "\ file://0001-Fix-internal-compiler-error-in-testcase.patch \ file://0001-PR-rtl-optimization-83030.patch \ + file://0001-Fix-ppc64le-build-Partial-backport-r256656.patch \ " SRC_URI[md5sum] = "be2da21680f27624f3a87055c4ba5af2" diff --git a/meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch b/meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch new file mode 100644 index 000000000000..122260f2bf1d --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-7.3/0001-Fix-ppc64le-build-Partial-backport-r256656.patch @@ -0,0 +1,36 @@ +From aa65a43516da1d48011ef621ed5988289711d99b Mon Sep 17 00:00:00 2001 +From: marxin +Date: Fri, 29 Jun 2018 09:31:30 +0000 +Subject: [PATCH] Partial backport r256656 + +2018-06-29 Martin Liska + + Backport from mainline + 2018-01-10 Kelvin Nilsen + + * lex.c (search_line_fast): Remove illegal coercion of an + unaligned pointer value to vector pointer type and replace with + use of __builtin_vec_vsx_ld () built-in function, which operates + on unaligned pointer values. + +Upstream-Status: Backport +--- + libcpp/lex.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletion(-) + +diff --git a/libcpp/lex.c b/libcpp/lex.c +index 097c78002cbb..e0fb9e822c44 100644 +--- a/libcpp/lex.c ++++ b/libcpp/lex.c +@@ -568,7 +568,7 @@ search_line_fast (const uchar *s, const uchar *end ATTRIBUTE_UNUSED) + { + vc m_nl, m_cr, m_bs, m_qm; + +- data = *((const vc *)s); ++ data = __builtin_vec_vsx_ld (0, s); + s += 16; + + m_nl = (vc) __builtin_vec_cmpeq(data, repl_nl); +-- +2.17.1 + From patchwork Mon Jul 30 05:10:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 143119 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3642798ljj; Sun, 29 Jul 2018 22:11:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcYnK0vmbMF2AI44wcB1USUnIAtN/xkw/Vs9NdylilJ4zCT0GmGrYv7Dl/WwUSLD1JYVMBA X-Received: by 2002:a63:6949:: with SMTP id e70-v6mr15435930pgc.119.1532927467011; Sun, 29 Jul 2018 22:11:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532927467; cv=none; d=google.com; s=arc-20160816; b=OPkKJOweUKriRfa0H429HrtYBTQSAZ8DoaxCw+ErCprZNgfWwiBV0933IMxPl/4gp9 C/SIt+rn8bNA9kh5+87X6OvJJw4ouHMNt2fhn39S6ggMqeuH5SgtWZgt/rXiU8LC6mAu M5cKAK/XoAifdt0qnWHe+3Ea1F1oYRdCNVvV1jN2J2p5Aq2CTzzwDGlB+iF4vxlsrUGg Bsf58UVcOdh4UZTwSFuGY8mlvlKSbtUAzBFt5UgM2YIxld7KePbzZyjjXeNjt532Wc0G NKE8GhD1YOzB4vDLiu7L8+g8dIOlyEn53BLhEue1RiMzIW2G78+2NQHv1yaQfD8kBd+h JDYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=GCQWdAXqu2Va3Z51Zb09bfW7OnuuM1N/iEXyYlkt/Aw=; b=MGx+580wGQ3NBKLRB7X7qqJoFBg5P47ShJD3tYuZBQqOTtV7ikB1qXwMrgB3jwMXNV ySY26V0jhieIUNVS4RgeR4DKkWjxz1FZ7H36ir45KZ1NrfMN53rfjajS4I3QZuVYeI+H S0puLhR+rIZr+XQqh5G6SjIN+EX4rn8lYM6Qj1X/cdtpyv8sUwAcMzYXzU3FqjSdfPC0 V/Df+xME8BIXT1cIRNuxnvphE+dkXNgiYGaxue4IEd3YDCkbJ+pHFqumwSVWud+fX60v vAI1qtkcO/1CPUqcSiLn3nbWrBrOEslLnrX2KU9YyZdRXI6pbqxoy4uBoI95Sunb5ctx 8UWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ev8v7qXe; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id f5-v6si11611160pln.414.2018.07.29.22.11.06; Sun, 29 Jul 2018 22:11:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ev8v7qXe; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 3B33E78D85; Mon, 30 Jul 2018 05:11:02 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mail.openembedded.org (Postfix) with ESMTP id 3574E78D8A for ; Mon, 30 Jul 2018 05:11:01 +0000 (UTC) Received: by mail-pg1-f171.google.com with SMTP id r1-v6so6566629pgp.11 for ; Sun, 29 Jul 2018 22:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=+Mk+oa7mqoGvpFqafP5EJDefquRdS10oVOVoOCPdQp4=; b=ev8v7qXeWhNA5AqteYLnPYjp2z3i9bRLhMWUo9JSDa3oTeZfhbr74qZD2DhsooZlSd mR0MtwXSFtm6v4vYrJwXVr3BUYlKAz9UIPpjTZqdzrq4J3goFSyS+2x0X6cF/UqAeJ1t 0dOBfa5n2Lg1MCXNTzcKP3rghEjdlIaVHA7BLdIeXdCs15Mx2H8TEcJOB5eeqfsStdme ppYUyxyn58tvhl+ZgZi9dQpJm2fJ8TGVNM15xoeLSe6LRnGg/zON8sF8pfAxjkPUmBor 65q86KUDNDT1+xK6sszJPiUm7KRe3JYlo4y4mHK5Oeo/GE1whcnmD1ESK/rYXZYtnNBQ soNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=+Mk+oa7mqoGvpFqafP5EJDefquRdS10oVOVoOCPdQp4=; b=B6ZS2h/hS/0l88/X/S7/FH7XtSWA7jbDfaE1CAs59xd5CqkYx94b7fkEUFpy4e1c7y 9X3splXSGnoDKyW4HH2qKtqRMIVLvUnwPHaEalbt+pabjzd99OD/ZI2Uxr6yCOsjryoH IrBE43TTW2XP0qEsT/zo0hx89s3go7nKuSGDUBY22CtJQMhvR02EdYiDO2SZlgOzPRaL Sp7itGZ0HEpXIQ+6rml7o41W+AEtuE3lprdbzU7NQPX/XJHISpELlSFB88rZBJ28wt/3 RJsLJBRNBAaLPViNH6OBBo8bVuOPDesdLTAzePwKVj92nf0W/g+yhxS3H8Rz7uO2RMTD 8MKw== X-Gm-Message-State: AOUpUlEHH/Hs5ckvPN2peFDoYup55ijYXs6CEZUYcT14scwEu3xZs66v V+LVe/dUd94GfKC1xcxWZ2lFmoly X-Received: by 2002:a63:5a5e:: with SMTP id k30-v6mr15323608pgm.123.1532927461979; Sun, 29 Jul 2018 22:11:01 -0700 (PDT) Received: from aurora.jms.id.au ([45.124.203.18]) by smtp.gmail.com with ESMTPSA id b12-v6sm14766569pfe.148.2018.07.29.22.10.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Jul 2018 22:11:01 -0700 (PDT) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Mon, 30 Jul 2018 14:40:56 +0930 From: Joel Stanley To: openembedded-core@lists.openembedded.org Date: Mon, 30 Jul 2018 14:40:29 +0930 Message-Id: <20180730051029.5530-3-joel@jms.id.au> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730051029.5530-1-joel@jms.id.au> References: <20180730051029.5530-1-joel@jms.id.au> Subject: [OE-core] [PATCH v2 2/2] gcc-7.3: Backport fixes for std::pair high memory usage X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org C++ applications that contain a specfic use of std::pair with tempates cause the build to require many gigabytes of RAM to build. This is a fix that was applied to the upstream GCC 7 branch. Change-Id: I213f96d1d6332e2dce5765482ff3413f1abd7ff8 Signed-off-by: Joel Stanley --- meta/recipes-devtools/gcc/gcc-7.3.inc | 1 + ...-PR-c-80290-memory-hog-with-std-pair.patch | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch -- 2.17.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/gcc/gcc-7.3.inc b/meta/recipes-devtools/gcc/gcc-7.3.inc index 81320dc52a59..c7c88f12e499 100644 --- a/meta/recipes-devtools/gcc/gcc-7.3.inc +++ b/meta/recipes-devtools/gcc/gcc-7.3.inc @@ -80,6 +80,7 @@ BACKPORTS = "\ file://0001-Fix-internal-compiler-error-in-testcase.patch \ file://0001-PR-rtl-optimization-83030.patch \ file://0001-Fix-ppc64le-build-Partial-backport-r256656.patch \ + file://0001-PR-c-80290-memory-hog-with-std-pair.patch \ " SRC_URI[md5sum] = "be2da21680f27624f3a87055c4ba5af2" diff --git a/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch b/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch new file mode 100644 index 000000000000..1ad19dc0ea80 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-7.3/0001-PR-c-80290-memory-hog-with-std-pair.patch @@ -0,0 +1,57 @@ +From 8c014bceeca6a558519e86b16a8142accc41e94f Mon Sep 17 00:00:00 2001 +From: jason +Date: Thu, 28 Jun 2018 00:25:21 +0000 +Subject: [PATCH] PR c++/80290 - memory-hog with std::pair. + + * pt.c (type_unification_real): Skip non-dependent conversion + check for a nested list argument. + (braced_init_depth): New. + +Upstream-Status: Backport +--- + gcc/cp/pt.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c +index 79cfd0129226..71077a3b0498 100644 +--- a/gcc/cp/pt.c ++++ b/gcc/cp/pt.c +@@ -19242,6 +19242,24 @@ try_array_deduction (tree tparms, tree targs, tree parm) + /*nondeduced*/false, array_deduction_r); + } + ++/* Returns how many levels of { } INIT contains. */ ++ ++static int ++braced_init_depth (tree init) ++{ ++ if (!init || !BRACE_ENCLOSED_INITIALIZER_P (init)) ++ return 0; ++ unsigned i; tree val; ++ unsigned max = 0; ++ FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (init), i, val) ++ { ++ unsigned elt_d = braced_init_depth (val); ++ if (elt_d > max) ++ max = elt_d; ++ } ++ return max + 1; ++} ++ + /* Most parms like fn_type_unification. + + If SUBR is 1, we're being called recursively (to unify the +@@ -19478,6 +19496,10 @@ type_unification_real (tree tparms, + + if (uses_template_parms (parm)) + continue; ++ /* Workaround for c++/80290: avoid combinatorial explosion on ++ deeply nested braced init-lists. */ ++ if (braced_init_depth (arg) > 2) ++ continue; + if (check_non_deducible_conversion (parm, arg, strict, flags, + explain_p)) + return 1; +-- +2.17.1 +