public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
@ 2021-04-24 15:52 iains at gcc dot gnu.org
2021-04-24 15:54 ` [Bug bootstrap/100246] " iains at gcc dot gnu.org
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: iains at gcc dot gnu.org @ 2021-04-24 15:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
Bug ID: 100246
Summary: [11/12 Regression] GCC will not bootstrap with clang
3.4/3.5 [xcode 5/6, Darwin 12/13]
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: iains at gcc dot gnu.org
Target Milestone: ---
using CC=clang and CXX="clang++ -stdlib=libc++" which is needed to get C++11
support.
In file included from /src-local/gcc-git-11/gcc/config/i386/i386-options.c:94:
/src-local/gcc-git-11/gcc/config/i386/x86-tune-costs.h:363:13: error: call to
implicitly-deleted default constructor of 'const struct stringop_strategy'
{libcall, {{-1, rep_prefix_4_byte, false}}},
^
/src-local/gcc-git-11/gcc/config/i386/i386.h:254:15: note: default constructor
of 'stringop_strategy' is implicitly deleted because field 'max' of
const-qualified type 'const int' would not be initialized
const int max;
====
when building in c++89 mode, (GCC10.x and earlier) this worked fine. It does
look like a clang bug (but the rules are quite complex around this topic). It
would seem it's trying to find a constructor for the empty elements in the
lists (and that is implicitly deleted).
====
A workaround is to ensure that all the elements have a complete initialisers
with dummy entries for those that are not needed. Patch pending.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
@ 2021-04-24 15:54 ` iains at gcc dot gnu.org
2021-04-24 20:21 ` iains at gcc dot gnu.org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: iains at gcc dot gnu.org @ 2021-04-24 15:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Host| |x86_64-darwin12,
| |x86_64-darwin13
Keywords| |build
Build| |x86_64-darwin12,
| |x86_64-darwin13
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-04-24
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
2021-04-24 15:54 ` [Bug bootstrap/100246] " iains at gcc dot gnu.org
@ 2021-04-24 20:21 ` iains at gcc dot gnu.org
2021-04-26 7:23 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: iains at gcc dot gnu.org @ 2021-04-24 20:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
Created attachment 50669
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50669&action=edit
Patch that works around the clang issue/bug
this is against GCC-11.1rc2, but not likely to need much/any amendment for
GCC12.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
2021-04-24 15:54 ` [Bug bootstrap/100246] " iains at gcc dot gnu.org
2021-04-24 20:21 ` iains at gcc dot gnu.org
@ 2021-04-26 7:23 ` rguenth at gcc dot gnu.org
2021-04-27 19:34 ` gcc@Denis-Excoffier.org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-26 7:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.2
Version|10.2.1 |11.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
` (2 preceding siblings ...)
2021-04-26 7:23 ` rguenth at gcc dot gnu.org
@ 2021-04-27 19:34 ` gcc@Denis-Excoffier.org
2021-05-05 7:43 ` iains at gcc dot gnu.org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: gcc@Denis-Excoffier.org @ 2021-04-27 19:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
Denis Excoffier <gcc@Denis-Excoffier.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gcc@Denis-Excoffier.org
--- Comment #2 from Denis Excoffier <gcc@Denis-Excoffier.org> ---
My linux (2.6.32-39-pve) fails bootstrapping recent GCC 11.1.0 using
gcc (Debian 4.9.2-10+deb8u2) 4.9.2, with the following errors:
In file included from
/tmp/lcl/tmp/gcc/gcc-11.1.0/gcc/config/i386/i386-options.c:94:0:
/tmp/lcl/tmp/gcc/gcc-11.1.0/gcc/config/i386/x86-tune-costs.h:32:56: error:
uninitialized const member 'stringop_algs::stringop_strategy::max'
{rep_prefix_1_byte, {{-1, rep_prefix_1_byte, false}}}};
^
/tmp/lcl/tmp/gcc/gcc-11.1.0/gcc/config/i386/x86-tune-costs.h:32:56: warning:
missing initializer for member 'stringop_algs::stringop_strategy::max'
[-Wmissing-field-initializers]
/tmp/lcl/tmp/gcc/gcc-11.1.0/gcc/config/i386/x86-tune-costs.h:32:56: error:
uninitialized const member 'stringop_algs::stringop_strategy::alg'
(...hundreds of similar messages...)
Applying this patch clears the issue.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
` (3 preceding siblings ...)
2021-04-27 19:34 ` gcc@Denis-Excoffier.org
@ 2021-05-05 7:43 ` iains at gcc dot gnu.org
2021-05-07 19:44 ` iains at gcc dot gnu.org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: iains at gcc dot gnu.org @ 2021-05-05 7:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---
Alan Modra posted the following alternate patch (which I will test with a
clang-3.5 bootstrap):
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 97d6f3863cb..cc3b1b6d666 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -73,8 +73,8 @@ struct stringop_algs
{
const enum stringop_alg unknown_size;
const struct stringop_strategy {
- const int max;
- const enum stringop_alg alg;
+ int max;
+ enum stringop_alg alg;
int noalign;
} size [MAX_STRINGOP_ALGS];
};
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
` (4 preceding siblings ...)
2021-05-05 7:43 ` iains at gcc dot gnu.org
@ 2021-05-07 19:44 ` iains at gcc dot gnu.org
2021-05-09 9:01 ` gcc@Denis-Excoffier.org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: iains at gcc dot gnu.org @ 2021-05-07 19:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
for the record the patch in comment #3 allowed bootstrap to succeed on Darwin12
with clang 3.4-based Xcode.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
` (5 preceding siblings ...)
2021-05-07 19:44 ` iains at gcc dot gnu.org
@ 2021-05-09 9:01 ` gcc@Denis-Excoffier.org
2021-05-10 8:40 ` iains at gcc dot gnu.org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: gcc@Denis-Excoffier.org @ 2021-05-09 9:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
--- Comment #5 from Denis Excoffier <gcc@Denis-Excoffier.org> ---
same for me, the patch in comment #3 allowed bootstrap to succeed on linux
(2.6.32-39-pve) with gcc (Debian 4.9.2-10+deb8u2).
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
` (6 preceding siblings ...)
2021-05-09 9:01 ` gcc@Denis-Excoffier.org
@ 2021-05-10 8:40 ` iains at gcc dot gnu.org
2021-05-13 18:53 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: iains at gcc dot gnu.org @ 2021-05-10 8:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> ---
yet another permutation:
This one keeps the const-ness of the contents, but provides a CTOR.
Note the we build some of the gcov stuff with a C compiler and therefore this
has to be conditional on C++.
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 97d6f38..a417c93 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -73,6 +73,11 @@ struct stringop_algs
{
const enum stringop_alg unknown_size;
const struct stringop_strategy {
+#ifdef __cplusplus
+ stringop_strategy(int _max = -1, enum stringop_alg _alg = libcall,
+ int _noalign = false)
+ : max (_max), alg (_alg), noalign (_noalign) {}
+#endif
const int max;
const enum stringop_alg alg;
int noalign;
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
` (7 preceding siblings ...)
2021-05-10 8:40 ` iains at gcc dot gnu.org
@ 2021-05-13 18:53 ` pinskia at gcc dot gnu.org
2021-07-06 10:14 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-05-13 18:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bug-reports.delphin@laposte
| |.net
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 100585 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
` (8 preceding siblings ...)
2021-05-13 18:53 ` pinskia at gcc dot gnu.org
@ 2021-07-06 10:14 ` cvs-commit at gcc dot gnu.org
2021-07-20 6:58 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-06 10:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:
https://gcc.gnu.org/g:f99f6eb58e1f894dae024f63cc2fe30fa7605e59
commit r12-2052-gf99f6eb58e1f894dae024f63cc2fe30fa7605e59
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Sat Jul 3 19:47:48 2021 +0100
X86: Provide a CTOR for stringop_algs [PR100246].
Several older compilers fail to build modern GCC because of missing
or incomplete C++11 support.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR bootstrap/100246 - [11/12 Regression] GCC will not bootstrap with clang
3.4/3.5 [xcode 5/6, Darwin 12/13]
PR bootstrap/100246
gcc/ChangeLog:
* config/i386/i386.h (struct stringop_algs): Define a CTOR for
this type.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
` (9 preceding siblings ...)
2021-07-06 10:14 ` cvs-commit at gcc dot gnu.org
@ 2021-07-20 6:58 ` cvs-commit at gcc dot gnu.org
2021-07-20 6:59 ` iains at gcc dot gnu.org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-20 6:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Iain D Sandoe
<iains@gcc.gnu.org>:
https://gcc.gnu.org/g:5dd3fe90a5c0067e3e21d81aa904d13a4154eb4a
commit r11-8788-g5dd3fe90a5c0067e3e21d81aa904d13a4154eb4a
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Sat Jul 3 19:47:48 2021 +0100
X86: Provide a CTOR for stringop_algs [PR100246].
Several older compilers fail to build modern GCC because of missing
or incomplete C++11 support.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR bootstrap/100246 - [11/12 Regression] GCC will not bootstrap with clang
3.4/3.5 [xcode 5/6, Darwin 12/13]
PR bootstrap/100246
gcc/ChangeLog:
* config/i386/i386.h (struct stringop_algs): Define a CTOR for
this type.
(cherry picked from commit f99f6eb58e1f894dae024f63cc2fe30fa7605e59)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
` (10 preceding siblings ...)
2021-07-20 6:58 ` cvs-commit at gcc dot gnu.org
@ 2021-07-20 6:59 ` iains at gcc dot gnu.org
2021-11-05 15:59 ` cvs-commit at gcc dot gnu.org
2021-11-29 8:49 ` cvs-commit at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: iains at gcc dot gnu.org @ 2021-07-20 6:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from Iain Sandoe <iains at gcc dot gnu.org> ---
so should be fixed for 11.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
` (11 preceding siblings ...)
2021-07-20 6:59 ` iains at gcc dot gnu.org
@ 2021-11-05 15:59 ` cvs-commit at gcc dot gnu.org
2021-11-29 8:49 ` cvs-commit at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-05 15:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:858d7ee1a0cd97c01d844ea73ab81918da738344
commit r12-4944-g858d7ee1a0cd97c01d844ea73ab81918da738344
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Nov 5 16:39:14 2021 +0100
x86: Make stringop_algs::stringop_strategy ctor constexpr [PR100246]
> Several older compilers fail to build modern GCC because of missing
> or incomplete C++11 support.
>
> * config/i386/i386.h (struct stringop_algs): Define a CTOR for
> this type.
Unfortunately, as mentioned in my
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583289.html
mail, without the new dyninit pass this causes dynamic initialization of
many variables, 6.5KB _GLOBAL__sub_I_* on x86_64 and 12.5KB on i686.
The following patch makes the ctor constexpr so that already the FE
is able to statically initialize all those.
I have tested on godbolt a reduced testcase without a constructor,
with constructor and with constexpr constructor.
clang before 3.3 is unhappy about all the 3 cases, clang 3.3 and 3.4
is ok with ctor and ctor with constexpr and optimizes it into static
initialization, clang 3.5+ is ok with all 3 versions and optimizes,
gcc 4.8 and 5+ is ok with all 3 versions and no ctor and ctor with
constexpr
is optimized, gcc 4.9 is unhappy about the no ctor case and happy with the
other two.
2021-11-05 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/100246
* config/i386/i386.h
(stringop_algs::stringop_strategy::stringop_strategy): Make the
ctor
constexpr.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
` (12 preceding siblings ...)
2021-11-05 15:59 ` cvs-commit at gcc dot gnu.org
@ 2021-11-29 8:49 ` cvs-commit at gcc dot gnu.org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-29 8:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:04d786a7add8f824af3b0c0d29884770810f7001
commit r11-9329-g04d786a7add8f824af3b0c0d29884770810f7001
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Nov 5 16:39:14 2021 +0100
x86: Make stringop_algs::stringop_strategy ctor constexpr [PR100246]
> Several older compilers fail to build modern GCC because of missing
> or incomplete C++11 support.
>
> * config/i386/i386.h (struct stringop_algs): Define a CTOR for
> this type.
Unfortunately, as mentioned in my
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583289.html
mail, without the new dyninit pass this causes dynamic initialization of
many variables, 6.5KB _GLOBAL__sub_I_* on x86_64 and 12.5KB on i686.
The following patch makes the ctor constexpr so that already the FE
is able to statically initialize all those.
I have tested on godbolt a reduced testcase without a constructor,
with constructor and with constexpr constructor.
clang before 3.3 is unhappy about all the 3 cases, clang 3.3 and 3.4
is ok with ctor and ctor with constexpr and optimizes it into static
initialization, clang 3.5+ is ok with all 3 versions and optimizes,
gcc 4.8 and 5+ is ok with all 3 versions and no ctor and ctor with
constexpr
is optimized, gcc 4.9 is unhappy about the no ctor case and happy with the
other two.
2021-11-05 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/100246
* config/i386/i386.h
(stringop_algs::stringop_strategy::stringop_strategy): Make the
ctor
constexpr.
(cherry picked from commit 858d7ee1a0cd97c01d844ea73ab81918da738344)
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2021-11-29 8:49 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-24 15:52 [Bug bootstrap/100246] New: [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13] iains at gcc dot gnu.org
2021-04-24 15:54 ` [Bug bootstrap/100246] " iains at gcc dot gnu.org
2021-04-24 20:21 ` iains at gcc dot gnu.org
2021-04-26 7:23 ` rguenth at gcc dot gnu.org
2021-04-27 19:34 ` gcc@Denis-Excoffier.org
2021-05-05 7:43 ` iains at gcc dot gnu.org
2021-05-07 19:44 ` iains at gcc dot gnu.org
2021-05-09 9:01 ` gcc@Denis-Excoffier.org
2021-05-10 8:40 ` iains at gcc dot gnu.org
2021-05-13 18:53 ` pinskia at gcc dot gnu.org
2021-07-06 10:14 ` cvs-commit at gcc dot gnu.org
2021-07-20 6:58 ` cvs-commit at gcc dot gnu.org
2021-07-20 6:59 ` iains at gcc dot gnu.org
2021-11-05 15:59 ` cvs-commit at gcc dot gnu.org
2021-11-29 8:49 ` cvs-commit at gcc dot gnu.org
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).