3 # Copyright (C) 2020 Free Software Foundation, Inc.
5 # This file is part of GCC.
7 # GCC is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3, or (at your option)
12 # GCC is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GCC; see the file COPYING. If not, write to
19 # the Free Software Foundation, 51 Franklin Street, Fifth Floor,
20 # Boston, MA 02110-1301, USA.
22 # This script parses a .diff file generated with 'diff -up' or 'diff -cp'
23 # and adds a skeleton ChangeLog file to the file. It does not try to be
24 # too smart when parsing function names, but it produces a reasonable
27 # Author: Martin Liska <mliska@suse.cz>
31 from mklog
import generate_changelog
34 diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h
35 index 567c23380fe..e6209ede9d6 100644
36 --- a/gcc/config/riscv/riscv.h
37 +++ b/gcc/config/riscv/riscv.h
38 @@ -920,6 +920,7 @@ extern unsigned riscv_stack_boundary;
45 #define IMM_REACH (1LL << IMM_BITS)
46 @@ -929,6 +930,10 @@ extern unsigned riscv_stack_boundary;
47 #define SWSP_REACH (4LL << C_SxSP_BITS)
48 #define SDSP_REACH (8LL << C_SxSP_BITS)
50 +/* This is the maximum value that can be represented in a compressed load/store
51 + offset (an unsigned 5-bit value scaled by 4). */
52 +#define CSW_MAX_OFFSET ((4LL << C_S_BITS) - 1) & ~3
54 /* Called from RISCV_REORG, this is defined in riscv-sr.c. */
56 extern void riscv_remove_unneeded_save_restore_calls (void);
63 * config/riscv/riscv.h (C_S_BITS):
69 diff --git a/gcc/targhooks.h b/gcc/targhooks.h
70 index 9704d23f1db..b572a36e8cf 100644
73 @@ -120,7 +120,7 @@ extern bool default_empty_mask_is_expensive (unsigned);
74 extern void *default_init_cost (class loop *);
75 extern unsigned default_add_stmt_cost (class vec_info *, void *, int,
76 enum vect_cost_for_stmt,
77 - class _stmt_vec_info *, int,
78 + class _stmt_vec_info *, tree, int,
79 enum vect_cost_model_location);
80 extern void default_finish_cost (void *, unsigned *, unsigned *, unsigned *);
81 extern void default_destroy_cost_data (void *);
82 @@ -186,6 +186,7 @@ extern tree default_emutls_var_init (tree, tree, tree);
83 extern unsigned int default_hard_regno_nregs (unsigned int, machine_mode);
84 extern bool default_hard_regno_scratch_ok (unsigned int);
85 extern bool default_mode_dependent_address_p (const_rtx, addr_space_t);
86 +extern bool default_new_address_profitable_p (rtx, rtx_insn *, rtx);
87 extern bool default_target_option_valid_attribute_p (tree, tree, tree, int);
88 extern bool default_target_option_pragma_parse (tree, tree);
89 extern bool default_target_can_inline_p (tree, tree);
96 * targhooks.h (default_add_stmt_cost):
97 (default_new_address_profitable_p):
102 diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
103 index 2b1e33f94ae..7f47402f9b9 100644
104 --- a/libcpp/include/cpplib.h
105 +++ b/libcpp/include/cpplib.h
106 @@ -173,7 +173,7 @@ enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_GNUC11, CLK_GNUC17, CLK_GNUC2X,
108 CLK_GNUCXX, CLK_CXX98, CLK_GNUCXX11, CLK_CXX11,
109 CLK_GNUCXX14, CLK_CXX14, CLK_GNUCXX17, CLK_CXX17,
110 - CLK_GNUCXX2A, CLK_CXX2A, CLK_ASM};
111 + CLK_GNUCXX20, CLK_CXX20, CLK_ASM};
113 /* Payload of a NUMBER, STRING, CHAR or COMMENT token. */
114 struct GTY(()) cpp_string {
115 @@ -484,7 +484,7 @@ struct cpp_options
116 /* Nonzero for C2X decimal floating-point constants. */
117 unsigned char dfp_constants;
119 - /* Nonzero for C++2a __VA_OPT__ feature. */
120 + /* Nonzero for C++20 __VA_OPT__ feature. */
121 unsigned char va_opt;
123 /* Nonzero for the '::' token. */
130 * include/cpplib.h (enum c_lang):
131 (struct cpp_options):
143 diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
144 index aab79492357..f0df1002488 100644
152 /* Interprocedural Identical Code Folding pass
153 Copyright (C) 2014-2020 Free Software Foundation, Inc.
155 diff --git a/gcc/testsuite/gcc.dg/pr32374.c b/gcc/testsuite/gcc.dg/pr32374.c
156 deleted file mode 100644
157 index de15d559f5b..00000000000
158 --- a/gcc/testsuite/gcc.dg/pr32374.c
161 -/* { dg-do compile } */
162 -/* { dg-options "-O2" } */
166 -void f (int *, const char *, ...);
168 -void g (const char *conf_name)
176 - const Section sections[2] = { {"", 0}, {"", 1} };
178 - f (stderr, "", "", conf_name, 0, sections[0]);
179 - f (stderr, "", "", conf_name, 0, sections[0]);
181 diff --git a/gcc/testsuite/gcc.dg/pr40209.c b/gcc/testsuite/gcc.dg/pr40209.c
182 index 4e77df5c2e6..c23d69d1f1b 100644
183 --- a/gcc/testsuite/gcc.dg/pr40209.c
184 +++ b/gcc/testsuite/gcc.dg/pr40209.c
186 /* { dg-do compile } */
187 /* { dg-options "-O2 -fprofile-use -fopt-info -Wno-missing-profile" } */
191 void process(const char *s);
194 diff --git a/gcc/testsuite/gcc.dg/pr50209.c b/gcc/testsuite/gcc.dg/pr50209.c
196 index 00000000000..b28b04f6431
198 +++ b/gcc/testsuite/gcc.dg/pr50209.c
203 diff --git a/gcc/testsuite/gcc.dg/pr63567-1.c b/gcc/testsuite/gcc.dg/pr63567-1.c
204 index 97da171563e..00c5ecc11fa 100644
205 --- a/gcc/testsuite/gcc.dg/pr63567-1.c
206 +++ b/gcc/testsuite/gcc.dg/pr63567-1.c
210 /* { dg-do compile } */
211 /* { dg-options "" } */
212 diff --git a/gcc/varasm.c b/gcc/varasm.c
213 index f062e48071f..fd3c7ca8cf3 100644
219 /* Output variables, constants and external declarations, for GNU compiler.
220 Copyright (C) 1987-2020 Free Software Foundation, Inc.
222 diff --git a/libssp/gets-chk.c b/libssp/gets-chk.c
223 index 4ad78c1f77b..6687b368038 100644
224 --- a/libssp/gets-chk.c
225 +++ b/libssp/gets-chk.c
226 @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
227 <http://www.gnu.org/licenses/>. */
247 gcc/testsuite/ChangeLog:
250 * gcc.dg/pr63567-1.c:
251 * gcc.dg/pr32374.c: Removed.
252 * gcc.dg/pr50209.c: New test.
257 diff --git a/gcc/testsuite/gcc.target/i386/pr95046-6.c b/gcc/testsuite/gcc.target/i386/pr95046-6.c
259 index 00000000000..dcc8999c446
261 +++ b/gcc/testsuite/gcc.target/i386/pr95046-6.c
263 +/* PR target/95046 */
264 +/* { dg-do compile { target { ! ia32 } } } */
265 +/* { dg-options "-O3 -mavx512vl" } */
275 + for (int i = 0; i < 2; i++)
279 +/* { dg-final { scan-assembler "\tvcvtdq2pd" } } */
284 + for (int i = 0; i < 2; i++)
288 +/* { dg-final { scan-assembler "\tvcvtudq2pd" } } */
293 + for (int i = 0; i < 2; i++)
297 +/* { dg-final { scan-assembler "\tvcvttpd2dqx" } } */
302 + for (int i = 0; i < 2; i++)
306 +/* { dg-final { scan-assembler "\tvcvttpd2udqx" } } */
313 PR target/95046 - Vectorize V2SFmode operations
315 gcc/testsuite/ChangeLog:
318 * gcc.target/i386/pr95046-6.c: New test.
323 diff --git a/gcc/cgraph.h b/gcc/cgraph.h
324 index 5ddeb65269b..cfae6e91da9 100644
327 @@ -937,7 +937,8 @@ struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node
328 split_part (false), indirect_call_target (false), local (false),
329 versionable (false), can_change_signature (false),
330 redefined_extern_inline (false), tm_may_enter_irr (false),
331 - ipcp_clone (false), m_uid (uid), m_summary_id (-1)
332 + ipcp_clone (false), declare_variant_alt (false),
333 + calls_declare_variant_alt (false), m_uid (uid), m_summary_id (-1)
336 /* Remove the node from cgraph and all inline clones inlined into it.
343 * cgraph.h (struct cgraph_node):
348 diff --git a/gcc/testsuite/g++.dg/DRs/dr2237.C b/gcc/testsuite/g++.dg/DRs/dr2237.C
350 index 00000000000..f3d6d11e61e
352 +++ b/gcc/testsuite/g++.dg/DRs/dr2237.C
354 +// DR 2237 - Can a template-id name a constructor?
358 + X<T>(); // { dg-error "expected" "" { target c++20 } }
359 + X(int); // OK, injected-class-name used
360 + ~X<T>(); // { dg-error "template-id not allowed for destructor" "" { target c++20 } }
363 +// ill-formed since DR1435
364 +template<typename T> X<T>::X<T>() {} // { dg-error "names the constructor|as no template constructors" }
365 +template<typename T> X<T>::~X<T>() {} // { dg-error "template-id not allowed for destructor" "" { target c++20 } }
368 + // ill-formed since DR1435
369 + template<typename T> friend X<T>::X<T>(); // { dg-error "names the constructor|as no template constructors" }
370 + template<typename T> friend X<T>::~X<T>(); // { dg-error "template-id not allowed for destructor" "" { target c++20 } }
375 gcc/testsuite/ChangeLog:
378 * g++.dg/DRs/dr2237.C: New test.
382 class TestMklog(unittest
.TestCase
):
383 def test_macro_definition(self
):
384 changelog
= generate_changelog(PATCH1
)
385 assert changelog
== EXPECTED1
387 def test_changed_argument(self
):
388 changelog
= generate_changelog(PATCH2
)
389 assert changelog
== EXPECTED2
391 def test_enum_and_struct(self
):
392 changelog
= generate_changelog(PATCH3
)
393 assert changelog
== EXPECTED3
395 def test_no_function(self
):
396 changelog
= generate_changelog(PATCH3
, True)
397 assert changelog
== EXPECTED3B
399 def test_sorting(self
):
400 changelog
= generate_changelog(PATCH4
)
401 assert changelog
== EXPECTED4
403 def test_pr_bugzilla_download(self
):
404 changelog
= generate_changelog(PATCH5
, fill_pr_titles
=True)
405 assert changelog
== EXPECTED5
407 def test_gty_in_struct(self
):
408 changelog
= generate_changelog(PATCH6
, fill_pr_titles
=True)
409 assert changelog
== EXPECTED6
411 def test_dr_detection_in_test_case(self
):
412 changelog
= generate_changelog(PATCH7
)
413 assert changelog
== EXPECTED7