From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id B5EFD387701A for ; Tue, 10 Mar 2020 00:52:01 +0000 (GMT) IronPort-SDR: inhtseQFoI/5PDNdEsZVV4pCh8Y7nuBsoPqk5wIklIbpwJgXkePBp+DH5qnWYOHllqvL1qNJbY XdW4saD/kXvKHvjSIyezFk14SP7YsLkrIKHcAmLIy063rV9PboTPj8X/S6KlsUwAK1QIu5Udty YCnlMWTlgXyMPzY+gUe1jeWqdIkKrlcCAQDcI/VQM3s8I7kU+dKnQiOEVGPyGhi+/H0+n/FjV7 rqpFFhyFF8KjmATNavtfXU1drepkUth6NW7PagIKUJZXjIRBiHs/YyehJc7sowVMEvbrzkK/k7 cU8= X-IronPort-AV: E=Sophos;i="5.70,535,1574150400"; d="scan'208";a="48513928" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 09 Mar 2020 16:52:00 -0800 IronPort-SDR: h4aCh4v+npVT6uoO46Gh2IPzfdRO93pv/vfj1XdfEApjlmiQQt8SdoEF7hXCPEdKZjb3MorvsH FmW9+9Qpv9jwFk4Wui2Uxp5tKRkblsRRd8LqQ/zHBFJoxS5HfHyWMfRuTx5QTGSP2KgiuTQDAH fOUVS6sBBgw5s6WUxVIzRvkJ/rr6Mo3HtLWxrhmfp64PTyPH/M9oQVqg01l5DLxzhFo6+grdfz C9M+al24XmaISO133fopHq0U75TkOVxKwm8+AdaOGUcqLNSVRU7DfwLyGUJ4k6LAkaKmTqVb/n 6Jg= Date: Tue, 10 Mar 2020 00:51:54 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Christophe Lyon CC: gcc Patches Subject: Re: c: ignore initializers for elements of variable-size types [PR93577] In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-08.mgc.mentorg.com (139.181.222.8) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2020 00:52:03 -0000 On Mon, 9 Mar 2020, Christophe Lyon wrote: > Hi Joseph, > > I've noticed that your patch introduces regressions on aarch64: > FAIL: gcc.target/aarch64/sve/acle/general-c/sizeless-1.c > -march=armv8.2-a+sve (test for errors, line 33) > we now get > /gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/sizeless-1.c:33:44: > error: empty scalar initializer > while we expect dg-error {initializer element is not constant} > > FAIL: gcc.target/aarch64/sve/acle/general-c/sizeless-1.c > -march=armv8.2-a+sve (test for errors, line 85) > we no longer emit dg-error {empty scalar initializer } > > FAIL: gcc.target/aarch64/sve/acle/general-c/sizeless-1.c > -march=armv8.2-a+sve (test for excess errors) > FAIL: gcc.target/aarch64/sve/acle/general-c/sizeless-2.c > -march=armv8.2-a+sve (test for errors, line 85) > we no longer emit dg-error {empty scalar initializer } > > Since the compiler did not ICE before your patch, is that new > behaviour expected (and the tests need an update), or is that a > problem with the patch? Where there has already been an error about the type of an initializer, it's expected that some other errors about the value of that initializer will disappear. So I think the cases where a previously expected error has disappeared are cases where the tests need an update; they already expect an error for the type. That leaves the case where you report that "empty scalar initializer" has appeared. That seems like a bug. Maybe some SVE case means process_init_element is ignoring something in an initializer for an SVE type that did not in fact result in the variable-size error from digest_init? Is the "empty scalar initializer" error coming from the compound literal on line 33, as opposed to the variable initialized on that line? -- Joseph S. Myers joseph@codesourcery.com