annotate contrib/test_mklog.py @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 #!/usr/bin/env python3
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3 # Copyright (C) 2020 Free Software Foundation, Inc.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4 #
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 # This file is part of GCC.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6 #
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 # GCC is free software; you can redistribute it and/or modify
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 # it under the terms of the GNU General Public License as published by
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9 # the Free Software Foundation; either version 3, or (at your option)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 # any later version.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 #
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12 # GCC is distributed in the hope that it will be useful,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15 # GNU General Public License for more details.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 #
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17 # You should have received a copy of the GNU General Public License
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18 # along with GCC; see the file COPYING. If not, write to
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19 # the Free Software Foundation, 51 Franklin Street, Fifth Floor,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
20 # Boston, MA 02110-1301, USA.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
21
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
22 # This script parses a .diff file generated with 'diff -up' or 'diff -cp'
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
23 # and adds a skeleton ChangeLog file to the file. It does not try to be
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
24 # too smart when parsing function names, but it produces a reasonable
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
25 # approximation.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
26 #
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
27 # Author: Martin Liska <mliska@suse.cz>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
28
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
29 import unittest
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
30
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
31 from mklog import generate_changelog
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
32
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
33 PATCH1 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
34 diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
35 index 567c23380fe..e6209ede9d6 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
36 --- a/gcc/config/riscv/riscv.h
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
37 +++ b/gcc/config/riscv/riscv.h
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
38 @@ -920,6 +920,7 @@ extern unsigned riscv_stack_boundary;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
39 #define SHIFT_RS1 15
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
40 #define SHIFT_IMM 20
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
41 #define IMM_BITS 12
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
42 +#define C_S_BITS 5
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
43 #define C_SxSP_BITS 6
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
44
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
45 #define IMM_REACH (1LL << IMM_BITS)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
46 @@ -929,6 +930,10 @@ extern unsigned riscv_stack_boundary;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
47 #define SWSP_REACH (4LL << C_SxSP_BITS)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
48 #define SDSP_REACH (8LL << C_SxSP_BITS)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
49
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
50 +/* This is the maximum value that can be represented in a compressed load/store
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
51 + offset (an unsigned 5-bit value scaled by 4). */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
52 +#define CSW_MAX_OFFSET ((4LL << C_S_BITS) - 1) & ~3
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
53 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
54 /* Called from RISCV_REORG, this is defined in riscv-sr.c. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
55
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
56 extern void riscv_remove_unneeded_save_restore_calls (void);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
57
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
58 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
59
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
60 EXPECTED1 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
61 gcc/ChangeLog:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
62
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
63 * config/riscv/riscv.h (C_S_BITS):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
64 (CSW_MAX_OFFSET):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
65
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
66 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
67
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
68 PATCH2 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
69 diff --git a/gcc/targhooks.h b/gcc/targhooks.h
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
70 index 9704d23f1db..b572a36e8cf 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
71 --- a/gcc/targhooks.h
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
72 +++ b/gcc/targhooks.h
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
73 @@ -120,7 +120,7 @@ extern bool default_empty_mask_is_expensive (unsigned);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
74 extern void *default_init_cost (class loop *);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
75 extern unsigned default_add_stmt_cost (class vec_info *, void *, int,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
76 enum vect_cost_for_stmt,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
77 - class _stmt_vec_info *, int,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
78 + class _stmt_vec_info *, tree, int,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
79 enum vect_cost_model_location);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
80 extern void default_finish_cost (void *, unsigned *, unsigned *, unsigned *);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
81 extern void default_destroy_cost_data (void *);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
82 @@ -186,6 +186,7 @@ extern tree default_emutls_var_init (tree, tree, tree);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
83 extern unsigned int default_hard_regno_nregs (unsigned int, machine_mode);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
84 extern bool default_hard_regno_scratch_ok (unsigned int);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
85 extern bool default_mode_dependent_address_p (const_rtx, addr_space_t);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
86 +extern bool default_new_address_profitable_p (rtx, rtx_insn *, rtx);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
87 extern bool default_target_option_valid_attribute_p (tree, tree, tree, int);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
88 extern bool default_target_option_pragma_parse (tree, tree);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
89 extern bool default_target_can_inline_p (tree, tree);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
90
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
91 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
92
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
93 EXPECTED2 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
94 gcc/ChangeLog:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
95
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
96 * targhooks.h (default_add_stmt_cost):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
97 (default_new_address_profitable_p):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
98
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
99 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
100
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
101 PATCH3 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
102 diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
103 index 2b1e33f94ae..7f47402f9b9 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
104 --- a/libcpp/include/cpplib.h
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
105 +++ b/libcpp/include/cpplib.h
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
106 @@ -173,7 +173,7 @@ enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_GNUC11, CLK_GNUC17, CLK_GNUC2X,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
107 CLK_STDC2X,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
108 CLK_GNUCXX, CLK_CXX98, CLK_GNUCXX11, CLK_CXX11,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
109 CLK_GNUCXX14, CLK_CXX14, CLK_GNUCXX17, CLK_CXX17,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
110 - CLK_GNUCXX2A, CLK_CXX2A, CLK_ASM};
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
111 + CLK_GNUCXX20, CLK_CXX20, CLK_ASM};
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
112
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
113 /* Payload of a NUMBER, STRING, CHAR or COMMENT token. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
114 struct GTY(()) cpp_string {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
115 @@ -484,7 +484,7 @@ struct cpp_options
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
116 /* Nonzero for C2X decimal floating-point constants. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
117 unsigned char dfp_constants;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
118
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
119 - /* Nonzero for C++2a __VA_OPT__ feature. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
120 + /* Nonzero for C++20 __VA_OPT__ feature. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
121 unsigned char va_opt;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
122
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
123 /* Nonzero for the '::' token. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
124
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
125 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
126
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
127 EXPECTED3 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
128 libcpp/ChangeLog:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
129
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
130 * include/cpplib.h (enum c_lang):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
131 (struct cpp_options):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
132
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
133 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
134
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
135 EXPECTED3B = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
136 libcpp/ChangeLog:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
137
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
138 * include/cpplib.h:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
139
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
140 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
141
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
142 PATCH4 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
143 diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
144 index aab79492357..f0df1002488 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
145 --- a/gcc/ipa-icf.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
146 +++ b/gcc/ipa-icf.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
147 @@ -1,5 +1,7 @@
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
148
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
149
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
150 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
151 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
152 /* Interprocedural Identical Code Folding pass
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
153 Copyright (C) 2014-2020 Free Software Foundation, Inc.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
154
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
155 diff --git a/gcc/testsuite/gcc.dg/pr32374.c b/gcc/testsuite/gcc.dg/pr32374.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
156 deleted file mode 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
157 index de15d559f5b..00000000000
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
158 --- a/gcc/testsuite/gcc.dg/pr32374.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
159 +++ /dev/null
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
160 @@ -1,20 +0,0 @@
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
161 -/* { dg-do compile } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
162 -/* { dg-options "-O2" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
163 -
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
164 -extern int *stderr;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
165 -
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
166 -void f (int *, const char *, ...);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
167 -
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
168 -void g (const char *conf_name)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
169 -{
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
170 - typedef struct
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
171 - {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
172 - const char *label;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
173 - const int value;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
174 - } Section;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
175 -
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
176 - const Section sections[2] = { {"", 0}, {"", 1} };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
177 -
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
178 - f (stderr, "", "", conf_name, 0, sections[0]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
179 - f (stderr, "", "", conf_name, 0, sections[0]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
180 -}
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
181 diff --git a/gcc/testsuite/gcc.dg/pr40209.c b/gcc/testsuite/gcc.dg/pr40209.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
182 index 4e77df5c2e6..c23d69d1f1b 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
183 --- a/gcc/testsuite/gcc.dg/pr40209.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
184 +++ b/gcc/testsuite/gcc.dg/pr40209.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
185 @@ -1,6 +1,8 @@
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
186 /* { dg-do compile } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
187 /* { dg-options "-O2 -fprofile-use -fopt-info -Wno-missing-profile" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
188
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
189 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
190 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
191 void process(const char *s);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
192
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
193 struct BaseHolder {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
194 diff --git a/gcc/testsuite/gcc.dg/pr50209.c b/gcc/testsuite/gcc.dg/pr50209.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
195 new file mode 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
196 index 00000000000..b28b04f6431
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
197 --- /dev/null
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
198 +++ b/gcc/testsuite/gcc.dg/pr50209.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
199 @@ -0,0 +1,3 @@
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
200 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
201 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
202 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
203 diff --git a/gcc/testsuite/gcc.dg/pr63567-1.c b/gcc/testsuite/gcc.dg/pr63567-1.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
204 index 97da171563e..00c5ecc11fa 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
205 --- a/gcc/testsuite/gcc.dg/pr63567-1.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
206 +++ b/gcc/testsuite/gcc.dg/pr63567-1.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
207 @@ -1,3 +1,4 @@
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
208 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
209 /* PR c/63567 */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
210 /* { dg-do compile } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
211 /* { dg-options "" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
212 diff --git a/gcc/varasm.c b/gcc/varasm.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
213 index f062e48071f..fd3c7ca8cf3 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
214 --- a/gcc/varasm.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
215 +++ b/gcc/varasm.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
216 @@ -1,3 +1,5 @@
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
217 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
218 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
219 /* Output variables, constants and external declarations, for GNU compiler.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
220 Copyright (C) 1987-2020 Free Software Foundation, Inc.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
221
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
222 diff --git a/libssp/gets-chk.c b/libssp/gets-chk.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
223 index 4ad78c1f77b..6687b368038 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
224 --- a/libssp/gets-chk.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
225 +++ b/libssp/gets-chk.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
226 @@ -32,6 +32,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
227 <http://www.gnu.org/licenses/>. */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
228
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
229
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
230 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
231 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
232 #include "config.h"
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
233 #include <ssp/ssp.h>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
234 #include <stdarg.h>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
235 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
236
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
237 EXPECTED4 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
238 gcc/ChangeLog:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
239
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
240 * ipa-icf.c:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
241 * varasm.c:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
242
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
243 libssp/ChangeLog:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
244
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
245 * gets-chk.c:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
246
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
247 gcc/testsuite/ChangeLog:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
248
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
249 * gcc.dg/pr40209.c:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
250 * gcc.dg/pr63567-1.c:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
251 * gcc.dg/pr32374.c: Removed.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
252 * gcc.dg/pr50209.c: New test.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
253
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
254 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
255
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
256 PATCH5 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
257 diff --git a/gcc/testsuite/gcc.target/i386/pr95046-6.c b/gcc/testsuite/gcc.target/i386/pr95046-6.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
258 new file mode 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
259 index 00000000000..dcc8999c446
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
260 --- /dev/null
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
261 +++ b/gcc/testsuite/gcc.target/i386/pr95046-6.c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
262 @@ -0,0 +1,44 @@
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
263 +/* PR target/95046 */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
264 +/* { dg-do compile { target { ! ia32 } } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
265 +/* { dg-options "-O3 -mavx512vl" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
266 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
267 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
268 +double r[2];
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
269 +int s[2];
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
270 +unsigned int u[2];
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
271 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
272 +void
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
273 +test_float (void)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
274 +{
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
275 + for (int i = 0; i < 2; i++)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
276 + r[i] = s[i];
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
277 +}
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
278 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
279 +/* { dg-final { scan-assembler "\tvcvtdq2pd" } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
280 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
281 +void
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
282 +test_ufloat (void)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
283 +{
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
284 + for (int i = 0; i < 2; i++)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
285 + r[i] = u[i];
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
286 +}
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
287 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
288 +/* { dg-final { scan-assembler "\tvcvtudq2pd" } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
289 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
290 +void
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
291 +test_fix (void)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
292 +{
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
293 + for (int i = 0; i < 2; i++)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
294 + s[i] = r[i];
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
295 +}
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
296 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
297 +/* { dg-final { scan-assembler "\tvcvttpd2dqx" } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
298 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
299 +void
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
300 +test_ufix (void)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
301 +{
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
302 + for (int i = 0; i < 2; i++)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
303 + u[i] = r[i];
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
304 +}
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
305 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
306 +/* { dg-final { scan-assembler "\tvcvttpd2udqx" } } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
307 --
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
308 2.26.2
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
309
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
310 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
311
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
312 EXPECTED5 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
313 PR target/95046 - Vectorize V2SFmode operations
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
314
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
315 gcc/testsuite/ChangeLog:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
316
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
317 PR target/95046
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
318 * gcc.target/i386/pr95046-6.c: New test.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
319
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
320 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
321
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
322 PATCH6 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
323 diff --git a/gcc/cgraph.h b/gcc/cgraph.h
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
324 index 5ddeb65269b..cfae6e91da9 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
325 --- a/gcc/cgraph.h
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
326 +++ b/gcc/cgraph.h
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
327 @@ -937,7 +937,8 @@ struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
328 split_part (false), indirect_call_target (false), local (false),
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
329 versionable (false), can_change_signature (false),
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
330 redefined_extern_inline (false), tm_may_enter_irr (false),
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
331 - ipcp_clone (false), m_uid (uid), m_summary_id (-1)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
332 + ipcp_clone (false), declare_variant_alt (false),
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
333 + calls_declare_variant_alt (false), m_uid (uid), m_summary_id (-1)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
334 {}
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
335
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
336 /* Remove the node from cgraph and all inline clones inlined into it.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
337
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
338 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
339
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
340 EXPECTED6 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
341 gcc/ChangeLog:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
342
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
343 * cgraph.h (struct cgraph_node):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
344
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
345 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
346
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
347 PATCH7 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
348 diff --git a/gcc/testsuite/g++.dg/DRs/dr2237.C b/gcc/testsuite/g++.dg/DRs/dr2237.C
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
349 new file mode 100644
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
350 index 00000000000..f3d6d11e61e
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
351 --- /dev/null
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
352 +++ b/gcc/testsuite/g++.dg/DRs/dr2237.C
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
353 @@ -0,0 +1,18 @@
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
354 +// DR 2237 - Can a template-id name a constructor?
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
355 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
356 +template<class T>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
357 +struct X {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
358 + X<T>(); // { dg-error "expected" "" { target c++20 } }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
359 + X(int); // OK, injected-class-name used
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
360 + ~X<T>(); // { dg-error "template-id not allowed for destructor" "" { target c++20 } }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
361 +};
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
362 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
363 +// ill-formed since DR1435
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
364 +template<typename T> X<T>::X<T>() {} // { dg-error "names the constructor|as no template constructors" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
365 +template<typename T> X<T>::~X<T>() {} // { dg-error "template-id not allowed for destructor" "" { target c++20 } }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
366 +
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
367 +struct Q {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
368 + // ill-formed since DR1435
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
369 + template<typename T> friend X<T>::X<T>(); // { dg-error "names the constructor|as no template constructors" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
370 + template<typename T> friend X<T>::~X<T>(); // { dg-error "template-id not allowed for destructor" "" { target c++20 } }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
371 +};
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
372 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
373
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
374 EXPECTED7 = '''\
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
375 gcc/testsuite/ChangeLog:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
376
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
377 DR 2237
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
378 * g++.dg/DRs/dr2237.C: New test.
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
379
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
380 '''
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
381
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
382 class TestMklog(unittest.TestCase):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
383 def test_macro_definition(self):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
384 changelog = generate_changelog(PATCH1)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
385 assert changelog == EXPECTED1
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
386
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
387 def test_changed_argument(self):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
388 changelog = generate_changelog(PATCH2)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
389 assert changelog == EXPECTED2
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
390
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
391 def test_enum_and_struct(self):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
392 changelog = generate_changelog(PATCH3)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
393 assert changelog == EXPECTED3
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
394
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
395 def test_no_function(self):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
396 changelog = generate_changelog(PATCH3, True)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
397 assert changelog == EXPECTED3B
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
398
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
399 def test_sorting(self):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
400 changelog = generate_changelog(PATCH4)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
401 assert changelog == EXPECTED4
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
402
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
403 def test_pr_bugzilla_download(self):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
404 changelog = generate_changelog(PATCH5, fill_pr_titles=True)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
405 assert changelog == EXPECTED5
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
406
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
407 def test_gty_in_struct(self):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
408 changelog = generate_changelog(PATCH6, fill_pr_titles=True)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
409 assert changelog == EXPECTED6
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
410
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
411 def test_dr_detection_in_test_case(self):
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
412 changelog = generate_changelog(PATCH7)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
413 assert changelog == EXPECTED7