re PR tree-optimization/62053 (ICE: in remap_type_1, at tree-inline.c:540)
[gcc.git] / gcc / cp / ChangeLog
1 2015-01-15 Jan Hubicka <hubicka@ucw.cz>
2
3 PR tree-optimization/62053
4 * tree.c (build_cplus_array_type): Layout type after variants are set.
5
6 2015-01-15 Jakub Jelinek <jakub@redhat.com>
7
8 * cp-gimplify.c (cp_genericize_r): Call
9 cp_ubsan_maybe_instrument_member_call for member calls.
10 (cp_ubsan_check_member_access_r): New function.
11 (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
12 * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
13 cp_ubsan_instrument_member_accesses,
14 cp_ubsan_maybe_instrument_downcast,
15 cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
16 * cp-ubsan.c: New file.
17 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
18 * constexpr.c (cxx_eval_call_expression): Return void_node
19 for IFN_UBSAN_VPTR.
20 (potential_constant_expression_1): Return true for
21 UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
22 * typeck.c (build_class_member_access_expr): Provide locus
23 for COMPONENT_REFs.
24 (build_static_cast_1): Instrument downcasts.
25 * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
26 add ubsan instrumentation for virtual_access.
27 * call.c: Include internal-fn.h.
28 (set_flags_from_callee): Handle internal calls.
29
30 2015-01-15 Momchil Velikov <momchil.velikov@gmail.com>
31
32 PR c++/59366
33 * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
34 and function templates, declared only in the class.
35 * decl.c (duplicate_decls): Reveal hidden friend functions or
36 function templates, if they are redeclared outside the class.
37
38 2015-01-15 Jason Merrill <jason@redhat.com>
39
40 PR c++/64356
41 * constexpr.c (cxx_eval_binary_expression): Fix pasto.
42
43 PR c++/63283
44 * constexpr.c (potential_constant_expression_1): Handle reference
45 args in templates.
46
47 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
48 James Norris <jnorris@codesourcery.com>
49 Cesar Philippidis <cesar@codesourcery.com>
50 Ilmir Usmanov <i.usmanov@samsung.com>
51 Jakub Jelinek <jakub@redhat.com>
52
53 * parser.c: Include "gomp-constants.h".
54 (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
55 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
56 Use OMP_CLAUSE_SET_MAP_KIND.
57 (cp_parser_omp_construct, cp_parser_pragma): Handle
58 PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
59 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
60 PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
61 (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
62 "create", "delete", "deviceptr", "host", "num_gangs",
63 "num_workers", "present", "present_or_copy", "pcopy",
64 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
65 "present_or_create", "pcreate", "vector_length", "wait".
66 (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
67 (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
68 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
69 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
70 (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
71 (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
72 (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
73 (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
74 (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
75 (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
76 (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
77 (cp_parser_oacc_kernels, cp_parser_oacc_loop)
78 (cp_parser_oacc_parallel, cp_parser_oacc_update)
79 (cp_parser_oacc_wait): New functions.
80 * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
81 (finish_oacc_parallel): New prototypes.
82 * semantics.c: Include "gomp-constants.h".
83 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
84 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
85 OMP_CLAUSE_SET_MAP_KIND.
86 (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
87 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
88 Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
89 (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
90 functions.
91
92 2015-01-14 Paolo Carlini <paolo.carlini@oracle.com>
93
94 PR c++/58671
95 * decl2.c (var_defined_without_dynamic_init): Handle gracefully
96 self-initialization.
97
98 2015-01-13 Jason Merrill <jason@redhat.com>
99
100 PR c++/64356
101 PR libstdc++/58777
102 * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
103 pointer expressions.
104 (cxx_eval_increment_expression): Likewise.
105
106 PR c++/64514
107 * pt.c (coerce_template_parameter_pack): Return NULL for a
108 zero-length fixed parameter pack with a pack expansion arg.
109
110 PR c++/64520
111 * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
112
113 2015-01-12 Jason Merrill <jason@redhat.com>
114
115 PR c++/64547
116 * constexpr.c (cxx_eval_call_expression): A call to a void
117 function doesn't need to return a value.
118
119 2015-01-09 Michael Collison <michael.collison@linaro.org>
120
121 * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
122 input.h, alias.h, symtab.h, options.h, fold-const.h,
123 wide-int.h, and inchash.h due to flattening of tree.h.
124 * class.c: Ditto.
125 * constexpr.c: Ditto.
126 * cp-array-notation.c: Ditto.
127 * cp-gimplify.c: Ditto.
128 * cp-lang.c: Ditto.
129 * cp-objcp-common.c: Ditto.
130 * cvt.c: Ditto.
131 * decl2.c: Ditto.
132 * decl.c: Ditto.
133 * dump.c: Ditto.
134 * error.c: Ditto.
135 * except.c: Ditto.
136 * expr.c: Ditto.
137 * friend.c: Ditto.
138 * init.c: Ditto.
139 * lambda.c: Ditto.
140 * lex.c: Ditto.
141 * mangle.c: Ditto.
142 * name-lookup.c: Ditto.
143 * optimize.c: Ditto.
144 * parser.c: Ditto.
145 * pt.c: Ditto.
146 * ptree.c: Ditto.
147 * repo.c: Ditto.
148 * rtti.c: Ditto.
149 * search.c: Ditto.
150 * semantics.c: Ditto.
151 * tree.c: Ditto.
152 * typeck2.c: Ditto.
153 * typeck.c: Ditto.
154
155 2015-01-08 Jason Merrill <jason@redhat.com>
156
157 * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
158 * decl.c (compute_array_index_type): Likewise.
159 * init.c (build_vec_init): Likewise.
160 * typeck.c (cp_build_binary_op): Likewise.
161
162 2015-01-08 Jason Merrill <jason@redhat.com>
163
164 * init.c (build_vec_init): Call ubsan_instrument_bounds to check
165 whether an initializer-list is too big for a VLA.
166 (throw_bad_array_length): Remove.
167 * cp-tree.h: Remove prototype.
168
169 2015-01-08 Paolo Carlini <paolo.carlini@oracle.com>
170
171 PR c++/60753
172 * decl.c (grokfndecl): Add bool parameter.
173 (grokdeclarator): Adjust calls.
174 (start_decl): Don't set DECL_DELETED_FN here.
175
176 2015-01-06 Jason Merrill <jason@redhat.com>
177
178 * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
179 template-ids.
180
181 PR c++/64455
182 * pt.c (type_dependent_expression_p): Handle variable templates.
183 * constexpr.c (potential_constant_expression_1): Use it.
184
185 PR c++/64487
186 * semantics.c (finish_offsetof): Handle templates here.
187 * parser.c (cp_parser_builtin_offsetof): Not here.
188
189 PR c++/64496
190 * semantics.c (process_outer_var_ref): Diagnose lambda in local
191 class NSDMI.
192
193 2015-01-06 Ville Voutilainen <ville.voutilainen@gmail.com>
194
195 PR c++/64489
196 * class.c (check_field_decls): Make copy assignment operators
197 complex only in c++98 mode.
198
199 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
200
201 PR c++/31397
202 * class.c (check_for_override): Warn when a virtual function is an
203 override not marked override.
204
205 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
206
207 * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
208 hold base_fndecls.
209 (get_basefndecls): Adjust.
210
211 2015-01-05 Jakub Jelinek <jakub@redhat.com>
212
213 Update copyright years.
214
215 2015-01-05 Marek Polacek <polacek@redhat.com>
216
217 PR c/64423
218 * typeck.c (cp_build_array_ref): Pass loc down to
219 warn_array_subscript_with_type_char.
220
221 \f
222 Copyright (C) 2015 Free Software Foundation, Inc.
223
224 Copying and distribution of this file, with or without modification,
225 are permitted in any medium without royalty provided the copyright
226 notice and this notice are preserved.