The package rpms/gcc.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/gcc.git/commit/?id=3659d992cdeb8b...
https://src.fedoraproject.org/cgit/rpms/gcc.git/commit/?id=878cf31641035e....
Change:
+%ifnarch %{arm}
-%ifarch x86_64 %{ix86} ppc64le s390x
Thanks.
Full change:
============
commit a0c2c3b09eddb427e61db80a550a15c79e026094
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Thu Jan 27 10:21:55 2022 +0100
11.2.1-9
diff --git a/.gitignore b/.gitignore
index 9303dee..efb1370 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,3 +55,4 @@
/gcc-11.2.1-20211019.tar.xz
/gcc-11.2.1-20211203.tar.xz
/gcc-11.2.1-20220125.tar.xz
+/gcc-11.2.1-20220127.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 39b9c01..9f5face 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20220125
-%global gitrev 1003f94c7cb486aee2ec3ee37ea8b919f908f019
+%global DATE 20220127
+%global gitrev 2fa6e5c54e782377faa4c9c1f0e0b16db27f266c
%global gcc_version 11.2.1
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 8
+%global gcc_release 9
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -3148,6 +3148,11 @@ end
%endif
%changelog
+* Thu Jan 25 2022 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-9
+- update from releases/gcc-11-branch
+ - PRs fortran/104127, fortran/104212, fortran/104227, target/101529
+- fix up va-opt-6.c testcase
+
* Tue Jan 25 2022 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-8
- update from releases/gcc-11-branch
- PRs ada/103538, analyzer/101962, bootstrap/103688, c++/85846, c++/95009,
diff --git a/gcc11-stringify-__VA_OPT__-2.patch b/gcc11-stringify-__VA_OPT__-2.patch
index 0b38854..5874bc1 100644
--- a/gcc11-stringify-__VA_OPT__-2.patch
+++ b/gcc11-stringify-__VA_OPT__-2.patch
@@ -95,7 +95,7 @@ gcc/testsuite/
}
else if ((src->flags & PASTE_LEFT)
|| (src != macro->exp.tokens && (src[-1].flags & PASTE_LEFT)))
-@@ -2071,11 +2052,46 @@ replace_args (cpp_reader *pfile, cpp_has
+@@ -2065,11 +2046,46 @@ replace_args (cpp_reader *pfile, cpp_has
{
unsigned int count
= start ? paste_flag - start : tokens_buff_count (buff);
diff --git a/gcc11-stringify-__VA_OPT__.patch b/gcc11-stringify-__VA_OPT__.patch
index b21a51f..101b026 100644
--- a/gcc11-stringify-__VA_OPT__.patch
+++ b/gcc11-stringify-__VA_OPT__.patch
@@ -178,11 +178,10 @@ gcc/testsuite/
}
else if ((src->flags & PASTE_LEFT)
|| (src != macro->exp.tokens && (src[-1].flags & PASTE_LEFT)))
-@@ -2028,6 +2066,25 @@ replace_args (cpp_reader *pfile, cpp_has
- is empty or because it is __VA_OPT__() ), drop PASTE_LEFT
- flag from previous token. */
- copy_paste_flag (pfile, start, &pfile->avoid_paste);
-+
+@@ -2023,6 +2061,24 @@ replace_args (cpp_reader *pfile, cpp_has
+ paste_flag = tokens_buff_last_token_ptr (buff);
+ }
+
+ if (vaopt_tracker.stringify ())
+ {
+ unsigned int count
@@ -201,10 +200,10 @@ gcc/testsuite/
+ NULL, 0);
+ continue;
+ }
- if (src->flags & PASTE_LEFT)
- {
- /* With a non-empty __VA_OPT__ on the LHS of ##, the last
-@@ -3584,7 +3641,10 @@ create_iso_definition (cpp_reader *pfile
+ if (start && paste_flag == start && (*start)->flags &
PASTE_LEFT)
+ /* If __VA_OPT__ expands to nothing (either because __VA_ARGS__
+ is empty or because it is __VA_OPT__() ), drop PASTE_LEFT
+@@ -3584,7 +3640,10 @@ create_iso_definition (cpp_reader *pfile
function-like macros when lexing the subsequent token. */
if (macro->count > 1 && token[-1].type == CPP_HASH &&
macro->fun_like)
{
diff --git a/sources b/sources
index 4143273..a2dc8ba 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (gcc-11.2.1-20220125.tar.xz) =
f2670bce2f207e3353c30be9f1108499b91f27bce9182f1cec3a73a754f248886a6e6e4b40c5968b74fd4409604780c9ad78b92677c27521d82f31b5b38ad269
+SHA512 (gcc-11.2.1-20220127.tar.xz) =
da9fa3122aa15ad647e07fac27e8c59de74fa04f1846074320751f6fbfa30ac239867b6c349c4d0c08ada01722e6074a89809dd89c3e189fefdfcf16fad70498
SHA512 (isl-0.18.tar.bz2) =
85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) =
002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) =
f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
commit 828c757f09643e1ae4e63e338e813591cac3f1a0
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Tue Jan 25 20:13:48 2022 +0100
11.2.1-8
diff --git a/.gitignore b/.gitignore
index dbccc8a..9303dee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,3 +54,4 @@
/gcc-11.2.1-20211018.tar.xz
/gcc-11.2.1-20211019.tar.xz
/gcc-11.2.1-20211203.tar.xz
+/gcc-11.2.1-20220125.tar.xz
diff --git a/gcc.spec b/gcc.spec
index a310bcf..39b9c01 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20211203
-%global gitrev e41308252e835ddedcabfd4a98240080c6583a43
+%global DATE 20220125
+%global gitrev 1003f94c7cb486aee2ec3ee37ea8b919f908f019
%global gcc_version 11.2.1
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 7
+%global gcc_release 8
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -3148,6 +3148,31 @@ end
%endif
%changelog
+* Tue Jan 25 2022 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-8
+- update from releases/gcc-11-branch
+ - PRs ada/103538, analyzer/101962, bootstrap/103688, c++/85846, c++/95009,
+ c++/98394, c++/99911, c++/100493, c++/101715, c++/102229, c++/102933,
+ c++/103012, c++/103198, c++/103480, c++/103703, c++/103714,
+ c++/103758, c++/103783, c++/103831, c++/103912, c++/104055, c/97548,
+ c/101289, c/101537, c/103587, c/103881, d/103604, debug/103838,
+ debug/103874, fortran/67804, fortran/83079, fortran/101329,
+ fortran/101762, fortran/102332, fortran/102717, fortran/102787,
+ fortran/103411, fortran/103412, fortran/103418, fortran/103473,
+ fortran/103505, fortran/103588, fortran/103591, fortran/103606,
+ fortran/103607, fortran/103609, fortran/103610, fortran/103692,
+ fortran/103717, fortran/103718, fortran/103719, fortran/103776,
+ fortran/103777, fortran/103778, fortran/103782, fortran/103789,
+ ipa/101354, jit/103562, libfortran/103634, libstdc++/100017,
+ libstdc++/102994, libstdc++/103453, libstdc++/103501,
+ libstdc++/103549, libstdc++/103877, libstdc++/103919,
+ middle-end/101751, middle-end/102860, middle-end/103813, objc/103639,
+ preprocessor/89971, preprocessor/102432, rtl-optimization/102478,
+ rtl-optimization/103837, rtl-optimization/103860,
+ rtl-optimization/103908, sanitizer/102911, target/102347,
+ target/103465, target/103661, target/104172, target/104188,
+ tree-optimization/101615, tree-optimization/103523,
+ tree-optimization/103603, tree-optimization/103995
+
* Fri Dec 3 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-7
- update from releases/gcc-11-branch
- PRs ada/100486, c++/70796, c++/92746, c++/93286, c++/94490, c++/102642,
diff --git a/gcc11-stringify-__VA_OPT__-2.patch b/gcc11-stringify-__VA_OPT__-2.patch
index 987f738..0b38854 100644
--- a/gcc11-stringify-__VA_OPT__-2.patch
+++ b/gcc11-stringify-__VA_OPT__-2.patch
@@ -33,7 +33,7 @@ gcc/testsuite/
--- libcpp/macro.c.jj
+++ libcpp/macro.c
-@@ -295,7 +295,7 @@ static cpp_context *next_context (cpp_reader *);
+@@ -295,7 +295,7 @@ static cpp_context *next_context (cpp_re
static const cpp_token *padding_token (cpp_reader *, const cpp_token *);
static const cpp_token *new_string_token (cpp_reader *, uchar *, unsigned int);
static const cpp_token *stringify_arg (cpp_reader *, const cpp_token **,
@@ -42,7 +42,7 @@ gcc/testsuite/
static void paste_all_tokens (cpp_reader *, const cpp_token *);
static bool paste_tokens (cpp_reader *, location_t,
const cpp_token **, const cpp_token *);
-@@ -834,8 +834,7 @@ cpp_quote_string (uchar *dest, const uchar *src, unsigned int len)
+@@ -826,8 +826,7 @@ cpp_quote_string (uchar *dest, const uch
/* Convert a token sequence FIRST to FIRST+COUNT-1 to a single string token
according to the rules of the ISO C #-operator. */
static const cpp_token *
@@ -52,7 +52,7 @@ gcc/testsuite/
{
unsigned char *dest;
unsigned int i, escape_it, backslash_count = 0;
-@@ -852,24 +851,6 @@ stringify_arg (cpp_reader *pfile, const cpp_token **first, unsigned
int count,
+@@ -844,24 +843,6 @@ stringify_arg (cpp_reader *pfile, const
{
const cpp_token *token = first[i];
@@ -77,7 +77,7 @@ gcc/testsuite/
if (token->type == CPP_PADDING)
{
if (source == NULL
-@@ -1003,6 +984,7 @@ paste_tokens (cpp_reader *pfile, location_t location,
+@@ -995,6 +976,7 @@ paste_tokens (cpp_reader *pfile, locatio
return false;
}
@@ -85,7 +85,7 @@ gcc/testsuite/
*plhs = lhs;
_cpp_pop_buffer (pfile);
return true;
-@@ -1945,8 +1927,7 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro
*macro,
+@@ -1937,8 +1919,7 @@ replace_args (cpp_reader *pfile, cpp_has
if (src->flags & STRINGIFY_ARG)
{
if (!arg->stringified)
@@ -95,7 +95,7 @@ gcc/testsuite/
}
else if ((src->flags & PASTE_LEFT)
|| (src != macro->exp.tokens && (src[-1].flags & PASTE_LEFT)))
-@@ -2066,11 +2047,46 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro
*macro,
+@@ -2071,11 +2052,46 @@ replace_args (cpp_reader *pfile, cpp_has
{
unsigned int count
= start ? paste_flag - start : tokens_buff_count (buff);
diff --git a/gcc11-stringify-__VA_OPT__.patch b/gcc11-stringify-__VA_OPT__.patch
index 3a2a71f..b21a51f 100644
--- a/gcc11-stringify-__VA_OPT__.patch
+++ b/gcc11-stringify-__VA_OPT__.patch
@@ -66,7 +66,7 @@ gcc/testsuite/
/* The state variable:
0 means not parsing
-@@ -284,7 +294,8 @@ static _cpp_buff *collect_args (cpp_reader *, const cpp_hashnode *,
+@@ -284,7 +294,8 @@ static _cpp_buff *collect_args (cpp_read
static cpp_context *next_context (cpp_reader *);
static const cpp_token *padding_token (cpp_reader *, const cpp_token *);
static const cpp_token *new_string_token (cpp_reader *, uchar *, unsigned int);
@@ -76,7 +76,7 @@ gcc/testsuite/
static void paste_all_tokens (cpp_reader *, const cpp_token *);
static bool paste_tokens (cpp_reader *, location_t,
const cpp_token **, const cpp_token *);
-@@ -818,10 +829,11 @@ cpp_quote_string (uchar *dest, const uchar *src, unsigned int len)
+@@ -812,10 +823,11 @@ cpp_quote_string (uchar *dest, const uch
return dest;
}
@@ -91,7 +91,7 @@ gcc/testsuite/
{
unsigned char *dest;
unsigned int i, escape_it, backslash_count = 0;
-@@ -834,9 +846,27 @@ stringify_arg (cpp_reader *pfile, macro_arg *arg)
+@@ -828,9 +840,27 @@ stringify_arg (cpp_reader *pfile, macro_
*dest++ = '"';
/* Loop, reading in the argument's tokens. */
@@ -121,7 +121,7 @@ gcc/testsuite/
if (token->type == CPP_PADDING)
{
-@@ -923,7 +953,7 @@ paste_tokens (cpp_reader *pfile, location_t location,
+@@ -917,7 +947,7 @@ paste_tokens (cpp_reader *pfile, locatio
cpp_token *lhs;
unsigned int len;
@@ -130,7 +130,7 @@ gcc/testsuite/
buf = (unsigned char *) alloca (len);
end = lhsend = cpp_spell_token (pfile, *plhs, buf, true);
-@@ -949,8 +979,10 @@ paste_tokens (cpp_reader *pfile, location_t location,
+@@ -943,8 +973,10 @@ paste_tokens (cpp_reader *pfile, locatio
location_t saved_loc = lhs->src_loc;
_cpp_pop_buffer (pfile);
@@ -143,7 +143,7 @@ gcc/testsuite/
/* We have to remove the PASTE_LEFT flag from the old lhs, but
we want to keep the new location. */
-@@ -962,8 +994,10 @@ paste_tokens (cpp_reader *pfile, location_t location,
+@@ -956,8 +988,10 @@ paste_tokens (cpp_reader *pfile, locatio
/* Mandatory error for all apart from assembler. */
if (CPP_OPTION (pfile, lang) != CLK_ASM)
cpp_error_with_line (pfile, CPP_DL_ERROR, location, 0,
@@ -156,7 +156,7 @@ gcc/testsuite/
return false;
}
-@@ -1039,7 +1073,10 @@ paste_all_tokens (cpp_reader *pfile, const cpp_token *lhs)
+@@ -1033,7 +1067,10 @@ paste_all_tokens (cpp_reader *pfile, con
abort ();
}
if (!paste_tokens (pfile, virt_loc, &lhs, rhs))
@@ -168,7 +168,7 @@ gcc/testsuite/
}
while (rhs->flags & PASTE_LEFT);
-@@ -1906,7 +1943,8 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro
*macro,
+@@ -1900,7 +1937,8 @@ replace_args (cpp_reader *pfile, cpp_has
if (src->flags & STRINGIFY_ARG)
{
if (!arg->stringified)
@@ -178,11 +178,11 @@ gcc/testsuite/
}
else if ((src->flags & PASTE_LEFT)
|| (src != macro->exp.tokens && (src[-1].flags & PASTE_LEFT)))
-@@ -2029,7 +2067,24 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro
*macro,
- paste_flag = tokens_buff_last_token_ptr (buff);
- }
-
-- if (src->flags & PASTE_LEFT)
+@@ -2028,6 +2066,25 @@ replace_args (cpp_reader *pfile, cpp_has
+ is empty or because it is __VA_OPT__() ), drop PASTE_LEFT
+ flag from previous token. */
+ copy_paste_flag (pfile, start, &pfile->avoid_paste);
++
+ if (vaopt_tracker.stringify ())
+ {
+ unsigned int count
@@ -199,12 +199,12 @@ gcc/testsuite/
+ tokens_buff_add_token (buff, virt_locs,
+ t, t->src_loc, t->src_loc,
+ NULL, 0);
++ continue;
+ }
-+ else if (src->flags & PASTE_LEFT)
+ if (src->flags & PASTE_LEFT)
{
/* With a non-empty __VA_OPT__ on the LHS of ##, the last
- token should be flagged PASTE_LEFT. */
-@@ -3585,7 +3640,10 @@ create_iso_definition (cpp_reader *pfile)
+@@ -3584,7 +3641,10 @@ create_iso_definition (cpp_reader *pfile
function-like macros when lexing the subsequent token. */
if (macro->count > 1 && token[-1].type == CPP_HASH &&
macro->fun_like)
{
diff --git a/sources b/sources
index a7e012b..4143273 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (gcc-11.2.1-20211203.tar.xz) =
3cf64d3af541b9e80a2d5dd95a1257afefda554cfa16b757a7f861701e3da2d6917dbb1f4cd74301ffaf45e92c441642b8c589a10698a9103a216620f0849626
+SHA512 (gcc-11.2.1-20220125.tar.xz) =
f2670bce2f207e3353c30be9f1108499b91f27bce9182f1cec3a73a754f248886a6e6e4b40c5968b74fd4409604780c9ad78b92677c27521d82f31b5b38ad269
SHA512 (isl-0.18.tar.bz2) =
85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) =
002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) =
f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
commit 671fc7ba16012e3269434c1e3034006994713475
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Fri Dec 3 17:10:08 2021 +0100
11.2.1-7
diff --git a/.gitignore b/.gitignore
index a1edf7b..dbccc8a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,3 +53,4 @@
/gcc-11.2.1-20211012.tar.xz
/gcc-11.2.1-20211018.tar.xz
/gcc-11.2.1-20211019.tar.xz
+/gcc-11.2.1-20211203.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 9fe1607..a310bcf 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20211019
-%global gitrev 0990a48aaf68b56a3737fdb290328df1da9095cc
+%global DATE 20211203
+%global gitrev e41308252e835ddedcabfd4a98240080c6583a43
%global gcc_version 11.2.1
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 6
+%global gcc_release 7
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -270,7 +270,7 @@ Patch13: gcc11-pr99341-revert.patch
Patch14: gcc11-libgcc-link.patch
Patch15: gcc11-pr101786.patch
Patch16: gcc11-stringify-__VA_OPT__.patch
-Patch17: gcc11-pr102642.patch
+Patch17: gcc11-stringify-__VA_OPT__-2.patch
Patch100: gcc11-fortran-fdec-duplicates.patch
Patch101: gcc11-fortran-flogical-as-integer.patch
@@ -799,7 +799,7 @@ to NVidia PTX capable devices if available.
%patch14 -p0 -b .libgcc-link~
%patch15 -p0 -b .pr101786~
%patch16 -p0 -b .stringify-__VA_OPT__~
-%patch17 -p0 -b .pr102642~
+%patch17 -p0 -b .stringify-__VA_OPT__-2~
%if 0%{?rhel} >= 9
%patch100 -p1 -b .fortran-fdec-duplicates~
@@ -3148,6 +3148,33 @@ end
%endif
%changelog
+* Fri Dec 3 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-7
+- update from releases/gcc-11-branch
+ - PRs ada/100486, c++/70796, c++/92746, c++/93286, c++/94490, c++/102642,
+ c++/102786, debug/101378, debug/103046, debug/103315, fortran/87711,
+ fortran/87851, fortran/97896, fortran/99061, fortran/99348,
+ fortran/102521, fortran/102685, fortran/102715, fortran/102745,
+ fortran/102816, fortran/102817, fortran/102917, fortran/103137,
+ fortran/103138, fortran/103392, gcov-profile/100520, ipa/102714,
+ ipa/102762, ipa/103052, ipa/103246, ipa/103267, libstdc++/96416,
+ libstdc++/98421, libstdc++/100117, libstdc++/100153, libstdc++/100748,
+ libstdc++/101571, libstdc++/101608, libstdc++/102894,
+ libstdc++/103022, libstdc++/103086, libstdc++/103133,
+ libstdc++/103240, libstdc++/103381, middle-end/64888,
+ middle-end/101480, middle-end/102431, middle-end/102518,
+ middle-end/103059, middle-end/103181, middle-end/103248,
+ middle-end/103384, preprocessor/103130, rtl-optimization/102356,
+ rtl-optimization/102842, target/101985, target/102976, target/102991,
+ target/103205, target/103274, target/103275, testsuite/102690,
+ tree-optimization/100393, tree-optimization/102139,
+ tree-optimization/102505, tree-optimization/102572,
+ tree-optimization/102788, tree-optimization/102789,
+ tree-optimization/102798, tree-optimization/102970,
+ tree-optimization/103192, tree-optimization/103204,
+ tree-optimization/103237, tree-optimization/103255,
+ tree-optimization/103435
+- fix up #__VA_OPT__ handling (PR preprocessor/103415)
+
* Tue Oct 19 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-6
- update from releases/gcc-11-branch
- PRs target/100208, target/100316, target/102761
diff --git a/gcc11-pr102642.patch b/gcc11-pr102642.patch
deleted file mode 100644
index 598794b..0000000
--- a/gcc11-pr102642.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-2021-10-11 Jakub Jelinek <jakub(a)redhat.com>
-
- PR c++/102642
- * name-lookup.c (push_local_extern_decl_alias): Don't call
- set_decl_tls_model on error_mark_node.
- * parser.c (cp_parser_omp_declare_target): Likewise.
-
- * g++.dg/tls/pr102642.C: New test.
-
---- gcc/cp/name-lookup.c.jj 2021-10-01 10:30:07.674588541 +0200
-+++ gcc/cp/name-lookup.c 2021-10-11 12:43:39.261051228 +0200
-@@ -3474,7 +3474,9 @@ push_local_extern_decl_alias (tree decl)
- push_nested_namespace (ns);
- alias = do_pushdecl (alias, /* hiding= */true);
- pop_nested_namespace (ns);
-- if (VAR_P (decl) && CP_DECL_THREAD_LOCAL_P (decl))
-+ if (VAR_P (decl)
-+ && CP_DECL_THREAD_LOCAL_P (decl)
-+ && alias != error_mark_node)
- set_decl_tls_model (alias, DECL_TLS_MODEL (decl));
- }
- }
---- gcc/cp/parser.c.jj 2021-10-09 10:14:24.043098112 +0200
-+++ gcc/cp/parser.c 2021-10-11 12:47:21.220874667 +0200
-@@ -45665,7 +45666,8 @@ cp_parser_omp_declare_target (cp_parser
- if (VAR_OR_FUNCTION_DECL_P (t)
- && DECL_LOCAL_DECL_P (t)
- && DECL_LANG_SPECIFIC (t)
-- && DECL_LOCAL_DECL_ALIAS (t))
-+ && DECL_LOCAL_DECL_ALIAS (t)
-+ && DECL_LOCAL_DECL_ALIAS (t) != error_mark_node)
- handle_omp_declare_target_clause (c, DECL_LOCAL_DECL_ALIAS (t),
- device_type);
- }
---- gcc/testsuite/g++.dg/tls/pr102642.C.jj 2021-10-11 13:00:35.889503002 +0200
-+++ gcc/testsuite/g++.dg/tls/pr102642.C 2021-10-11 13:00:20.388724721 +0200
-@@ -0,0 +1,10 @@
-+// PR c++/102642
-+// { dg-do compile { target c++11 } }
-+
-+thread_local int *z; // { dg-message "previous declaration" }
-+
-+void
-+foo ()
-+{
-+ extern thread_local int z; // { dg-error "conflicting declaration" }
-+}
diff --git a/gcc11-stringify-__VA_OPT__-2.patch b/gcc11-stringify-__VA_OPT__-2.patch
new file mode 100644
index 0000000..987f738
--- /dev/null
+++ b/gcc11-stringify-__VA_OPT__-2.patch
@@ -0,0 +1,197 @@
+libcpp: Fix up #__VA_OPT__ handling [PR103415]
+
+stringify_arg uses pfile->u_buff to create the string literal.
+Unfortunately, paste_tokens -> _cpp_lex_direct -> lex_number ->
_cpp_unaligned_alloc
+can in some cases use pfile->u_buff too, which results in losing everything
+prepared for the string literal until the token pasting.
+
+The following patch fixes that by not calling paste_token during the
+construction of the string literal, but doing that before. All the tokens
+we are processing have been pushed into a token buffer using
+tokens_buff_add_token so it is fine if we paste some of them in that buffer
+(successful pasting creates a new token in that buffer), move following
+tokens if any to make it contiguous, pop (throw away) the extra tokens at
+the end and then do stringify_arg.
+
+Also, paste_tokens now copies over PREV_WHITE and PREV_FALLTHROUGH flags
+from the original lhs token to the replacement token. Copying that way
+the PREV_WHITE flag is needed for the #__VA_OPT__ handling and copying
+over PREV_FALLTHROUGH fixes the new Wimplicit-fallthrough-38.c test.
+
+2021-12-01 Jakub Jelinek <jakub(a)redhat.com>
+
+ PR preprocessor/103415
+libcpp/
+ * macro.c (stringify_arg): Remove va_opt argument and va_opt handling.
+ (paste_tokens): On successful paste or in PREV_WHITE and
+ PREV_FALLTHROUGH flags from the *plhs token to the new token.
+ (replace_args): Adjust stringify_arg callers. For #__VA_OPT__,
+ perform token pasting in a separate loop before stringify_arg call.
+gcc/testsuite/
+ * c-c++-common/cpp/va-opt-8.c: New test.
+ * c-c++-common/Wimplicit-fallthrough-38.c: New test.
+
+--- libcpp/macro.c.jj
++++ libcpp/macro.c
+@@ -295,7 +295,7 @@ static cpp_context *next_context (cpp_reader *);
+ static const cpp_token *padding_token (cpp_reader *, const cpp_token *);
+ static const cpp_token *new_string_token (cpp_reader *, uchar *, unsigned int);
+ static const cpp_token *stringify_arg (cpp_reader *, const cpp_token **,
+- unsigned int, bool);
++ unsigned int);
+ static void paste_all_tokens (cpp_reader *, const cpp_token *);
+ static bool paste_tokens (cpp_reader *, location_t,
+ const cpp_token **, const cpp_token *);
+@@ -834,8 +834,7 @@ cpp_quote_string (uchar *dest, const uchar *src, unsigned int len)
+ /* Convert a token sequence FIRST to FIRST+COUNT-1 to a single string token
+ according to the rules of the ISO C #-operator. */
+ static const cpp_token *
+-stringify_arg (cpp_reader *pfile, const cpp_token **first, unsigned int count,
+- bool va_opt)
++stringify_arg (cpp_reader *pfile, const cpp_token **first, unsigned int count)
+ {
+ unsigned char *dest;
+ unsigned int i, escape_it, backslash_count = 0;
+@@ -852,24 +851,6 @@ stringify_arg (cpp_reader *pfile, const cpp_token **first, unsigned
int count,
+ {
+ const cpp_token *token = first[i];
+
+- if (va_opt && (token->flags & PASTE_LEFT))
+- {
+- location_t virt_loc = pfile->invocation_location;
+- const cpp_token *rhs;
+- do
+- {
+- if (i == count)
+- abort ();
+- rhs = first[++i];
+- if (!paste_tokens (pfile, virt_loc, &token, rhs))
+- {
+- --i;
+- break;
+- }
+- }
+- while (rhs->flags & PASTE_LEFT);
+- }
+-
+ if (token->type == CPP_PADDING)
+ {
+ if (source == NULL
+@@ -1003,6 +984,7 @@ paste_tokens (cpp_reader *pfile, location_t location,
+ return false;
+ }
+
++ lhs->flags |= (*plhs)->flags & (PREV_WHITE | PREV_FALLTHROUGH);
+ *plhs = lhs;
+ _cpp_pop_buffer (pfile);
+ return true;
+@@ -1945,8 +1927,7 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro
*macro,
+ if (src->flags & STRINGIFY_ARG)
+ {
+ if (!arg->stringified)
+- arg->stringified = stringify_arg (pfile, arg->first, arg->count,
+- false);
++ arg->stringified = stringify_arg (pfile, arg->first, arg->count);
+ }
+ else if ((src->flags & PASTE_LEFT)
+ || (src != macro->exp.tokens && (src[-1].flags & PASTE_LEFT)))
+@@ -2066,11 +2047,46 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro
*macro,
+ {
+ unsigned int count
+ = start ? paste_flag - start : tokens_buff_count (buff);
+- const cpp_token *t
+- = stringify_arg (pfile,
+- start ? start + 1
+- : (const cpp_token **) (buff->base),
+- count, true);
++ const cpp_token **first
++ = start ? start + 1
++ : (const cpp_token **) (buff->base);
++ unsigned int i, j;
++
++ /* Paste any tokens that need to be pasted before calling
++ stringify_arg, because stringify_arg uses pfile->u_buff
++ which paste_tokens can use as well. */
++ for (i = 0, j = 0; i < count; i++, j++)
++ {
++ const cpp_token *token = first[i];
++
++ if (token->flags & PASTE_LEFT)
++ {
++ location_t virt_loc = pfile->invocation_location;
++ const cpp_token *rhs;
++ do
++ {
++ if (i == count)
++ abort ();
++ rhs = first[++i];
++ if (!paste_tokens (pfile, virt_loc, &token, rhs))
++ {
++ --i;
++ break;
++ }
++ }
++ while (rhs->flags & PASTE_LEFT);
++ }
++
++ first[j] = token;
++ }
++ if (j != i)
++ {
++ while (i-- != j)
++ tokens_buff_remove_last_token (buff);
++ count = j;
++ }
++
++ const cpp_token *t = stringify_arg (pfile, first, count);
+ while (count--)
+ tokens_buff_remove_last_token (buff);
+ if (src->flags & PASTE_LEFT)
+--- gcc/testsuite/c-c++-common/cpp/va-opt-8.c.jj
++++ gcc/testsuite/c-c++-common/cpp/va-opt-8.c
+@@ -0,0 +1,18 @@
++/* PR preprocessor/103415 */
++/* { dg-do run } */
++/* { dg-options "-std=gnu99" { target c } } */
++/* { dg-options "-std=c++20" { target c++ } } */
++
++#define n(x, ...) = #__VA_OPT__(x##3)
++#define o(x, ...) #__VA_OPT__(x##__VA_ARGS__##9)
++const char *c n(1 2, 4);
++const char *d = o(5 6, 7 8);
++
++int
++main ()
++{
++ if (__builtin_strcmp (c, "1 23")
++ || __builtin_strcmp (d, "5 67 89"))
++ __builtin_abort ();
++ return 0;
++}
+--- gcc/testsuite/c-c++-common/Wimplicit-fallthrough-38.c.jj
++++ gcc/testsuite/c-c++-common/Wimplicit-fallthrough-38.c
+@@ -0,0 +1,24 @@
++/* { dg-do compile } */
++/* { dg-options "-Wimplicit-fallthrough=3" } */
++
++#define FOO \
++int \
++foo (int a) \
++{ \
++ switch (a) \
++ { \
++ case 1: \
++ ++a; \
++ /* FALLTHRU */ \
++ case 2: \
++ ++a; \
++ /* FALLTHRU */ \
++ ca##se 3: \
++ ++a; \
++ default: \
++ break; \
++ } \
++ return a; \
++}
++
++FOO
diff --git a/sources b/sources
index 385d24d..a7e012b 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (gcc-11.2.1-20211019.tar.xz) =
08c85e39d028446730372cfbe13a708f240d9a20d89429542fa5c8190a7e9bc13c6734ad068152b4644a7ae561d8c76b9633289e9b20735bbca0d034cf1eea82
+SHA512 (gcc-11.2.1-20211203.tar.xz) =
3cf64d3af541b9e80a2d5dd95a1257afefda554cfa16b757a7f861701e3da2d6917dbb1f4cd74301ffaf45e92c441642b8c589a10698a9103a216620f0849626
SHA512 (isl-0.18.tar.bz2) =
85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) =
002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) =
f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
commit 80be3f02eafcc0b1cccef029f831a420b7829c42
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Tue Oct 19 17:53:26 2021 +0200
11.2.1-6
diff --git a/.gitignore b/.gitignore
index d46df6b..a1edf7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -52,3 +52,4 @@
/gcc-11.2.1-20210823.tar.xz
/gcc-11.2.1-20211012.tar.xz
/gcc-11.2.1-20211018.tar.xz
+/gcc-11.2.1-20211019.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 270490b..9fe1607 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20211018
-%global gitrev d6f9b521b3fafab22aa00ff239862bed57fa8dad
+%global DATE 20211019
+%global gitrev 0990a48aaf68b56a3737fdb290328df1da9095cc
%global gcc_version 11.2.1
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 5
+%global gcc_release 6
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -3148,6 +3148,11 @@ end
%endif
%changelog
+* Tue Oct 19 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-6
+- update from releases/gcc-11-branch
+ - PRs target/100208, target/100316, target/102761
+- fix up libstdc++ docs build
+
* Mon Oct 18 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-5
- update from releases/gcc-11-branch
- PRs fortran/102716, libstdc++/65816, libstdc++/90787, libstdc++/99876,
diff --git a/sources b/sources
index ea09505..385d24d 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (gcc-11.2.1-20211018.tar.xz) =
891705d0b37e3cffb3d092d2292877db01ab42ecb49e443ad747e56881ddc153e8973ec95b9774ced5ee8d4e8c09fd7d33837540abe8dc50bccb6a4824d285c6
+SHA512 (gcc-11.2.1-20211019.tar.xz) =
08c85e39d028446730372cfbe13a708f240d9a20d89429542fa5c8190a7e9bc13c6734ad068152b4644a7ae561d8c76b9633289e9b20735bbca0d034cf1eea82
SHA512 (isl-0.18.tar.bz2) =
85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) =
002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) =
f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
commit 3659d992cdeb8b5730dbd6f7801d63fd171cf65b
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Mon Oct 18 19:45:26 2021 +0200
11.2.1-5
diff --git a/.gitignore b/.gitignore
index 8d7c493..d46df6b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,3 +51,4 @@
/gcc-11.2.1-20210728.tar.xz
/gcc-11.2.1-20210823.tar.xz
/gcc-11.2.1-20211012.tar.xz
+/gcc-11.2.1-20211018.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 73dbb6f..270490b 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20211012
-%global gitrev 7e514c5f733dbaac439b226e7b3c741a45ee50a1
+%global DATE 20211018
+%global gitrev d6f9b521b3fafab22aa00ff239862bed57fa8dad
%global gcc_version 11.2.1
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 4
+%global gcc_release 5
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -1091,7 +1091,9 @@ CONFIGURE_OPTS="\
--build=%{gcc_target_platform} \
%endif
%if 0%{?fedora} >= 35 || 0%{?rhel} >= 9
+%ifnarch %{arm}
--with-build-config=bootstrap-lto --enable-link-serialization=1 \
+%endif
%endif
"
@@ -3146,7 +3148,21 @@ end
%endif
%changelog
+* Mon Oct 18 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-5
+- update from releases/gcc-11-branch
+ - PRs fortran/102716, libstdc++/65816, libstdc++/90787, libstdc++/99876,
+ libstdc++/100187, libstdc++/100237, libstdc++/100249,
+ libstdc++/100287, libstdc++/100606, libstdc++/100863,
+ libstdc++/101483, libstdc++/101583, libstdc++/101589,
+ libstdc++/101599, libstdc++/101761, libstdc++/101870,
+ libstdc++/101923, libstdc++/101960, libstdc++/102048,
+ libstdc++/102074, libstdc++/102270, libstdc++/102280,
+ libstdc++/102425, libstdc++/102592, libstdc++/102667,
+ rtl-optimization/102627, target/100340, target/102588
- add mwaitintrin.h on x86 (#2013860)
+- disable LTO bootstrap on 32-bit arm, 6 days long build and counting
+ isn't acceptable, build boxes don't have enough memory and are too
+ slow
* Tue Oct 12 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-4
- update from releases/gcc-11-branch
diff --git a/sources b/sources
index 837dc16..ea09505 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (gcc-11.2.1-20211012.tar.xz) =
cfd92e6d147e5f9173d040cadf440eae2b6f0e884270346b33685e4f6a143275ebcbfa39f4888e2cbd7e0dc7c51c0d254de44ec6ca57063f0b41591eb4a58410
+SHA512 (gcc-11.2.1-20211018.tar.xz) =
891705d0b37e3cffb3d092d2292877db01ab42ecb49e443ad747e56881ddc153e8973ec95b9774ced5ee8d4e8c09fd7d33837540abe8dc50bccb6a4824d285c6
SHA512 (isl-0.18.tar.bz2) =
85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) =
002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) =
f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
commit 3b91dbe507b1e81051fe3a318440d9806a36ad8b
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Thu Oct 14 10:37:56 2021 +0200
Add mwaitintrin.h.
diff --git a/gcc.spec b/gcc.spec
index e154721..73dbb6f 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -2273,6 +2273,7 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/hresetintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/keylockerintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avxvnniintrin.h
+%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mwaitintrin.h
%endif
%ifarch ia64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/ia64intrin.h
@@ -3145,6 +3146,8 @@ end
%endif
%changelog
+- add mwaitintrin.h on x86 (#2013860)
+
* Tue Oct 12 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-4
- update from releases/gcc-11-branch
- PRs ada/101970, c++/60318, c++/64697, c++/88578, c++/91292, c++/95567,
commit 27b6bb48cf4746a43e86a5720be69707731cb9a1
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Tue Oct 12 12:35:17 2021 +0200
11.2.1-4
diff --git a/gcc.spec b/gcc.spec
index 9dac6e6..e154721 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -3172,6 +3172,7 @@ end
symbols (mangled as _ZNSt9once_flag11_M_activateEv and
_ZNSt9once_flag9_M_finishEb) aren't part of upstream GCC 11 and were
present only because not all packaged have been successfully rebuilt
+ (#1961541)
* Mon Aug 23 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-3
- update from releases/gcc-11-branch
commit 68a50d69641ae8678c139a37a7c37ee37e26c5c8
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Tue Oct 12 12:33:59 2021 +0200
11.2.1-4
diff --git a/.gitignore b/.gitignore
index beab83d..8d7c493 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,3 +50,4 @@
/gcc-11.1.1-20210726.tar.xz
/gcc-11.2.1-20210728.tar.xz
/gcc-11.2.1-20210823.tar.xz
+/gcc-11.2.1-20211012.tar.xz
diff --git a/gcc.spec b/gcc.spec
index dcc7fb5..9dac6e6 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20210823
-%global gitrev b558c8e931f0c36cda40bd60f5cdeb92452e91b5
+%global DATE 20211012
+%global gitrev 7e514c5f733dbaac439b226e7b3c741a45ee50a1
%global gcc_version 11.2.1
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 3
+%global gcc_release 4
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -270,6 +270,7 @@ Patch13: gcc11-pr99341-revert.patch
Patch14: gcc11-libgcc-link.patch
Patch15: gcc11-pr101786.patch
Patch16: gcc11-stringify-__VA_OPT__.patch
+Patch17: gcc11-pr102642.patch
Patch100: gcc11-fortran-fdec-duplicates.patch
Patch101: gcc11-fortran-flogical-as-integer.patch
@@ -792,10 +793,13 @@ to NVidia PTX capable devices if available.
%patch11 -p0 -b .rh1574936~
%endif
%patch12 -p0 -b .d-shared-libphobos~
+%if 0%{?fedora} == 34
%patch13 -p0 -b .pr99341-revert~
+%endif
%patch14 -p0 -b .libgcc-link~
%patch15 -p0 -b .pr101786~
%patch16 -p0 -b .stringify-__VA_OPT__~
+%patch17 -p0 -b .pr102642~
%if 0%{?rhel} >= 9
%patch100 -p1 -b .fortran-fdec-duplicates~
@@ -3141,6 +3145,34 @@ end
%endif
%changelog
+* Tue Oct 12 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-4
+- update from releases/gcc-11-branch
+ - PRs ada/101970, c++/60318, c++/64697, c++/88578, c++/91292, c++/95567,
+ c++/98216, c++/98486, c++/99904, c++/100495, c++/101344, c++/101592,
+ c++/101803, c++/101883, c++/102163, c++/102295, c++/102305,
+ c++/102412, c++/102454, c++/102496, c++/102535, c++/102547,
+ c++/102548, c++/102640, d/102185, d/102574, debug/102373,
+ debug/102441, fortran/46691, fortran/82314, fortran/85130,
+ fortran/87737, fortran/98490, fortran/99819, fortran/100950,
+ fortran/101327, fortran/101349, fortran/102113, fortran/102287,
+ fortran/102311, fortran/102366, fortran/102458, fortran/102520,
+ ipa/97565, libgomp/96661, libstdc++/100180, libstdc++/100285,
+ libstdc++/100286, libstdc++/100351, libstdc++/100682,
+ libstdc++/101965, middle-end/101824, middle-end/101949,
+ rtl-optimization/102306, sanitizer/102515, target/94630, target/97142,
+ target/100734, target/101471, target/101472, target/101492,
+ target/101549, target/101849, target/101934, target/102035,
+ target/102107, target/102115, target/102166, target/102222,
+ target/102224, target/102498, tree-optimization/101925,
+ tree-optimization/102046, tree-optimization/102124,
+ tree-optimization/102400, tree-optimization/102451,
+ tree-optimization/102622
+- remove the PR libstdc++/99341 workaround for Fedora 35 and later,
+ the std::once_flag::_M_activate() and std::once_flag::_M_finish(bool)
+ symbols (mangled as _ZNSt9once_flag11_M_activateEv and
+ _ZNSt9once_flag9_M_finishEb) aren't part of upstream GCC 11 and were
+ present only because not all packaged have been successfully rebuilt
+
* Mon Aug 23 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-3
- update from releases/gcc-11-branch
- PRs c++/100828, c++/101663, c++/101725, c++/101759, c/100150, c/101512,
diff --git a/gcc11-pr102642.patch b/gcc11-pr102642.patch
new file mode 100644
index 0000000..598794b
--- /dev/null
+++ b/gcc11-pr102642.patch
@@ -0,0 +1,47 @@
+2021-10-11 Jakub Jelinek <jakub(a)redhat.com>
+
+ PR c++/102642
+ * name-lookup.c (push_local_extern_decl_alias): Don't call
+ set_decl_tls_model on error_mark_node.
+ * parser.c (cp_parser_omp_declare_target): Likewise.
+
+ * g++.dg/tls/pr102642.C: New test.
+
+--- gcc/cp/name-lookup.c.jj 2021-10-01 10:30:07.674588541 +0200
++++ gcc/cp/name-lookup.c 2021-10-11 12:43:39.261051228 +0200
+@@ -3474,7 +3474,9 @@ push_local_extern_decl_alias (tree decl)
+ push_nested_namespace (ns);
+ alias = do_pushdecl (alias, /* hiding= */true);
+ pop_nested_namespace (ns);
+- if (VAR_P (decl) && CP_DECL_THREAD_LOCAL_P (decl))
++ if (VAR_P (decl)
++ && CP_DECL_THREAD_LOCAL_P (decl)
++ && alias != error_mark_node)
+ set_decl_tls_model (alias, DECL_TLS_MODEL (decl));
+ }
+ }
+--- gcc/cp/parser.c.jj 2021-10-09 10:14:24.043098112 +0200
++++ gcc/cp/parser.c 2021-10-11 12:47:21.220874667 +0200
+@@ -45665,7 +45666,8 @@ cp_parser_omp_declare_target (cp_parser
+ if (VAR_OR_FUNCTION_DECL_P (t)
+ && DECL_LOCAL_DECL_P (t)
+ && DECL_LANG_SPECIFIC (t)
+- && DECL_LOCAL_DECL_ALIAS (t))
++ && DECL_LOCAL_DECL_ALIAS (t)
++ && DECL_LOCAL_DECL_ALIAS (t) != error_mark_node)
+ handle_omp_declare_target_clause (c, DECL_LOCAL_DECL_ALIAS (t),
+ device_type);
+ }
+--- gcc/testsuite/g++.dg/tls/pr102642.C.jj 2021-10-11 13:00:35.889503002 +0200
++++ gcc/testsuite/g++.dg/tls/pr102642.C 2021-10-11 13:00:20.388724721 +0200
+@@ -0,0 +1,10 @@
++// PR c++/102642
++// { dg-do compile { target c++11 } }
++
++thread_local int *z; // { dg-message "previous declaration" }
++
++void
++foo ()
++{
++ extern thread_local int z; // { dg-error "conflicting declaration" }
++}
diff --git a/sources b/sources
index b2beae2..837dc16 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (gcc-11.2.1-20210823.tar.xz) =
1ef37ca5f54c437cc01402ff9ba9599ae5e4db25f93efdf627a353596f88f9b377f1bb7b2b8406f6a09bcc1da310ccc58f88767d59efcd54cf1d46a7134ebf4f
+SHA512 (gcc-11.2.1-20211012.tar.xz) =
cfd92e6d147e5f9173d040cadf440eae2b6f0e884270346b33685e4f6a143275ebcbfa39f4888e2cbd7e0dc7c51c0d254de44ec6ca57063f0b41591eb4a58410
SHA512 (isl-0.18.tar.bz2) =
85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) =
002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) =
f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
commit 892f8cf6becc318092dd1dab5f71c9f205be7081
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Mon Aug 23 12:35:29 2021 +0200
11.2.1-3
diff --git a/.gitignore b/.gitignore
index 641caa7..beab83d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,3 +49,4 @@
/gcc-11.1.1-20210623.tar.xz
/gcc-11.1.1-20210726.tar.xz
/gcc-11.2.1-20210728.tar.xz
+/gcc-11.2.1-20210823.tar.xz
diff --git a/gcc.spec b/gcc.spec
index 4103504..dcc7fb5 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,10 +1,10 @@
-%global DATE 20210728
-%global gitrev 134ab8155c937122663513b76afa8e64ad61fe99
+%global DATE 20210823
+%global gitrev b558c8e931f0c36cda40bd60f5cdeb92452e91b5
%global gcc_version 11.2.1
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 2
+%global gcc_release 3
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -250,6 +250,8 @@ Obsoletes: gcc-gnat < %{version}-%{release}
Obsoletes: gcc-java < %{version}-%{release}
AutoReq: true
Provides: bundled(libiberty)
+Provides: bundled(libbacktrace)
+Provides: bundled(libffi)
Provides: gcc(major) = %{gcc_major}
Patch0: gcc11-hack.patch
@@ -265,6 +267,9 @@ Patch10: gcc11-Wno-format-security.patch
Patch11: gcc11-rh1574936.patch
Patch12: gcc11-d-shared-libphobos.patch
Patch13: gcc11-pr99341-revert.patch
+Patch14: gcc11-libgcc-link.patch
+Patch15: gcc11-pr101786.patch
+Patch16: gcc11-stringify-__VA_OPT__.patch
Patch100: gcc11-fortran-fdec-duplicates.patch
Patch101: gcc11-fortran-flogical-as-integer.patch
@@ -788,6 +793,9 @@ to NVidia PTX capable devices if available.
%endif
%patch12 -p0 -b .d-shared-libphobos~
%patch13 -p0 -b .pr99341-revert~
+%patch14 -p0 -b .libgcc-link~
+%patch15 -p0 -b .pr101786~
+%patch16 -p0 -b .stringify-__VA_OPT__~
%if 0%{?rhel} >= 9
%patch100 -p1 -b .fortran-fdec-duplicates~
@@ -1092,9 +1100,9 @@ CC="$CC" CXX="$CXX"
CFLAGS="$OPT_FLAGS" \
$CONFIGURE_OPTS
%ifarch sparc sparcv9 sparc64
-make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" bootstrap
+make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS"
LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now bootstrap
%else
-make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" profiledbootstrap
+make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS"
LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now profiledbootstrap
%endif
CC="`%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-cc`"
@@ -2091,7 +2099,7 @@ end
%ldconfig_scriptlets -n libgccjit
-%ldconfig_scriptlets -n libgquadmath
+%ldconfig_scriptlets -n libquadmath
%ldconfig_scriptlets -n libitm
@@ -3133,6 +3141,26 @@ end
%endif
%changelog
+* Mon Aug 23 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-3
+- update from releases/gcc-11-branch
+ - PRs c++/100828, c++/101663, c++/101725, c++/101759, c/100150, c/101512,
+ d/96435, d/101127, d/101441, d/101490, d/101619, d/101640, d/101664,
+ debug/101905, fortran/99351, fortran/101084, fortran/101514,
+ fortran/101536, fortran/101564, gcov-profile/89961,
+ gcov-profile/100788, ipa/100600, ipa/101261, ipa/101726,
+ libstdc++/100139, libstdc++/101056, libstdc++/101258,
+ libstdc++/101510, libstdc++/101866, middle-end/101624,
+ preprocessor/101638, sanitizer/101749, target/94780, target/100952,
+ target/101132, target/101531, target/101723, testsuite/101969,
+ tree-optimization/101373, tree-optimization/101505,
+ tree-optimization/101868
+- add bundled(libbacktrace) and bundled(libffi) provides
+- build target shared libraries with -Wl,-z,relro,-z,now
+- improve generated code with extern thread_local constinit vars
+ with trivial dtors
+- add support for C++20 #__VA_OPT__
+- fix up %%ldconfig_scriptlets
+
* Fri Jul 30 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-2
- enable LTO profiledbootstrap on all arches, and also for RHEL9+
diff --git a/gcc11-libgcc-link.patch b/gcc11-libgcc-link.patch
new file mode 100644
index 0000000..8551934
--- /dev/null
+++ b/gcc11-libgcc-link.patch
@@ -0,0 +1,57 @@
+libgcc: Honor LDFLAGS_FOR_TARGET when linking libgcc_s
+
+When building gcc with some specific LDFLAGS_FOR_TARGET, e.g.
+LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now
+those flags propagate info linking of target shared libraries,
+e.g.
lib{ubsan,tsan,stdc++,quadmath,objc,lsan,itm,gphobos,gdruntime,gomp,go,gfortran,atomic,asan}.so.*
+but there is one important exception, libgcc_s.so.* linking ignores it.
+
+The following patch fixes that.
+
+Bootstrapped/regtested on x86_64-linux with LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now
+and verified that libgcc_s.so.* is BIND_NOW when it previously wasn't, and
+without any LDFLAGS_FOR_TARGET on x86_64-linux and i686-linux.
+There on x86_64-linux I've verified that the libgcc_s.so.1 linking command
+line for -m64 is identical except for whitespace to one without the patch,
+and for -m32 multilib $(LDFLAGS) actually do supply there an extra -m32
+that also repeats later in the @multilib_flags@, which should be harmless.
+
+2021-08-04 Jakub Jelinek <jakub(a)redhat.com>
+
+ * config/t-slibgcc (SHLIB_LINK): Add $(LDFLAGS).
+ * config/t-slibgcc-darwin (SHLIB_LINK): Likewise.
+ * config/t-slibgcc-vms (SHLIB_LINK): Likewise.
+
+--- libgcc/config/t-slibgcc
++++ libgcc/config/t-slibgcc
+@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \
+ $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)
+
+ SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
+- $(SHLIB_LDFLAGS) \
++ $(SHLIB_LDFLAGS) $(LDFLAGS) \
+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
+ $(SHLIB_OBJS) $(SHLIB_LC) && \
+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+--- libgcc/config/t-slibgcc-darwin
++++ libgcc/config/t-slibgcc-darwin
+@@ -15,7 +15,7 @@ SHLIB_LC = -lc
+ # Note that this version is used for the loader, not the linker; the linker
+ # uses the stub versions named by the versioned members of $(INSTALL_FILES).
+
+-SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \
++SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) $(LDFLAGS) -dynamiclib -nodefaultlibs \
+ -install_name @shlib_slibdir@/$(SHLIB_INSTALL_NAME) \
+ -single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME) \
+ -Wl,-exported_symbols_list,$(SHLIB_MAP) \
+--- libgcc/config/t-slibgcc-vms
++++ libgcc/config/t-slibgcc-vms
+@@ -22,7 +22,7 @@ SHLIB_LINK = \
+ objdump --syms $(SHLIB_OBJS) | \
+ $(SHLIB_SYMVEC) >> SYMVEC_$$$$.opt ; \
+ echo "case_sensitive=NO" >> SYMVEC_$$$$.opt; \
+- $(CC) $(LIBGCC2_CFLAGS) -nodefaultlibs \
++ $(CC) $(LIBGCC2_CFLAGS) $(LDFLAGS) -nodefaultlibs \
+ -shared --for-linker=/noinform -o $(SHLIB_NAME) $(SHLIB_OBJS) \
+ --for-linker=SYMVEC_$$$$.opt \
+ --for-linker=gsmatch=equal,$(shlib_version)
diff --git a/gcc11-pr101786.patch b/gcc11-pr101786.patch
new file mode 100644
index 0000000..427c10a
--- /dev/null
+++ b/gcc11-pr101786.patch
@@ -0,0 +1,66 @@
+c++: Optimize constinit thread_local vars [PR101786]
+
+The paper that introduced constinit mentioned in rationale that constinit
+can be used on externs as well and that it can be used to avoid the
+thread_local initialization wrappers, because the standard requires that
+if constinit is present on any declaration, it is also present on the
+initialization declaration, even if it is in some other TU etc.
+
+There is a small problem though, we use the tls wrappers not just if
+the thread_local variable needs dynamic initialization, but also when
+it has static initialization, but non-trivial destructor, as the
+"dynamic initialization" in that case needs to register the destructor.
+
+So, the following patch optimizes constinit thread_local vars only
+if we can prove they will not have non-trivial destructors. That includes
+the case where we have incomplete type where we don't know and need to
+conservatively assume the type will have non-trivial destructor at the
+initializing declaration side.
+
+2021-08-11 Jakub Jelinek <jakub(a)redhat.com>
+
+ PR c++/101786
+ * decl2.c (var_defined_without_dynamic_init): Return true for
+ DECL_DECLARED_CONSTINIT_P with complete type and trivial destructor.
+
+ * g++.dg/cpp2a/constinit16.C: New test.
+
+--- gcc/cp/decl2.c
++++ gcc/cp/decl2.c
+@@ -3447,6 +3447,12 @@ set_guard (tree guard)
+ static bool
+ var_defined_without_dynamic_init (tree var)
+ {
++ /* constinit vars are guaranteed to not have dynamic initializer,
++ but still registering the destructor counts as dynamic initialization. */
++ if (DECL_DECLARED_CONSTINIT_P (var)
++ && COMPLETE_TYPE_P (TREE_TYPE (var))
++ && !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TREE_TYPE (var)))
++ return true;
+ /* If it's defined in another TU, we can't tell. */
+ if (DECL_EXTERNAL (var))
+ return false;
+--- gcc/testsuite/g++.dg/cpp2a/constinit16.C
++++ gcc/testsuite/g++.dg/cpp2a/constinit16.C
+@@ -0,0 +1,21 @@
++// PR c++/101786
++// { dg-do compile { target c++20 } }
++// { dg-add-options tls }
++// { dg-require-alias "" }
++// { dg-require-effective-target tls_runtime }
++// { dg-final { scan-assembler-not "_ZTH17mythreadlocalvar1" } }
++// { dg-final { scan-assembler "_ZTH17mythreadlocalvar2" } }
++// { dg-final { scan-assembler-not "_ZTH17mythreadlocalvar3" } }
++// { dg-final { scan-assembler "_ZTH17mythreadlocalvar4" } }
++
++extern thread_local constinit int mythreadlocalvar1;
++struct S;
++extern thread_local constinit S mythreadlocalvar2;
++struct T { int t; };
++extern thread_local constinit T mythreadlocalvar3;
++struct U { int u; ~U (); };
++extern thread_local constinit U mythreadlocalvar4;
++int foo () { return mythreadlocalvar1; }
++S *bar () { return &mythreadlocalvar2; }
++T *baz () { return &mythreadlocalvar3; }
++U *qux () { return &mythreadlocalvar4; }
diff --git a/gcc11-stringify-__VA_OPT__.patch b/gcc11-stringify-__VA_OPT__.patch
new file mode 100644
index 0000000..3a2a71f
--- /dev/null
+++ b/gcc11-stringify-__VA_OPT__.patch
@@ -0,0 +1,308 @@
+c++: Add C++20 #__VA_OPT__ support
+
+The following patch implements C++20 # __VA_OPT__ (...) support.
+Testcases cover what I came up with myself and what LLVM has for #__VA_OPT__
+in its testsuite and the string literals are identical between the two
+compilers on the va-opt-5.c testcase.
+
+2021-08-17 Jakub Jelinek <jakub(a)redhat.com>
+
+libcpp/
+ * macro.c (vaopt_state): Add m_stringify member.
+ (vaopt_state::vaopt_state): Initialize it.
+ (vaopt_state::update): Overwrite it.
+ (vaopt_state::stringify): New method.
+ (stringify_arg): Replace arg argument with first, count arguments
+ and add va_opt argument. Use first instead of arg->first and
+ count instead of arg->count, for va_opt add paste_tokens handling.
+ (paste_tokens): Fix up len calculation. Don't spell rhs twice,
+ instead use %.*s to supply lhs and rhs spelling lengths. Don't call
+ _cpp_backup_tokens here.
+ (paste_all_tokens): Call it here instead.
+ (replace_args): Adjust stringify_arg caller. For vaopt_state::END
+ if stringify is true handle __VA_OPT__ stringification.
+ (create_iso_definition): Handle # __VA_OPT__ similarly to # macro_arg.
+gcc/testsuite/
+ * c-c++-common/cpp/va-opt-5.c: New test.
+ * c-c++-common/cpp/va-opt-6.c: New test.
+
+--- libcpp/macro.c
++++ libcpp/macro.c
+@@ -118,6 +118,7 @@ class vaopt_state {
+ m_arg (arg),
+ m_variadic (is_variadic),
+ m_last_was_paste (false),
++ m_stringify (false),
+ m_state (0),
+ m_paste_location (0),
+ m_location (0),
+@@ -145,6 +146,7 @@ class vaopt_state {
+ }
+ ++m_state;
+ m_location = token->src_loc;
++ m_stringify = (token->flags & STRINGIFY_ARG) != 0;
+ return BEGIN;
+ }
+ else if (m_state == 1)
+@@ -234,6 +236,12 @@ class vaopt_state {
+ return m_state == 0;
+ }
+
++ /* Return true for # __VA_OPT__. */
++ bool stringify () const
++ {
++ return m_stringify;
++ }
++
+ private:
+
+ /* The cpp_reader. */
+@@ -247,6 +255,8 @@ class vaopt_state {
+ /* If true, the previous token was ##. This is used to detect when
+ a paste occurs at the end of the sequence. */
+ bool m_last_was_paste;
++ /* True for #__VA_OPT__. */
++ bool m_stringify;
+
+ /* The state variable:
+ 0 means not parsing
+@@ -284,7 +294,8 @@ static _cpp_buff *collect_args (cpp_reader *, const cpp_hashnode *,
+ static cpp_context *next_context (cpp_reader *);
+ static const cpp_token *padding_token (cpp_reader *, const cpp_token *);
+ static const cpp_token *new_string_token (cpp_reader *, uchar *, unsigned int);
+-static const cpp_token *stringify_arg (cpp_reader *, macro_arg *);
++static const cpp_token *stringify_arg (cpp_reader *, const cpp_token **,
++ unsigned int, bool);
+ static void paste_all_tokens (cpp_reader *, const cpp_token *);
+ static bool paste_tokens (cpp_reader *, location_t,
+ const cpp_token **, const cpp_token *);
+@@ -818,10 +829,11 @@ cpp_quote_string (uchar *dest, const uchar *src, unsigned int len)
+ return dest;
+ }
+
+-/* Convert a token sequence ARG to a single string token according to
+- the rules of the ISO C #-operator. */
++/* Convert a token sequence FIRST to FIRST+COUNT-1 to a single string token
++ according to the rules of the ISO C #-operator. */
+ static const cpp_token *
+-stringify_arg (cpp_reader *pfile, macro_arg *arg)
++stringify_arg (cpp_reader *pfile, const cpp_token **first, unsigned int count,
++ bool va_opt)
+ {
+ unsigned char *dest;
+ unsigned int i, escape_it, backslash_count = 0;
+@@ -834,9 +846,27 @@ stringify_arg (cpp_reader *pfile, macro_arg *arg)
+ *dest++ = '"';
+
+ /* Loop, reading in the argument's tokens. */
+- for (i = 0; i < arg->count; i++)
++ for (i = 0; i < count; i++)
+ {
+- const cpp_token *token = arg->first[i];
++ const cpp_token *token = first[i];
++
++ if (va_opt && (token->flags & PASTE_LEFT))
++ {
++ location_t virt_loc = pfile->invocation_location;
++ const cpp_token *rhs;
++ do
++ {
++ if (i == count)
++ abort ();
++ rhs = first[++i];
++ if (!paste_tokens (pfile, virt_loc, &token, rhs))
++ {
++ --i;
++ break;
++ }
++ }
++ while (rhs->flags & PASTE_LEFT);
++ }
+
+ if (token->type == CPP_PADDING)
+ {
+@@ -923,7 +953,7 @@ paste_tokens (cpp_reader *pfile, location_t location,
+ cpp_token *lhs;
+ unsigned int len;
+
+- len = cpp_token_len (*plhs) + cpp_token_len (rhs) + 1;
++ len = cpp_token_len (*plhs) + cpp_token_len (rhs) + 2;
+ buf = (unsigned char *) alloca (len);
+ end = lhsend = cpp_spell_token (pfile, *plhs, buf, true);
+
+@@ -949,8 +979,10 @@ paste_tokens (cpp_reader *pfile, location_t location,
+ location_t saved_loc = lhs->src_loc;
+
+ _cpp_pop_buffer (pfile);
+- _cpp_backup_tokens (pfile, 1);
+- *lhsend = '\0';
++
++ unsigned char *rhsstart = lhsend;
++ if ((*plhs)->type == CPP_DIV && rhs->type != CPP_EQ)
++ rhsstart++;
+
+ /* We have to remove the PASTE_LEFT flag from the old lhs, but
+ we want to keep the new location. */
+@@ -962,8 +994,10 @@ paste_tokens (cpp_reader *pfile, location_t location,
+ /* Mandatory error for all apart from assembler. */
+ if (CPP_OPTION (pfile, lang) != CLK_ASM)
+ cpp_error_with_line (pfile, CPP_DL_ERROR, location, 0,
+- "pasting \"%s\" and \"%s\" does not give a valid
preprocessing token",
+- buf, cpp_token_as_text (pfile, rhs));
++ "pasting \"%.*s\" and \"%.*s\" does not give "
++ "a valid preprocessing token",
++ (int) (lhsend - buf), buf,
++ (int) (end - rhsstart), rhsstart);
+ return false;
+ }
+
+@@ -1039,7 +1073,10 @@ paste_all_tokens (cpp_reader *pfile, const cpp_token *lhs)
+ abort ();
+ }
+ if (!paste_tokens (pfile, virt_loc, &lhs, rhs))
+- break;
++ {
++ _cpp_backup_tokens (pfile, 1);
++ break;
++ }
+ }
+ while (rhs->flags & PASTE_LEFT);
+
+@@ -1906,7 +1943,8 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro
*macro,
+ if (src->flags & STRINGIFY_ARG)
+ {
+ if (!arg->stringified)
+- arg->stringified = stringify_arg (pfile, arg);
++ arg->stringified = stringify_arg (pfile, arg->first, arg->count,
++ false);
+ }
+ else if ((src->flags & PASTE_LEFT)
+ || (src != macro->exp.tokens && (src[-1].flags & PASTE_LEFT)))
+@@ -2029,7 +2067,24 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro
*macro,
+ paste_flag = tokens_buff_last_token_ptr (buff);
+ }
+
+- if (src->flags & PASTE_LEFT)
++ if (vaopt_tracker.stringify ())
++ {
++ unsigned int count
++ = start ? paste_flag - start : tokens_buff_count (buff);
++ const cpp_token *t
++ = stringify_arg (pfile,
++ start ? start + 1
++ : (const cpp_token **) (buff->base),
++ count, true);
++ while (count--)
++ tokens_buff_remove_last_token (buff);
++ if (src->flags & PASTE_LEFT)
++ copy_paste_flag (pfile, &t, src);
++ tokens_buff_add_token (buff, virt_locs,
++ t, t->src_loc, t->src_loc,
++ NULL, 0);
++ }
++ else if (src->flags & PASTE_LEFT)
+ {
+ /* With a non-empty __VA_OPT__ on the LHS of ##, the last
+ token should be flagged PASTE_LEFT. */
+@@ -3585,7 +3640,10 @@ create_iso_definition (cpp_reader *pfile)
+ function-like macros when lexing the subsequent token. */
+ if (macro->count > 1 && token[-1].type == CPP_HASH &&
macro->fun_like)
+ {
+- if (token->type == CPP_MACRO_ARG)
++ if (token->type == CPP_MACRO_ARG
++ || (macro->variadic
++ && token->type == CPP_NAME
++ && token->val.node.node == pfile->spec_nodes.n__VA_OPT__))
+ {
+ if (token->flags & PREV_WHITE)
+ token->flags |= SP_PREV_WHITE;
+--- gcc/testsuite/c-c++-common/cpp/va-opt-5.c
++++ gcc/testsuite/c-c++-common/cpp/va-opt-5.c
+@@ -0,0 +1,67 @@
++/* { dg-do run } */
++/* { dg-options "-std=gnu99" { target c } } */
++/* { dg-options "-std=c++20" { target c++ } } */
++
++#define lparen (
++#define a0 fooa0
++#define a1 fooa1 a0
++#define a2 fooa2 a1
++#define a3 fooa3 a2
++#define a() b lparen )
++#define b() c lparen )
++#define c() d lparen )
++#define g h
++#define i(j) j
++#define f(...) #__VA_OPT__(g i(0))
++#define k(x,...) # __VA_OPT__(x) #x #__VA_OPT__(__VA_ARGS__)
++#define l(x,...) #__VA_OPT__(a1 x)
++#define m(x,...) "a()" #__VA_OPT__(a3 __VA_ARGS__ x ## __VA_ARGS__ ## x ## c
a3) "a()"
++#define n(x,...) = #__VA_OPT__(a3 __VA_ARGS__ x ## __VA_ARGS__ ## x ## c a3) #x
#__VA_OPT__(a0 __VA_ARGS__ x ## __VA_ARGS__ ## x ## c a0) ;
++#define o(x, ...) #__VA_OPT__(x##x x##x)
++#define p(x, ...) #__VA_OPT__(_Pragma ("foobar"))
++#define q(...) #__VA_OPT__(/* foo */x/* bar */)
++const char *v1 = f();
++const char *v2 = f(123);
++const char *v3 = k(1);
++const char *v4 = k(1, 2, 3 );
++const char *v5 = l(a());
++const char *v6 = l(a1 a(), 1);
++const char *v7 = m();
++const char *v8 = m(,);
++const char *v9 = m(,a3);
++const char *v10 = m(a3,a(),a0);
++const char *v11 n()
++const char *v12 n(,)
++const char *v13 n(,a0)
++const char *v14 n(a0, a(),a0)
++const char *v15 = o(, 0);
++const char *v16 = p(0);
++const char *v17 = p(0, 1);
++const char *v18 = q();
++const char *v19 = q(1);
++
++int
++main ()
++{
++ if (__builtin_strcmp (v1, "")
++ || __builtin_strcmp (v2, "g i(0)")
++ || __builtin_strcmp (v3, "1")
++ || __builtin_strcmp (v4, "112, 3")
++ || __builtin_strcmp (v5, "")
++ || __builtin_strcmp (v6, "a1 fooa1 fooa0 b ( )")
++ || __builtin_strcmp (v7, "a()a()")
++ || __builtin_strcmp (v8, "a()a()")
++ || __builtin_strcmp (v9, "a()a3 fooa3 fooa2 fooa1 fooa0 a3c a3a()")
++ || __builtin_strcmp (v10, "a()a3 b ( ),fooa0 a3a(),a0a3c a3a()")
++ || __builtin_strcmp (v11, "")
++ || __builtin_strcmp (v12, "")
++ || __builtin_strcmp (v13, "a3 fooa0 a0c a3a0 fooa0 a0c a0")
++ || __builtin_strcmp (v14, "a3 b ( ),fooa0 a0a(),a0a0c a3a0a0 b ( ),fooa0
a0a(),a0a0c a0")
++ || __builtin_strcmp (v15, "")
++ || __builtin_strcmp (v16, "")
++ || __builtin_strcmp (v17, "_Pragma (\"foobar\")")
++ || __builtin_strcmp (v18, "")
++ || __builtin_strcmp (v19, "x"))
++ __builtin_abort ();
++ return 0;
++}
+--- gcc/testsuite/c-c++-common/cpp/va-opt-6.c
++++ gcc/testsuite/c-c++-common/cpp/va-opt-6.c
+@@ -0,0 +1,17 @@
++/* { dg-do preprocess } */
++/* { dg-options "-std=gnu99" { target c } } */
++/* { dg-options "-std=c++20" { target c++ } } */
++
++#define a ""
++#define b(...) a ## #__VA_OPT__(1) /* { dg-error "pasting \"a\" and
\"\"\"\" does not give a valid preprocessing token" } */
++#define c(...) a ## #__VA_OPT__(1) /* { dg-error "pasting \"a\" and
\"\"1\"\" does not give a valid preprocessing token" } */
++#define d(...) #__VA_OPT__(1) ## !
++#define e(...) #__VA_OPT__(1) ## !
++#define f(...) #__VA_OPT__(. ## !)
++#define g(...) #__VA_OPT__(. ## !)
++b()
++c(1)
++d( ) /* { dg-error "pasting \"\"\"\" and \"!\"
does not give a valid preprocessing token" } */
++e( 1 ) /* { dg-error "pasting \"\"1\"\" and \"!\"
does not give a valid preprocessing token" } */
++f()
++g(0) /* { dg-error "pasting \".\" and \"!\" does not give a
valid preprocessing token" } */
diff --git a/sources b/sources
index f0b890a..b2beae2 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (gcc-11.2.1-20210728.tar.xz) =
2234298652f882151aead486bb22481ba8181df69b9c7c5d73b8aa505ace58462fcd0b482680f466e2d21dc47e869651c7dbf224b65791ca47204dab01e89e7c
+SHA512 (gcc-11.2.1-20210823.tar.xz) =
1ef37ca5f54c437cc01402ff9ba9599ae5e4db25f93efdf627a353596f88f9b377f1bb7b2b8406f6a09bcc1da310ccc58f88767d59efcd54cf1d46a7134ebf4f
SHA512 (isl-0.18.tar.bz2) =
85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) =
002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) =
f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7
commit ba0a2baa8627e806ae5be20b49a1a359d1011ad7
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Fri Jul 30 15:40:09 2021 +0200
11.2.1-2
diff --git a/gcc.spec b/gcc.spec
index 38bd3b2..4103504 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1078,7 +1078,7 @@ CONFIGURE_OPTS="\
%ifnarch sparc sparcv9 ppc
--build=%{gcc_target_platform} \
%endif
-%if 0%{?fedora} >= 35 || 9%{?rhel} >= 9
+%if 0%{?fedora} >= 35 || 0%{?rhel} >= 9
--with-build-config=bootstrap-lto --enable-link-serialization=1 \
%endif
"
commit 878cf31641035e62111d01b1ff9e2274c89e48b7
Author: Jakub Jelinek <jakub(a)redhat.com>
Date: Fri Jul 30 14:56:24 2021 +0200
11.2.1-2
diff --git a/gcc.spec b/gcc.spec
index e465466..38bd3b2 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -4,7 +4,7 @@
%global gcc_major 11
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 1
+%global gcc_release 2
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0
@@ -1078,10 +1078,8 @@ CONFIGURE_OPTS="\
%ifnarch sparc sparcv9 ppc
--build=%{gcc_target_platform} \
%endif
-%if 0%{?fedora} >= 35
-%ifarch x86_64 %{ix86} ppc64le s390x
+%if 0%{?fedora} >= 35 || 9%{?rhel} >= 9
--with-build-config=bootstrap-lto --enable-link-serialization=1 \
-%endif
%endif
"
@@ -3135,6 +3133,9 @@ end
%endif
%changelog
+* Fri Jul 30 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-2
+- enable LTO profiledbootstrap on all arches, and also for RHEL9+
+
* Wed Jul 28 2021 Jakub Jelinek <jakub(a)redhat.com> 11.2.1-1
- update from releases/gcc-11-branch
- GCC 11.2 release