From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 3A31D38560A7 for ; Wed, 27 Sep 2023 04:46:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3A31D38560A7 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-405524e6740so82790505e9.1 for ; Tue, 26 Sep 2023 21:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695789995; x=1696394795; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=Nr07I0YQrzMI5iPlYMnp6wKiqWa35/KWlQNN89qFS88=; b=E4+kL8hHNA9oPB/KC1tYWZIzUsDMN8EJWj8IXs5YS5o5hQJLFP/pOt3EhiFjhUBXiQ ONc+NyaPVlX74dLansjJGEJL74OH8dZIfrk7JFO9aRdE5Z0WpHeo3V2tBzd9jDYMdBZB lnEsriK4oY5/GPIt/2qvu1cBi5FBsu2EeX4/J+zxfx4PyiNxNrElFRGbpUR81BTxQtVu tE4p6jIf6EiFl9WjDeZXmRZ6zyXGOWc71siWLy2YT6Bdvrn96n3BEeAfA0ZJDNjmYi7M msXh4y4BtNeZ02OSFla+w1IDrgBaOZJq/H9D+dfrvd70SZFcJbqhf13/v8lvfoL9wdk+ 2j8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695789995; x=1696394795; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Nr07I0YQrzMI5iPlYMnp6wKiqWa35/KWlQNN89qFS88=; b=kO/OM0RfUgPIl1yaMPqmg4Iu7i5u25upeXVeoYXdKAA2qohzZ5fN+h5wQOOF45J1V/ GlTfG+eKeQkm5/HcB+UDKhxSBc/ujOuoVMC/dEnXCT++ItSRf3Q3SWIiM+M8RXg6HPM6 4k6bB96S2tVreI7PphLunFf4jYiUJmju4gJDwQkmPBJ9Bhs3cA4LbmbwGNGuKWBbE4Y+ 9n19yvhsSve7hjTReHIpMTdXbm2jxRqkNwiSrJI6GWMgkfs9gtV49yyDD6AE5sMJtYlQ XGOYka3LwJjFt7C6NuKgpeoaNcEiqCm+Ea/ZuKbuOCiRx756WJgx7x9d7v7XHTDwil2Q 6n9g== X-Gm-Message-State: AOJu0YyvzATRfnA1xWT8FCbH49YzbgyYuWRAKDLiaLmYPOIq7entPzuR s8QB3aws+ioTJUdT2C2zIBQy/RiVcirzVw== X-Google-Smtp-Source: AGHT+IFjehP1DEKjyRyVnmxYNKyg8S/PbbMGO6uOv/Yn6Vnexz+KwLsB18cqmrzAKsTIUFNYV5Z2sA== X-Received: by 2002:a7b:cc15:0:b0:405:3d41:5635 with SMTP id f21-20020a7bcc15000000b004053d415635mr846366wmh.29.1695789994534; Tue, 26 Sep 2023 21:46:34 -0700 (PDT) Received: from [127.0.0.1] (80-110-214-113.static.upcbusiness.at. [80.110.214.113]) by smtp.gmail.com with ESMTPSA id m14-20020a7bce0e000000b00402ff8d6086sm1115756wmc.18.2023.09.26.21.46.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Sep 2023 21:46:33 -0700 (PDT) Date: Wed, 27 Sep 2023 06:46:29 +0200 From: Bernhard Reutner-Fischer To: Jakub Jelinek , Richard Biener CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] remove workaround for GCC 4.1-4.3 In-Reply-To: References: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 27 September 2023 06:43:24 CEST, Jakub Jelinek wrot= e: >Hi! > >While looking into vec=2Eh, I've noticed we still have a workaround for >GCC 4=2E1-4=2E3 bugs=2E This is https://gcc=2Egnu=2Eorg/PR105656 thanks, >As we now use C++11 and thus need to be built by GCC 4=2E8 or later, >I think this is now never used=2E > >Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > >2023-09-27 Jakub Jelinek > > * system=2Eh (BROKEN_VALUE_INITIALIZATION): Don't define=2E > * vec=2Eh (vec_default_construct): Remove BROKEN_VALUE_INITIALIZATION > workaround=2E > * function=2Ecc (assign_parm_find_data_types): Likewise=2E > >--- gcc/system=2Eh=2Ejj 2023-04-22 20:14:03=2E502203388 +0200 >+++ gcc/system=2Eh 2023-09-26 16:41:44=2E384204843 +0200 >@@ -905,12 +905,6 @@ extern void fancy_abort (const char *, i > /* Some compilers do not allow the use of unsigned char in bitfields=2E = */ > #define BOOL_BITFIELD unsigned int >=20 >-/* GCC older than 4=2E4 have broken C++ value initialization handling, s= ee >- PR11309, PR30111, PR33916, PR82939 and PR84405 for more details=2E *= / >-#if GCC_VERSION > 0 && GCC_VERSION < 4004 && !defined(__clang__) >-# define BROKEN_VALUE_INITIALIZATION >-#endif >- > /* As the last action in this file, we poison the identifiers that > shouldn't be used=2E Note, luckily gcc-3=2E0's token-based integrate= d > preprocessor won't trip on poisoned identifiers that arrive from >--- gcc/vec=2Eh=2Ejj 2023-07-11 13:40:40=2E392430080 +0200 >+++ gcc/vec=2Eh 2023-09-26 16:44:30=2E637902359 +0200 >@@ -512,21 +512,6 @@ template > inline void > vec_default_construct (T *dst, unsigned n) > { >-#ifdef BROKEN_VALUE_INITIALIZATION >- /* Versions of GCC before 4=2E4 sometimes leave certain objects >- uninitialized when value initialized, though if the type has >- user defined default ctor, that ctor is invoked=2E As a workaround >- perform clearing first and then the value initialization, which >- fixes the case when value initialization doesn't initialize due to >- the bugs and should initialize to all zeros, but still allows >- vectors for types with user defined default ctor that initializes >- some or all elements to non-zero=2E If T has no user defined >- default ctor and some non-static data members have user defined >- default ctors that initialize to non-zero the workaround will >- still not work properly; in that case we just need to provide >- user defined default ctor=2E */ >- memset (dst, '\0', sizeof (T) * n); >-#endif > for ( ; n; ++dst, --n) > ::new (static_cast(dst)) T (); > } >--- gcc/function=2Ecc=2Ejj 2023-07-11 13:40:38=2E992448821 +0200 >+++ gcc/function=2Ecc 2023-09-26 16:44:54=2E865567722 +0200 >@@ -2429,15 +2429,7 @@ assign_parm_find_data_types (struct assi > { > int unsignedp; >=20 >-#ifndef BROKEN_VALUE_INITIALIZATION > *data =3D assign_parm_data_one (); >-#else >- /* Old versions of GCC used to miscompile the above by only initializi= ng >- the members with explicit constructors and copying garbage >- to the other members=2E */ >- assign_parm_data_one zero_data =3D {}; >- *data =3D zero_data; >-#endif >=20 > /* NAMED_ARG is a misnomer=2E We really mean 'non-variadic'=2E */ > if (!cfun->stdarg) > > Jakub >