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