From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>, Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] remove workaround for GCC 4.1-4.3
Date: Fri, 29 Sep 2023 19:57:43 +0200 [thread overview]
Message-ID: <FCDDE80D-D8A1-43C0-9C7C-C4F648171B59@gmail.com> (raw)
In-Reply-To: <B1703A17-1EDC-4073-A0E6-98992461ECC5@gmail.com>
On 27 September 2023 06:46:29 CEST, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote:
>On 27 September 2023 06:43:24 CEST, Jakub Jelinek <jakub@redhat.com> wrote:
>>Hi!
>>
>>While looking into vec.h, I've noticed we still have a workaround for
>>GCC 4.1-4.3 bugs.
>
>
>This is https://gcc.gnu.org/PR105656
>thanks,
Mere cosmetics, but just for consistency:
I think you fat-fingered the number.
Since I would not suggest to backport this, should I close this reminder PR with a manually crafted commit link, or is there a preferred, other way to adjust the commited PR reference (also for the typoed PR which got the unrelated commit associated) and close the PR?
thanks,
>
>>As we now use C++11 and thus need to be built by GCC 4.8 or later,
>>I think this is now never used.
>>
>>Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>>
>>2023-09-27 Jakub Jelinek <jakub@redhat.com>
>>
>> * system.h (BROKEN_VALUE_INITIALIZATION): Don't define.
>> * vec.h (vec_default_construct): Remove BROKEN_VALUE_INITIALIZATION
>> workaround.
>> * function.cc (assign_parm_find_data_types): Likewise.
>>
>>--- gcc/system.h.jj 2023-04-22 20:14:03.502203388 +0200
>>+++ gcc/system.h 2023-09-26 16:41:44.384204843 +0200
>>@@ -905,12 +905,6 @@ extern void fancy_abort (const char *, i
>> /* Some compilers do not allow the use of unsigned char in bitfields. */
>> #define BOOL_BITFIELD unsigned int
>>
>>-/* GCC older than 4.4 have broken C++ value initialization handling, see
>>- PR11309, PR30111, PR33916, PR82939 and PR84405 for more details. */
>>-#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. Note, luckily gcc-3.0's token-based integrated
>> preprocessor won't trip on poisoned identifiers that arrive from
>>--- gcc/vec.h.jj 2023-07-11 13:40:40.392430080 +0200
>>+++ gcc/vec.h 2023-09-26 16:44:30.637902359 +0200
>>@@ -512,21 +512,6 @@ template <typename T>
>> inline void
>> vec_default_construct (T *dst, unsigned n)
>> {
>>-#ifdef BROKEN_VALUE_INITIALIZATION
>>- /* Versions of GCC before 4.4 sometimes leave certain objects
>>- uninitialized when value initialized, though if the type has
>>- user defined default ctor, that ctor is invoked. 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. 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. */
>>- memset (dst, '\0', sizeof (T) * n);
>>-#endif
>> for ( ; n; ++dst, --n)
>> ::new (static_cast<void*>(dst)) T ();
>> }
>>--- gcc/function.cc.jj 2023-07-11 13:40:38.992448821 +0200
>>+++ gcc/function.cc 2023-09-26 16:44:54.865567722 +0200
>>@@ -2429,15 +2429,7 @@ assign_parm_find_data_types (struct assi
>> {
>> int unsignedp;
>>
>>-#ifndef BROKEN_VALUE_INITIALIZATION
>> *data = assign_parm_data_one ();
>>-#else
>>- /* Old versions of GCC used to miscompile the above by only initializing
>>- the members with explicit constructors and copying garbage
>>- to the other members. */
>>- assign_parm_data_one zero_data = {};
>>- *data = zero_data;
>>-#endif
>>
>> /* NAMED_ARG is a misnomer. We really mean 'non-variadic'. */
>> if (!cfun->stdarg)
>>
>> Jakub
>>
>
next prev parent reply other threads:[~2023-09-29 17:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 4:43 Jakub Jelinek
2023-09-27 4:46 ` Bernhard Reutner-Fischer
2023-09-29 17:57 ` Bernhard Reutner-Fischer [this message]
2023-09-27 5:14 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FCDDE80D-D8A1-43C0-9C7C-C4F648171B59@gmail.com \
--to=rep.dot.nop@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=rguenther@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).