Daily bump.
[gcc.git] / gcc / d / ChangeLog
1 2020-11-18 Jakub Jelinek <jakub@redhat.com>
2
3 * Make-lang.in (d.serial): New goal.
4 (.PHONY): Add d.serial d.prev.
5 (d21$(exeext)): Depend on d.prev. Call LINK_PROGRESS.
6
7 2020-11-18 Iain Buclaw <ibuclaw@gdcproject.org>
8
9 PR d/97843
10 * d-codegen.cc (build_assign): Evaluate TARGET_EXPR before use in
11 the right hand side of an assignment.
12 * expr.cc (ExprVisitor::visit (CatAssignExp *)): Force a TARGET_EXPR
13 on the element to append if it is a CALL_EXPR.
14
15 2020-11-18 Iain Buclaw <ibuclaw@gdcproject.org>
16
17 PR d/97842
18 * dmd/MERGE: Merge upstream dmd b6a779e49
19
20 2020-11-13 Iain Buclaw <ibuclaw@gdcproject.org>
21
22 * intrinsics.cc (expand_intrinsic_copysign): Explicitly determine
23 which built-in copysign function to call.
24
25 2020-11-13 Iain Buclaw <ibuclaw@gdcproject.org>
26
27 PR d/97644
28 * dmd/MERGE: Merge upstream dmd 95044d8e4.
29 * d-target.cc (TargetCPP::thunkMangle): New function.
30 * decl.cc (finish_thunk): Don't force expand thunks for external
31 functions.
32 (make_thunk): Emit thunks only if the function has a definition.
33 Generate correct mangling for thunks to C++ classes.
34
35 2020-11-10 Strager Neds <strager.nds@gmail.com>
36
37 * decl.cc (finish_thunk): Use new overload of
38 set_decl_section_name
39
40 2020-10-27 Iain Buclaw <ibuclaw@gdcproject.org>
41
42 * dmd/MERGE: Merge upstream dmd bec5973b0.
43 * d-target.cc (Target::critsecsize): Remove.
44 * d-target.def: Remove d_critsec_size.
45
46 2020-10-27 Iain Buclaw <ibuclaw@gdcproject.org>
47
48 * dmd/MERGE: Merge upstream dmd 0fcdaab32
49
50 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
51
52 * decl.cc (finish_thunk): Update for new thunk api.
53
54 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
55
56 * decl.cc: Include tree-nested.h
57 (get_symbol_decl): Update for new nested function info.
58
59 2020-10-12 Iain Buclaw <ibuclaw@gdcproject.org>
60
61 * dmd/MERGE: Merge upstream dmd 70aabfb51
62
63 2020-10-12 Iain Buclaw <ibuclaw@gdcproject.org>
64
65 * dmd/MERGE: Merge upstream dmd 3a9790525
66 * d-target.cc (Target::isVectorTypeSupported): Adjust return codes for
67 invalid size and invalid base type.
68
69 2020-09-12 Iain Buclaw <ibuclaw@gdcproject.org>
70
71 PR d/97002
72 * d-codegen.cc (d_build_call): Set input_location on CALL_EXPR.
73 * d-lang.cc: Include function.h.
74 (d_type_promotes_to): Do default conversions for C and C++ functions.
75 * intrinsics.cc (expand_intrinsic_vaarg): Use build1_loc to build
76 VA_ARG_EXPR.
77
78 2020-09-12 Iain Buclaw <ibuclaw@gdcproject.org>
79
80 * d-builtins.cc (d_build_d_type_nodes): Call build_ctype() on all
81 basic front-end types.
82 * decl.cc (DeclVisitor::visit (EnumDeclaration *)): Always add decl to
83 current binding level.
84 (build_type_decl): Build TYPE_DECL as a typedef if not for an enum or
85 record type.
86 * types.cc (TypeVisitor::visit (TypeEnum *)): Set underlying type for
87 ENUMERAL_TYPEs. Build TYPE_DECL for non-numeric enums.
88
89 2020-09-10 Iain Buclaw <ibuclaw@gdcproject.org>
90
91 * lang.opt (Waddress): Enable warning by -Wextra.
92 (Wcast-result): Likewise.
93 (Wunknown-pragmas): Likewise.
94
95 2020-09-10 Iain Buclaw <ibuclaw@gdcproject.org>
96
97 * decl.cc (DeclVisitor::visit (VarDeclaration *)): Don't warn about
98 variables initialized with 'void'.
99
100 2020-09-10 Iain Buclaw <ibuclaw@gdcproject.org>
101
102 * d-convert.cc (convert_expr): Warn when casting from a D class to a
103 C++ class.
104
105 2020-09-04 Iain Buclaw <ibuclaw@gdcproject.org>
106
107 PR d/96924
108 * expr.cc (ExprVisitor::visit (CatAssignExp *)): Don't force
109 temporaries needlessly.
110
111 2020-09-02 Iain Buclaw <ibuclaw@gdcproject.org>
112
113 PR d/96869
114 * d-builtins.cc (build_frontend_type): Don't expose intrinsics that
115 use unsupported vector types.
116 * d-target.cc (Target::isVectorTypeSupported): Restrict to supporting
117 only if TARGET_VECTOR_MODE_SUPPORTED_P is true. Don't allow complex
118 or boolean vector types.
119
120 2020-08-31 Iain Buclaw <ibuclaw@gdcproject.org>
121
122 * d-target.cc (Target::_init): Don't set classinfosize.
123 * d-tree.h (base_vtable_offset): Move under typeinfo.cc section.
124 * decl.cc (base_vtable_offset): Move to...
125 * typeinfo.cc (base_vtable_offset): ...here. Get base offset from
126 internal TypeInfo_Class type.
127 * intrinsics.cc (expand_intrinsic_bt): Use pointer TYPE_SIZE for
128 setting bitsize value. Build integer constants of correct type.
129
130 2020-08-26 Iain Buclaw <ibuclaw@gdcproject.org>
131
132 * dmd/MERGE: Merge upstream dmd e49192807
133
134 2020-08-26 Iain Buclaw <ibuclaw@gdcproject.org>
135
136 PR d/96156
137 * d-frontend.cc (retStyle): Only return RETstack for struct and static
138 array types.
139 * decl.cc (DeclVisitor::visit (FuncDeclaration *)): Use NRVO return
140 for all TREE_ADDRESSABLE types. Set shidden to the RESULT_DECL.
141 * expr.cc (ExprVisitor::visit (CallExp *)): Force TARGET_EXPR if the
142 'this' pointer reference is a CONSTRUCTOR.
143 (ExprVisitor::visit (StructLiteralExp *)): Generate assignment to the
144 symbol to initialize with literal.
145 * toir.cc (IRVisitor::visit (ReturnStatement *)): Detect returning
146 struct literals and write directly into the RESULT_DECL.
147 * dmd/MERGE: Merge upstream dmd fe5f388d8.
148
149 2020-08-26 Iain Buclaw <ibuclaw@gdcproject.org>
150
151 * dmd/MERGE: Merge upstream dmd cb4a96fae
152
153 2020-08-26 Iain Buclaw <ibuclaw@gdcproject.org>
154
155 * d-lang.cc (d_parse_file): Use read() to load contents from stdin,
156 allow the front-end to free the memory after parsing.
157 * dmd/MERGE: Merge upstream dmd 2cc25c219.
158
159 2020-08-26 Iain Buclaw <ibuclaw@gdcproject.org>
160
161 PR d/96153
162 * d-codegen.cc (build_address): Create a temporary for CALL_EXPRs
163 returning trivial aggregates, pre-filling it with zeroes.
164 (build_memset_call): Use build_zero_cst if setting the entire object.
165
166 2020-08-26 Iain Buclaw <ibuclaw@gdcproject.org>
167
168 PR d/96157
169 * d-codegen.cc (d_build_call): Handle TREE_ADDRESSABLE static arrays.
170 * types.cc (make_array_type): Propagate TREE_ADDRESSABLE from base
171 type to static array.
172
173 2020-08-26 Iain Buclaw <ibuclaw@gdcproject.org>
174
175 * d-gimplify.cc (d_gimplify_expr): Move lowering of each tree node to
176 separate functions.
177 (d_gimplify_modify_expr): New function.
178 (d_gimplify_addr_expr): New function.
179 (d_gimplify_call_expr): New function.
180 (d_gimplify_unsigned_rshift_expr): New function.
181
182 2020-08-26 Iain Buclaw <ibuclaw@gdcproject.org>
183
184 * Make-lang.in (D_OBJS): Add d-gimplify.o.
185 * d-lang.cc (empty_modify_p): Move to d-gimplify.cc.
186 (d_gimplify_expr): Likewise.
187 * d-tree.h (d_gimplify_expr): Declare.
188 * d-gimplify.cc: New file.
189
190 2020-08-20 Iain Buclaw <ibuclaw@gdcproject.org>
191
192 * dmd/MERGE: Merge upstream dmd 1b5a53d01.
193
194 2020-08-18 Iain Buclaw <ibuclaw@gdcproject.org>
195
196 PR d/96301
197 * decl.cc (DeclVisitor::visit (FuncDeclaration *)): Only return
198 non-trivial structs by invisible reference.
199
200 2020-08-04 Iain Buclaw <ibuclaw@gdcproject.org>
201
202 PR d/96153
203 * d-tree.h (build_expr): Add literalp argument.
204 * expr.cc (ExprVisitor): Add literalp_ field.
205 (ExprVisitor::ExprVisitor): Initialize literalp_.
206 (ExprVisitor::visit (AssignExp *)): Call memset() on blits where RHS
207 is a struct literal. Elide assignment if initializer is all zeroes.
208 (ExprVisitor::visit (CastExp *)): Forward literalp_ to generation of
209 subexpression.
210 (ExprVisitor::visit (AddrExp *)): Likewise.
211 (ExprVisitor::visit (ArrayLiteralExp *)): Use memset() to pre-fill
212 object with zeroes. Set literalp in subexpressions.
213 (ExprVisitor::visit (StructLiteralExp *)): Likewise.
214 (ExprVisitor::visit (TupleExp *)): Set literalp in subexpressions.
215 (ExprVisitor::visit (VectorExp *)): Likewise.
216 (ExprVisitor::visit (VectorArrayExp *)): Likewise.
217 (build_expr): Forward literal_p to ExprVisitor.
218
219 2020-08-04 Iain Buclaw <ibuclaw@gdcproject.org>
220
221 PR d/96429
222 * expr.cc (ExprVisitor::visit (BinExp*)): Use EXACT_DIV_EXPR for
223 pointer diff expressions.
224
225 2020-08-03 Iain Buclaw <ibuclaw@gdcproject.org>
226
227 PR d/96254
228 * d-codegen.cc (error_no_frame_access): New.
229 (get_frame_for_symbol): Use fdparent name in error message.
230 (get_framedecl): Replace call to assert with error.
231 * d-tree.h (error_no_frame_access): Declare.
232 * decl.cc (get_decl_tree): Detect recursion and error.
233
234 2020-08-03 Iain Buclaw <ibuclaw@gdcproject.org>
235
236 PR d/96250
237 * dmd/MERGE: Merge upstream dmd c2274e56a.
238
239 2020-07-31 Iain Buclaw <ibuclaw@gdcproject.org>
240
241 PR d/96393
242 * intrinsics.cc (expand_intrinsic_bt): Don't generate BIT_NOT_EXPR for
243 btr32 intrinsic.
244
245 2020-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
246
247 PR d/96152
248 * d-codegen.cc (build_array_from_exprs): New function.
249 * d-tree.h (build_array_from_exprs): Declare.
250 * expr.cc (ExprVisitor::visit (AssocArrayLiteralExp *)): Use
251 build_array_from_exprs to generate key and value arrays.
252
253 2020-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
254
255 PR d/96154
256 * gdc.texi (Warnings): Document -Wvarargs.
257 * lang.opt: Add -Wvarargs
258
259 2020-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
260
261 PR d/96140
262 * intrinsics.cc (expand_intrinsic_vaarg): Handle ref parameters as
263 arguments to va_arg().
264 (expand_intrinsic_vastart): Handle ref parameters as arguments to
265 va_start().
266
267 2020-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
268
269 * expr.cc (ExprVisitor::visit (AssignExp *)): Inline bounds checking
270 for simple array assignments.
271
272 2020-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
273
274 * d-codegen.cc (build_memcmp_call): New function.
275 (build_memcpy_call): New function.
276 (build_memset_call): New function.
277 (build_float_identity): Call build_memcmp_call.
278 (lower_struct_comparison): Likewise.
279 (build_struct_comparison): Likewise.
280 * d-tree.h (build_memcmp_call): Declare.
281 (build_memcpy_call): Declare.
282 (build_memset_call): Declare.
283 * expr.cc (ExprVisitor::visit (EqualExp *)): Call build_memcmp_call.
284 (ExprVisitor::visit (AssignExp *)): Call build_memset_call.
285 (ExprVisitor::visit (ArrayLiteralExp *)): Call build_memcpy_call.
286 (ExprVisitor::visit (StructLiteralExp *)): Call build_memset_call.
287
288 2020-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
289
290 * expr.cc (needs_postblit): Move out of ExprVisitor as a static
291 function. Update all callers.
292 (needs_dtor): Likewise.
293 (lvalue_p): Likewise.
294 (binary_op): Likewise.
295 (binop_assignment): Likewise.
296
297 2020-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
298
299 * intrinsics.cc (expand_intrinsic_rotate): Add function.
300 (maybe_expand_intrinsic): Handle rol and ror intrinsics.
301 * intrinsics.def (ROL): Add intrinsic.
302 (ROL_TIARG): Add intrinsic.
303 (ROR): Add intrinsic.
304 (ROR_TIARG): Add intrinsic.
305
306 2020-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
307
308 * d-tree.h (DEF_D_INTRINSIC): Rename second argument from A to B.
309 * intrinsics.cc (intrinsic_decl): Add built_in field.
310 (DEF_D_INTRINSIC): Rename second argument from ALIAS to BUILTIN.
311 (maybe_set_intrinsic): Handle new intrinsic codes.
312 (expand_intrinsic_bt): Likewise.
313 (expand_intrinsic_checkedint): Likewise.
314 (expand_intrinsic_bswap): Remove.
315 (expand_intrinsic_sqrt): Remove.
316 (maybe_expand_intrinsic): Group together intrinsic cases that map
317 directly to gcc built-ins.
318 * intrinsics.def (DEF_D_BUILTIN): Rename second argument from A to B.
319 Update all callers to pass equivalent DECL_FUNCTION_CODE.
320 (DEF_CTFE_BUILTIN): Likewise.
321 (STD_COS): Remove intrinsic.
322 (STD_FABS): Remove intrinsic.
323 (STD_LDEXP): Remove intrinsic.
324 (STD_RINT): Remove intrinsic.
325 (STD_RNDTOL): Remove intrinsic.
326 (STD_SIN): Remove intrinsic.
327 (STD_SQRTF): Remove intrinsic.
328 (STD_SQRT): Remove intrinsic.
329 (STD_SQRTL): Remove intrinsic.
330
331 2020-06-28 Iain Buclaw <ibuclaw@gdcproject.org>
332
333 * dmd/MERGE: Merge upstream dmd 8508c4e68.
334
335 2020-06-25 Iain Buclaw <ibuclaw@gdcproject.org>
336
337 * decl.cc (get_symbol_decl): Do not implicitly set
338 DECL_DECLARED_INLINE_P on member functions.
339
340 2020-06-25 Iain Buclaw <ibuclaw@gdcproject.org>
341
342 * d-lang.cc (d_gimplify_expr_p): Make static.
343 (d_parse_file): Likewise.
344 (d_signed_or_unsigned_type): Move to types.cc.
345 (d_unsigned_type): Likewise.
346 (d_signed_type): Likewise.
347 * d-tree.h (d_unsigned_type): Change the location in file.
348 (d_signed_type): Likewise.
349 * types.cc (d_signed_or_unsigned_type): Moved from d-lang.cc.
350 (d_unsigned_type): Likewise.
351 (d_signed_type): Likewise.
352
353 2020-06-25 Iain Buclaw <ibuclaw@gdcproject.org>
354
355 PR d/95075
356 * dmd/MERGE: Merge upstream dmd 4be011355.
357
358 2020-06-25 Iain Buclaw <ibuclaw@gdcproject.org>
359
360 PR d/95250
361 * dmd/MERGE: Merge upstream dmd 90450f3ef.
362
363 2020-06-25 Iain Buclaw <ibuclaw@gdcproject.org>
364
365 * d-lang.cc (d_parse_file): Replace OutBuffer with obstack.
366
367 2020-06-25 Iain Buclaw <ibuclaw@gdcproject.org>
368
369 * dmd/MERGE: Merge upstream dmd 5fc1806cd.
370 * d-lang.cc (d_parse_file): Use peekChars to get string representation
371 of OutBuffer data.
372
373 2020-06-25 Iain Buclaw <ibuclaw@gdcproject.org>
374
375 PR d/95173
376 * d-attribs.cc (uda_attribute_p): Don't search target attribute table
377 if NULL.
378
379 2020-06-25 Iain Buclaw <ibuclaw@gdcproject.org>
380
381 * decl.cc (DeclVisitor::visit (VarDeclaration *)): Don't set
382 DECL_INITIAL if initializer is 'void'.
383
384 2020-06-25 Iain Buclaw <ibuclaw@gdcproject.org>
385
386 * d-lang.cc (d_init_options): Turn on deprecation warnings by default.
387
388 2020-06-25 Iain Buclaw <ibuclaw@gdcproject.org>
389
390 * dmd/MERGE: Merge upstream dmd 4f1046222.
391 * toir.cc (IRVisitor::visit (OnScopeGuardStatement *)): Rename to ...
392 (IRVisitor::visit (ScopeGuardStatement *)): ... this.
393
394 2020-06-16 Iain Buclaw <ibuclaw@gdcproject.org>
395
396 * d-attribs.cc (handle_noreturn_attribute): Remove names of unused
397 function parameters.
398 (handle_leaf_attribute): Likewise.
399 (handle_const_attribute): Likewise.
400 (handle_malloc_attribute): Likewise.
401 (handle_pure_attribute): Likewise.
402 (handle_novops_attribute): Likewise.
403 (handle_nonnull_attribute): Likewise.
404 (handle_nothrow_attribute): Likewise.
405 (handle_type_generic_attribute): Likewise.
406 (handle_transaction_pure_attribute): Likewise.
407 (handle_returns_twice_attribute): Likewise.
408 (handle_fnspec_attribute): Likewise.
409 (handle_always_inline_attribute): Likewise.
410 (d_handle_noinline_attribute): Likewise.
411 (d_handle_forceinline_attribute): Likewise.
412 (d_handle_flatten_attribute): Likewise.
413 (d_handle_noclone_attribute): Likewise.
414 (d_handle_section_attribute): Likewise.
415 (d_handle_alias_attribute): Likewise.
416 (d_handle_weak_attribute): Likewise.
417
418 2020-06-16 Iain Buclaw <ibuclaw@gdcproject.org>
419
420 * d-attribs.cc: Update code formatting in a consistant style.
421 * d-builtins.cc: Likewise.
422 * d-codegen.cc: Likewise.
423 * d-compiler.cc: Likewise.
424 * d-convert.cc: Likewise.
425 * d-diagnostic.cc: Likewise.
426 * d-frontend.cc: Likewise.
427 * d-lang.cc: Likewise.
428 * d-longdouble.cc: Likewise.
429 * d-port.cc: Likewise.
430 * d-spec.cc: Likewise.
431 * d-tree.h: Likewise.
432 * decl.cc: Likewise.
433 * expr.cc: Likewise.
434 * longdouble.h: Likewise.
435 * modules.cc: Likewise.
436 * toir.cc: Likewise.
437 * typeinfo.cc: Likewise.
438
439 2020-06-16 Iain Buclaw <ibuclaw@gdcproject.org>
440
441 * d-builtins.cc: Update quotation formatting of comments.
442 * d-codegen.cc: Likewise.
443 * d-lang.cc: Likewise.
444 * decl.cc: Likewise.
445 * expr.cc: Likewise.
446 * imports.cc: Likewise.
447 * runtime.cc: Likewise.
448 * toir.cc: Likewise.
449 * typeinfo.cc: Likewise.
450 * types.cc: Likewise.
451
452 2020-06-16 Iain Buclaw <ibuclaw@gdcproject.org>
453
454 * d-diagnostic.cc (expand_d_format): Replace OutBuffer with obstack.
455 (d_diagnostic_report_diagnostic): Don't free xformat.
456 * d-lang.cc (struct d_option_data): Change deps_target type from
457 OutBuffer to vec <const char *>.
458 (deps_add_target): Update to push each target to deps_target.
459 (deps_write_string): New function.
460 (deps_write): Change buffer type to obstack* and remove colmax.
461 (d_init_options): Update initialization of deps_target.
462 (d_parse_file): Replace OutBuffer with obstack.
463
464 2020-06-16 Iain Buclaw <ibuclaw@gdcproject.org>
465
466 * d-lang.cc (d_parse_file): Replace uses of File with FILE.
467
468 2020-06-16 Iain Buclaw <ibuclaw@gdcproject.org>
469
470 * d-codegen.cc (build_array_bounds_call): New function.
471 (build_bounds_condition): Use build_array_bounds_call.
472 * d-lang.cc (d_init_options): Explicitly set default check action to
473 CHECKACTION_D.
474 (d_post_options): Set check action to CHECKACTION_C if the flag
475 -fno-druntime was seen.
476 * d-tree.h (build_array_bounds_call): Declare.
477 * expr.cc (ExprVisitor::visit (AssertExp *)): Use
478 build_array_bounds_call.
479
480 2020-06-16 Iain Buclaw <ibuclaw@gdcproject.org>
481
482 * d-attribs.cc (build_attributes): Use toStringExp instead of cast.
483 * toir.cc (IRVisitor::visit): Likewise.
484
485 2020-06-16 Iain Buclaw <ibuclaw@gdcproject.org>
486
487 * d-attribs.cc (build_attributes): Use isXxxxExp helpers instead of
488 explicit casts.
489 * d-codegen.cc (d_build_call): Likewise.
490 * d-compiler.cc (Compiler::paintAsType): Likewise.
491 * decl.cc (ExprVisitor::visit): Likewise.
492 (layout_class_initializer): Likewise.
493 * expr.cc (ExprVisitor::lvalue_p): Likewise
494 (ExprVisitor::visit): Likewise.
495 * types.cc (layout_aggregate_members): Likewise.
496
497 2020-06-16 Iain Buclaw <ibuclaw@gdcproject.org>
498
499 * d-frontend.cc (eval_builtin): Use toTypeFunction instead of cast.
500 * decl.cc (DeclVisitor::visit): Likewise.
501 * toir.cc (IRVisitor::visit): Likewise.
502 * typeinfo.cc (TypeInfoVisitor::visit): Likewise.
503
504 2020-06-16 Iain Buclaw <ibuclaw@gdcproject.org>
505
506 * d-builtins.cc (d_eval_constant_expression): Use isTypeXxxx helpers
507 instead of explicit casts.
508 (d_build_builtins_module): Likewise.
509 * d-codegen.cc (get_array_length): Likewise.
510 (identity_compare_p): Likewise.
511 (lower_struct_comparison): Likewise.
512 (build_array_from_val): Likewise.
513 (array_bounds_check): Likewise.
514 (get_function_type): Likewise.
515 (d_build_call): Likewise.
516 * d-compiler.cc (Compiler::paintAsType): Likewise.
517 * d-convert.cc (convert_expr): Likewise.
518 (convert_for_assignment): Likewise.
519 * d-lang.cc (d_classify_record): Likewise.
520 (d_build_eh_runtime_type): Likewise.
521 * decl.cc (DeclVisitor::visit): Likewise.
522 * expr.cc (ExprVisitor::needs_postblit): Likewise.
523 (ExprVisitor::needs_dtor): Likewise.
524 (ExprVisitor::visit): Likewise.
525 * imports.cc (ImportVisitor::visit): Likewise.
526 * typeinfo.cc (get_typeinfo_kind): Likewise.
527 (TypeInfoVisitor::visit): Likewise.
528 (TypeDeclInfoVisitor::visit): Likewise.
529 * types.cc (merge_aggregate_types): Likewise.
530 (TypeVisitor::visit): Likewise.
531
532 2020-06-14 Iain Buclaw <ibuclaw@gdcproject.org>
533
534 * expr.cc (ExprVisitor::visit (AssocArrayLiteralExp *)): Fix line
535 lengths, no functional change.
536 * typeinfo.cc (TypeInfoVisitor::layout_interfaces): Likewise.
537 (layout_classinfo_interfaces): Likewise.
538
539 2020-06-09 Iain Buclaw <ibuclaw@gdcproject.org>
540
541 * dmd/MERGE: Merge upstream dmd 13d67c575.
542 * d-builtins.cc (build_frontend_type): Update call to
543 TypeVector::create.
544 * d-frontend.cc (Global::_init): Move setting of errorLimit to ...
545 * d-lang.cc (d_init_options): ... here. Update for new field
546 location of errorLimit.
547 (d_post_options): Likewise.
548 * d-port.cc (Port::readwordLE): Update signature.
549 (Port::readwordBE): Likewise.
550 (Port::readlongLE): Likewise.
551 (Port::readlongBE): Likewise.
552 * decl.cc (get_symbol_decl): Update for new field types.
553
554 2020-06-08 Iain Buclaw <ibuclaw@gdcproject.org>
555
556 PR d/95573
557 * dmd/MERGE: Merge upstream dmd 5041e56f1.
558
559 2020-06-08 Iain Buclaw <ibuclaw@gdcproject.org>
560
561 * dmd/MERGE: Merge upstream dmd 955b8b36f.
562 * expr.cc (ExprVisitor::visit (AndAndExp *)): Rename type to ...
563 (ExprVisitor::visit (LogicalExp *)): ... this. Handle both 'and if'
564 and 'or if' expression nodes.
565 (ExprVisitor::visit (OrOrExp *)): Remove.
566
567 2020-06-07 Iain Buclaw <ibuclaw@gdcproject.org>
568
569 * dmd/MERGE: Merge upstream dmd 73d8e2fec.
570 * decl.cc (get_symbol_decl): Use new Prot::Kind enum.
571 * modules.cc (get_internal_fn): Likewise.
572
573 2020-06-07 Iain Buclaw <ibuclaw@gdcproject.org>
574
575 * dmd/MERGE: Merge upstream dmd 108ca1bcd.
576 * d-diagnostic.cc (expand_d_format): Adjust to use extractChars().
577 * d-frontend.cc (Loc::toChars): Likewise.
578 * d-lang.cc (deps_write): Likewise.
579 (d_parse_file): Likewise.
580 * decl.cc (d_mangle_decl): Likewise.
581 * intrinsics.cc (maybe_set_intrinsic): Likewise.
582
583 2020-06-07 Iain Buclaw <ibuclaw@gdcproject.org>
584
585 * dmd/MERGE: Merge upstream dmd b0df0e982.
586 * d-builtins.cc (build_frontend_type): Use VarArg for varargs_p.
587 * d-codegen.cc (declaration_type): Call TypeFunction::create with
588 argument VARARGnone.
589 (parameter_type): Likewise.
590 (d_build_call): Use new field names and member functions.
591 * d-target.cc (Target::cppParameterType): Call TypeFunction::create
592 with argument VARARGnone.
593 * types.cc (TypeVisitor::visit (TypeFunction *): Use new field names
594 and member functions.
595
596 2020-06-07 Iain Buclaw <ibuclaw@gdcproject.org>
597
598 * dmd/MERGE: Merge upstream dmd 1831b24ff.
599 * d-lang.cc (d_init_options): Remove initialization of updated fields.
600 (d_handle_option): Adjust for new field types.
601
602 2020-06-07 Iain Buclaw <ibuclaw@gdcproject.org>
603
604 * dmd/MERGE: Merge upstream dmd cef1e7991.
605 * d-lang.cc (d_parse_file): Adjust for new field types.
606
607 2020-06-05 Iain Buclaw <ibuclaw@gdcproject.org>
608
609 * dmd/MERGE: Merge upstream dmd 740f3d1ea.
610 * d-lang.cc (d_handle_option): Use new fields to save debug and
611 version levels passed over command-line.
612 (d_post_options): Add them to front-end here.
613
614 2020-06-05 Iain Buclaw <ibuclaw@gdcproject.org>
615
616 * dmd/MERGE: Merge upstream dmd f5638c7b8.
617 * d-builtins.cc (d_init_versions): Use new CHECKENABLE enum.
618 * d-codegen.cc (array_bounds_check): Likewise.
619 (build_frame_type): Likewise.
620 (get_frameinfo): Likewise.
621 * d-lang.cc (d_init_options): Likewise.
622 (d_init_options_struct): Don't initialize x_flag_bounds_check.
623 (d_handle_option): Use new CHECKENABLE enum.
624 (d_post_options): Likewise. Set flag_bounds_check here.
625 * expr.cc (ExprVisitor::visit(AssertExp *)): Use new CHECKENABLE enum.
626
627 2020-06-05 Iain Buclaw <ibuclaw@gdcproject.org>
628
629 * dmd/MERGE: Merge upstream dmd 56f0a65c4.
630 * d-builtins.cc (build_frontend_type): Remove static.
631 (d_build_builtins_module): Use target.va_listType() to get front-end
632 type for va_list.
633 (d_init_builtins): Move creation of va_list to Target::va_listType.
634 * d-codegen.cc (build_interface_binfo): Use new target global.
635 (build_vindex_ref): Likewise.
636 (identity_compare_p): Likewise.
637 * d-ctfloat.cc (CTFloat::parse): Likewise.
638 * d-lang.cc (d_init): Likewise.
639 * d-port.cc (Port::isFloat32LiteralOutOfRange): Likewise.
640 (Port::isFloat64LiteralOutOfRange): Likewise.
641 * d-target.cc (define_float_constants): Initialize constants through a
642 reference, instead of setting globals.
643 (Target::_init): Initialize new fields instead of setting globals.
644 (Target::va_listType): Build front-end type from va_list_type_node.
645 (Target::toCppMangle): Renamed to ...
646 (TargetCPP::toMangle): ... this.
647 (Target::cppTypeInfoMangle): Renamed to ...
648 (TargetCPP::typeInfoMangle): ... this.
649 (Target::cppTypeMangle): Renamed to ...
650 (TargetCPP::typeMangle): this.
651 (Target::cppParameterType): Renamed to ...
652 (TargetCPP::parameterType): ... this. Use target.va_listType() to get
653 front-end type for va_list.
654 (Target::cppFundamentalType): Renamed to ...
655 (TargetCPP::fundamentalType): ... this.
656 * d-tree.h (build_frontend_type): Declare.
657 * decl.cc (base_vtable_offset): Use new target global.
658 * typeinfo.cc (layout_classinfo_interfaces): Likewise.
659 (layout_cpp_typeinfo): Likewise.
660 * types.cc (valist_array_p): Use target.va_listType() to get front-end
661 type for va_list.
662 (layout_aggregate_type): Use new target global.
663
664 2020-06-05 Iain Buclaw <ibuclaw@gdcproject.org>
665
666 * dmd/MERGE: Merge upstream dmd 6d5bffa54.
667 * d-builtins.cc (maybe_set_builtin_1): Update call to
668 Condition::include().
669 * decl.cc (DeclVisitor::visit(AttribDeclaration *)): Likewise.
670 * types.cc (layout_aggregate_members): Likewise.
671
672 2020-06-04 Iain Buclaw <ibuclaw@gdcproject.org>
673
674 * dmd/MERGE: Merge upstream dmd 48d704f08.
675 * d-attribs.cc (build_attributes): Use new field name.
676 * d-builtins.cc (build_frontend_type): Likewise.
677 (maybe_set_builtin_1): Likewise.
678 (d_maybe_set_builtin): Likewise.
679 * d-codegen.cc (build_interface_binfo): Likewise.
680 (identity_compare_p): Likewise.
681 (lower_struct_comparison): Likewise.
682 (build_struct_comparison): Likewise.
683 (d_build_call): Likewise.
684 (build_frame_type): Likewise.
685 (build_closure): Likewise.
686 * d-compiler.cc (Compiler::paintAsType): Likewise.
687 (Compiler::loadModule): Likewise.
688 * d-incpath.cc (add_globalpaths): Likewise.
689 (add_filepaths): Likewise.
690 (add_import_paths): Likewise.
691 * d-lang.cc (deps_write): Likewise.
692 (d_parse_file): Likewise.
693 * decl.cc (gcc_attribute_p): Likewise.
694 (base_vtable_offset): Likewise.
695 (get_vtable_decl): Likewise.
696 (build_class_instance): Likewise.
697 * expr.cc (class ExprVisitor): Likewise.
698 * modules.cc (layout_moduleinfo_fields): Likewise.
699 (layout_moduleinfo): Likewise.
700 (build_module_tree): Likewise.
701 * toir.cc (class IRVisitor): Likewise.
702 * typeinfo.cc (class TypeInfoVisitor): Likewise.
703 (layout_classinfo_interfaces): Likewise.
704 * types.cc (layout_aggregate_members): Likewise.
705 (layout_aggregate_type): Likewise.
706
707 2020-06-04 Iain Buclaw <ibuclaw@gdcproject.org>
708
709 * dmd/MERGE: Merge upstream dmd 47ed0330f.
710
711 2020-06-04 Iain Buclaw <ibuclaw@gdcproject.org>
712
713 * Make-lang.in (D_OBJS): Add d-compiler.o, d-ctfloat.o, d-port.o.
714 * d-frontend.cc (Port::memicmp): Move to d-port.cc.
715 (Port::strupr): Likewise.
716 (Port::isFloat32LiteralOutOfRange): Likewise.
717 (Port::isFloat64LiteralOutOfRange): Likewise.
718 (Port::readwordLE): Likewise.
719 (Port::readwordBE): Likewise.
720 (Port::readlongLE): Likewise.
721 (Port::readlongBE): Likewise.
722 (Port::valcpy): Likewise.
723 (CTFloat::fabs): Move to d-ctfloat.cc.
724 (CTFloat::ldexp): Likewise.
725 (CTFloat::isIdentical): Likewise.
726 (CTFloat::isNaN): Likewise.
727 (CTFloat::isSNaN): Likewise.
728 (CTFloat::isInfinity): Likewise.
729 (CTFloat::parse): Likewise.
730 (CTFloat::sprint): Likewise.
731 (CTFloat::hash): Likewise.
732 (Compiler::genCmain): Move to d-compiler.cc.
733 (Compiler::paintAsType): Likewise.
734 (Compiler::loadModule): Likewise.
735 * d-compiler.cc: New file.
736 * d-ctfloat.cc: New file.
737 * d-port.cc: New file.
738
739 2020-06-02 Iain Buclaw <ibuclaw@gdcproject.org>
740
741 * decl.cc (DeclVisitor::build_dsymbol): New function.
742 (DeclVisitor::visit (TupleDeclaration *)): Use build_dsymbol to
743 traverse AST instead of accept.
744 (DeclVisitor::visit (AttribDeclaration *)): Likewise.
745 (DeclVisitor::visit (Nspace *)): Likewise.
746 (DeclVisitor::visit (TemplateDeclaration *)): Likewise.
747 (DeclVisitor::visit (TemplateInstance *)): Likewise.
748 (DeclVisitor::visit (TemplateMixin *)): Likewise.
749 (DeclVisitor::visit (StructDeclaration *)): Likewise.
750 (DeclVisitor::visit (ClassDeclaration *)): Likewise.
751 (DeclVisitor::visit (InterfaceDeclaration *)): Likewise.
752 (DeclVisitor::visit (VarDeclaration *)): Likewise.
753 (build_decl_tree): Likewise.
754
755 2020-06-02 Iain Buclaw <ibuclaw@gdcproject.org>
756
757 * d-builtins.cc (build_frontend_type): Handle struct fields with NULL
758 DECL_NAME. Use byte_position to get the real field offset.
759
760 2020-05-06 Iain Buclaw <ibuclaw@gdcproject.org>
761
762 PR d/94970
763 * d-codegen.cc (force_target_expr): Move create_temporary_var
764 implementation inline here.
765 (create_temporary_var): Remove.
766 (maybe_temporary_var): Remove.
767 (bind_expr): Remove.
768 * d-convert.cc (d_array_convert): Use build_local_temp to generate
769 temporaries, and generate its assignment.
770 * d-tree.h (create_temporary_var): Remove.
771 (maybe_temporary_var): Remove.
772 (d_array_convert): Remove vars argument.
773 * expr.cc (ExprVisitor::visit (CatExp *)): Use build_local_temp to
774 generate temporaries, don't wrap them in a BIND_EXPR.
775 (ExprVisitor::visit (NewExp *)): Likewise.
776
777 2020-04-30 Iain Buclaw <ibuclaw@gdcproject.org>
778
779 * gdc.texi (Options for Linking): Clarify usage of -defaultlib= and
780 -debuglib= options.
781
782 2020-04-29 Iain Buclaw <ibuclaw@gdcproject.org>
783
784 * d-codegen.cc (d_decl_context): Don't include module in the name of
785 class and struct types that aren't extern(D).
786
787 2020-04-27 Iain Buclaw <ibuclaw@gdcproject.org>
788
789 PR d/94777
790 * d-builtins.cc (build_frontend_type): Set parent for generated
791 fields of built-in types.
792 * d-codegen.cc (argument_reference_p): Rename to ...
793 (parameter_reference_p): ... this.
794 (type_passed_as): Rename to ...
795 (parameter_type): ... this. Make TREE_ADDRESSABLE types restrict.
796 (d_build_call): Move handling of non-POD types here from ...
797 * d-convert.cc (convert_for_argument): ... here.
798 * d-tree.h (argument_reference_p): Rename declaration to ...
799 (parameter_reference_p): ... this.
800 (type_passed_as): Rename declaration to ...
801 (parameter_type): ... this.
802 * types.cc (TypeVisitor::visit (TypeFunction *)): Update caller.
803
804 2020-04-26 Iain Buclaw <ibuclaw@gdcproject.org>
805
806 * decl.cc (get_symbol_decl): Set DECL_DECLARED_INLINE_P or
807 DECL_UNINLINABLE for declarations with pragma(inline).
808 * toir.cc (IRVisitor::visit (GccAsmStatement *)): Set ASM_INLINE_P if
809 in function decorated with pragma(inline).
810
811 2020-04-25 Iain Buclaw <ibuclaw@gdcproject.org>
812
813 * intrinsics.cc (expand_intrinsic_toprec): New function.
814 (maybe_expand_intrinsic): Handle toPrec intrinsics.
815 * intrinsics.def (TOPRECF, TOPREC, TOPRECL): Add toPrec intrinsics.
816
817 2020-04-24 Iain Buclaw <ibuclaw@gdcproject.org>
818
819 * d-spec.cc (need_phobos): Remove.
820 (lang_specific_driver): Replace need_phobos with phobos_library.
821 Reorder -debuglib and -defaultlib to have precedence over libphobos.
822 (lang_specific_pre_link): Remove test for need_phobos.
823
824 2020-04-19 Iain Buclaw <ibuclaw@gdcproject.org>
825
826 PR d/94609
827 * d-codegen.cc (argument_reference_p): Don't check TREE_ADDRESSABLE.
828 (type_passed_as): Build reference type if TREE_ADDRESSABLE.
829 * d-convert.cc (convert_for_argument): Build explicit TARGET_EXPR if
830 needed for arguments passed by invisible reference.
831 * types.cc (TypeVisitor::visit (TypeStruct *)): Mark all structs that
832 are not POD as TREE_ADDRESSABLE.
833
834 2020-04-13 Iain Buclaw <ibuclaw@gdcproject.org>
835
836 * Make-lang.in (D_FRONTEND_OBJS): Remove d/argtypes.o.
837 * d-target.cc (Target::toArgTypes): New function.
838
839 2020-04-10 Iain Buclaw <ibuclaw@gdcproject.org>
840
841 * d-spec.cc (LIBDRUNTIME): Remove.
842 (LIBDRUNTIME_PROFILE): Remove.
843 (lang_specific_driver): Don't link in libgdruntime.
844
845 2020-04-07 Iain Buclaw <ibuclaw@gdcproject.org>
846
847 PR d/94425
848 * toir.cc (IRVisitor::visit (GccAsmStatement *)): Set ASM_VOLATILE_P
849 on all asm statements.
850
851 2020-04-01 Iain Buclaw <ibuclaw@gdcproject.org>
852
853 PR d/90136
854 * d-attribs.cc: Include dmd/attrib.h.
855 (build_attributes): Redeclare as static.
856 (apply_user_attributes): New function.
857 * d-tree.h (class UserAttributeDeclaration): Remove.
858 (build_attributes): Remove.
859 (apply_user_attributes): Declare.
860 (finish_aggregate_type): Remove attrs argument.
861 * decl.cc (get_symbol_decl): Merge declaration prototypes with
862 definitions. Use apply_user_attributes.
863 * modules.cc (layout_moduleinfo_fields): Remove last argument to
864 finish_aggregate_type.
865 * typeinfo.cc (layout_classinfo_interfaces): Likewise.
866 * types.cc (layout_aggregate_members): Likewise.
867 (finish_aggregate_type): Remove attrs argument.
868 (TypeVisitor::visit (TypeEnum *)): Use apply_user_attributes.
869 (TypeVisitor::visit (TypeStruct *)): Remove last argument to
870 finish_aggregate_type. Use apply_user_attributes.
871 (TypeVisitor::visit (TypeClass *)): Likewise.
872
873 2020-03-31 Iain Buclaw <ibuclaw@gdcproject.org>
874
875 * d-attribs.cc (d_langhook_common_attribute_table): Add always_inline.
876 (handle_always_inline_attribute): New function.
877
878 2020-03-31 Iain Buclaw <ibuclaw@gdcproject.org>
879
880 PR d/94424
881 * d-codegen.cc (build_alignment_field): Remove.
882 (build_struct_literal): Don't insert alignment padding.
883 * expr.cc (ExprVisitor::visit (AssignExp *)): Call memset before
884 assigning struct literals.
885
886 2020-03-31 Iain Buclaw <ibuclaw@gdcproject.org>
887
888 * typeinfo.cc (TypeInfoVisitor::internal_reference): Call
889 d_comdat_linkage on generated decl.
890
891 2020-03-22 Iain Buclaw <ibuclaw@gdcproject.org>
892
893 PR d/93038
894 * d-lang.cc (deps_write): Generate phony targets for content imported
895 files.
896
897 2020-03-22 Iain Buclaw <ibuclaw@gdcproject.org>
898
899 PR d/93038
900 * d-lang.cc (deps_write): Add content imported files to the make
901 dependency list.
902
903 2020-03-21 Iain Buclaw <ibuclaw@gdcproject.org>
904
905 PR d/94240
906 * typeinfo.cc (class TypeInfoVisitor): Replace type_ field with decl_.
907 (TypeInfoVisitor::TypeInfoVisitor): Set decl_.
908 (TypeInfoVisitor::result): Update.
909 (TypeInfoVisitor::internal_reference): New function.
910 (TypeInfoVisitor::layout_string): Use internal_reference.
911 (TypeInfoVisitor::visit (TypeInfoTupleDeclaration *)): Likewise.
912 (layout_typeinfo): Construct TypeInfoVisitor with typeinfo decl.
913 (layout_classinfo): Likewise.
914
915 2020-03-20 Iain Buclaw <ibuclaw@gdcproject.org>
916
917 PR lto/91027
918 * d-tree.h (struct GTY): Add daggregate field.
919 (IDENTIFIER_DAGGREGATE): Define.
920 (d_mangle_decl): Add declaration.
921 * decl.cc (mangle_decl): Remove static linkage, rename to...
922 (d_mangle_decl): ...this, update all callers.
923 * types.cc (merge_aggregate_types): New function.
924 (TypeVisitor::visit (TypeStruct *)): Call merge_aggregate_types, set
925 IDENTIFIER_DAGGREGATE and TYPE_CXX_ODR_P.
926 (TypeVisitor::visit (TypeClass *)): Likewise.
927
928 2020-03-18 Jakub Jelinek <jakub@redhat.com>
929
930 * expr.cc (ExprVisitor::visit (CatAssignExp *)): Fix up duplicated
931 word issue in a comment.
932 * d-target.cc (Target::FPTypeProperties<T>::max): Likewise.
933
934 2020-03-16 Iain Buclaw <ibuclaw@gdcproject.org>
935
936 PR d/92309
937 * types.cc (fixup_anonymous_offset): Don't set DECL_FIELD_OFFSET on
938 anonymous fields.
939
940 2020-03-16 Iain Buclaw <ibuclaw@gdcproject.org>
941
942 PR d/92216
943 * decl.cc (make_thunk): Don't set TREE_PUBLIC on thunks if the target
944 function is external to the current compilation.
945
946 2020-01-01 Jakub Jelinek <jakub@redhat.com>
947
948 Update copyright years.
949
950 * gdc.texi: Bump @copyrights-d year.
951 \f
952 Copyright (C) 2020 Free Software Foundation, Inc.
953
954 Copying and distribution of this file, with or without modification,
955 are permitted in any medium without royalty provided the copyright
956 notice and this notice are preserved.