[Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]

2021-11-29 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

--- Comment #12 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
:

https://gcc.gnu.org/g:04d786a7add8f824af3b0c0d29884770810f7001

commit r11-9329-g04d786a7add8f824af3b0c0d29884770810f7001
Author: Jakub Jelinek 
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  

PR bootstrap/100246
* config/i386/i386.h
(stringop_algs::stringop_strategy::stringop_strategy): Make the
ctor
constexpr.

(cherry picked from commit 858d7ee1a0cd97c01d844ea73ab81918da738344)

[Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]

2021-11-05 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

--- Comment #11 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:858d7ee1a0cd97c01d844ea73ab81918da738344

commit r12-4944-g858d7ee1a0cd97c01d844ea73ab81918da738344
Author: Jakub Jelinek 
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  

PR bootstrap/100246
* config/i386/i386.h
(stringop_algs::stringop_strategy::stringop_strategy): Make the
ctor
constexpr.

[Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]

2021-07-20 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

Iain Sandoe  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Iain Sandoe  ---
so should be fixed for 11.2

[Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]

2021-07-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

--- Comment #9 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Iain D Sandoe
:

https://gcc.gnu.org/g:5dd3fe90a5c0067e3e21d81aa904d13a4154eb4a

commit r11-8788-g5dd3fe90a5c0067e3e21d81aa904d13a4154eb4a
Author: Iain Sandoe 
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 

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)

[Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]

2021-07-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

--- Comment #8 from CVS Commits  ---
The master branch has been updated by Iain D Sandoe :

https://gcc.gnu.org/g:f99f6eb58e1f894dae024f63cc2fe30fa7605e59

commit r12-2052-gf99f6eb58e1f894dae024f63cc2fe30fa7605e59
Author: Iain Sandoe 
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 

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.

[Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]

2021-05-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

Andrew Pinski  changed:

   What|Removed |Added

 CC||bug-reports.delphin@laposte
   ||.net

--- Comment #7 from Andrew Pinski  ---
*** Bug 100585 has been marked as a duplicate of this bug. ***

[Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]

2021-05-10 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

--- Comment #6 from Iain Sandoe  ---
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;

[Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]

2021-05-09 Thread gcc--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

--- Comment #5 from Denis Excoffier  ---
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).

[Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]

2021-05-07 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

--- Comment #4 from Iain Sandoe  ---
for the record the patch in comment #3 allowed bootstrap to succeed on Darwin12
with clang 3.4-based Xcode.

[Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]

2021-05-05 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

--- Comment #3 from Iain Sandoe  ---
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];
};

[Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]

2021-04-27 Thread gcc--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

Denis Excoffier  changed:

   What|Removed |Added

 CC||g...@denis-excoffier.org

--- Comment #2 from Denis Excoffier  ---
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.

[Bug bootstrap/100246] [11/12 Regression] GCC will not bootstrap with clang 3.4/3.5 [xcode 5/6, Darwin 12/13]

2021-04-26 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |11.2
Version|10.2.1  |11.0

[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 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

--- Comment #1 from Iain Sandoe  ---
Created attachment 50669
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50669=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.

[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 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100246

Iain Sandoe  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