From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id F3B613858D32 for ; Fri, 29 Sep 2023 17:57:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F3B613858D32 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-ej1-x629.google.com with SMTP id a640c23a62f3a-9ada2e6e75fso2022181766b.2 for ; Fri, 29 Sep 2023 10:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696010268; x=1696615068; 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=uM3YsIzpvkpE7AMFVX/fB5uLY6mBAcgA5JCs9w6WDNA=; b=kaMpIy9YCJc/SQdWDuX/tFj4KI0p5ou7/95WsDJeY50pBd85J/ZVaDwQzPowB3GazH ptAcOoLlUZupAPvN5yXbLTa+IgVYKc6Kyw/RtM3NIKckMwuErc8/3oukRf8sfRY3sXG9 PzIytFcOcDPFUpfdxQcqzZK3FxBJg1j/iTaBvl1MJxrzNNF3yGMkWLG4CgzeWBPybF9M tj7awITlExXFArb3PxSDiOstAK/xh5SZV7QmTU3pe3f1NbfpPIcWAMgXSmgo3OJ6qsML o/WcPgYwlFIRk+KmWADIrqdNiCs0QEkUnAipVhhtvn2vOjISBdPqhIzqgLtFi5w0GpnT vTkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696010268; x=1696615068; 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=uM3YsIzpvkpE7AMFVX/fB5uLY6mBAcgA5JCs9w6WDNA=; b=rEawgRmMsV76xINzXa01dIy4KJ3k9iwLUMo9rfX1w9rDy7zeyHjPzcJvWemiDp0Clj /8WIpbDNK7qqC+R2+5WRIoP7PR9eghZ/AfDx04nqZrw1fe91dJbZ5BBkuCfM79cTF4le G9Xm9QNYcH+RVWI04jFfW2iJ8dUvfdKax5lmESqrqoPGBJxWc7h9IP9NdHl4z/MAQRz0 E3qmaB4zVWdxOn+FXHjqaSZ/L/lMw7E4FbEnuIe0WxnXIT7MGB4pkFe5Ka6Qw1DdCDKx gn+e9Av0i6DjmU4MHcfIiorXrw0O8IDqdArCwHRQw91MlzUO1ff5Y5W7XSRBC7Dp4bqL OcVg== X-Gm-Message-State: AOJu0YxFA+Ra3zDuUpmj3h7U5aa+OOWjwq/dl1wq3hsXBWy1XaqmsTzZ 27ivNlZpjcvFfrEpcKwAnl4= X-Google-Smtp-Source: AGHT+IHP07iwmOD0jUJ6NiEK2TuDBn2WZyUPNqDrJxku4/RNC3ZZseKZMgd1u8UiOdtQJgJl9iOSIQ== X-Received: by 2002:a17:907:2cd2:b0:9ae:621b:ae4e with SMTP id hg18-20020a1709072cd200b009ae621bae4emr4376438ejc.13.1696010268240; Fri, 29 Sep 2023 10:57:48 -0700 (PDT) Received: from ?IPv6:::1? ([2001:871:227:8210:3dca:d1d1:23b5:8bc7]) by smtp.gmail.com with ESMTPSA id gx10-20020a170906f1ca00b0099cb349d570sm12776356ejb.185.2023.09.29.10.57.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Sep 2023 10:57:47 -0700 (PDT) Date: Fri, 29 Sep 2023 19:57:43 +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=-2.6 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:46:29 CEST, Bernhard Reutner-Fischer wrote: >On 27 September 2023 06:43:24 CEST, Jakub Jelinek wr= ote: >>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, Mere cosmetics, but just for consistency: I think you fat-fingered the number=2E Since I would not suggest to backport this, should I close this reminder P= R with a manually crafted commit link, or is there a preferred, other way t= o adjust the commited PR reference (also for the typoed PR which got the un= related commit associated) and close the PR? 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, = see >>- 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 integrat= ed >> 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 workaroun= d >>- 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 initializ= ing >>- 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 >> >