]> gcc.gnu.org Git - gcc.git/blame - gcc/fortran/ChangeLog
re PR fortran/72714 ([Coarray] ICE in gfc_array_init_size, at fortran/trans-array...
[gcc.git] / gcc / fortran / ChangeLog
CommitLineData
1e83b120
TK
12019-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
2
3 PR fortran/72714
4 Backport from trunk
5 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
6
c867f658
HA
72019-03-03 Harald Anlauf <anlauf@gmx.de>
8
9 Backport from trunk
10 PR fortran/89077
11 * decl.c (gfc_set_constant_character_len): Clear original string
12 representation after padding has been performed to target length.
13 * resolve.c (gfc_resolve_substring_charlen): Check substring
14 length for constantness prior to general calculation of length.
15
8546491e
HA
162019-03-03 Harald Anlauf <anlauf@gmx.de>
17 Steven G. Kargl <kargl@gcc.gnu.org>
18
19 Backport from trunk
20 PR fortran/77583
21 * symbol.c (check_conflict): Check for valid procedure name
22 passed to error reporting routine.
23
e9d86220
TK
242019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
25
26 PR fortran/89174
27 Backport from trunk
28 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
29 to garguments. If we are dealing with a MOLD, call
30 gfc_expr_to_initialize().
31 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
32 to gfc_find_and_cut_at_last_class_ref.
33 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
34 argument is_mold with default false.
35
8517f286
TK
362019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
37
38 PR fortran/87689
39 Backport from trunk
40 * gfortran.dg/lto/20091028-1_0.f90: Add -Wno-lto-type-mismatch to
41 options.
42 * gfortran.dg/lto/20091028-2_0.f90: Likewise.
43 * gfortran.dg/lto/pr87689_0.f: New file.
44 * gfortran.dg/lto/pr87689_1.f: New file.
45 * gfortran.dg/altreturn_9_0.f90: New file.
46 * gfortran.dg/altreturn_9_1.f90: New file.
47
70a671cd
JD
482019-03-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
49
50 Backport from trunk
51 PR fortran/84387
52 * trans-io.c (transfer_expr): Do not return if there are no
53 components to the derived type or class.
54
8eecc0e4
HA
552019-03-02 Harald Anlauf <anlauf@gmx.de>
56
57 Backport from trunk
58 PR fortran/89516
59 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
60 where storage size of elements of MOLD is 0.
61
62 PR fortran/89492
63 * check.c (gfc_calculate_transfer_sizes): Handle cases where
64 storage size of elements of MOLD is 0.
65
66 PR fortran/89266
67 PR fortran/88326
68 * target-memory.c (gfc_element_size): Return false if element size
69 cannot be determined; element size is returned separately.
70 (gfc_target_expr_size): Return false if expression size cannot be
71 determined; expression size is returned separately.
72 * target-memory.h: Adjust prototypes.
73 * check.c (gfc_calculate_transfer_sizes): Adjust references to
74 gfc_target_expr_size, gfc_element_size.
75 * arith.c (hollerith2representation): Likewise.
76 * class.c (find_intrinsic_vtab): Likewise.
77 * simplify.c (gfc_simplify_sizeof): Likewise.
78
ec020ecf
TK
792019-02-23 Thomas Koenig <tkoenig@gcc.gnu.org>
80
81 PR fortran/86119
82 Backport from trunk
83 * class.c (gfc_get_len_component): Add argument k for kind.
84 If the kind of the resulting expression is not equal to k,
85 convert it.
86 * gfortran.h (gfc_len_component): Adjust prototype.
87 * simplify.c (gfc_simplify_len): Pass kind to
88 gfc_get_len_component.
89
da1ea873
PT
902019-02-23 Paul Thomas <pault@gcc.gnu.org>
91
92 Backport from trunk
93 PR fortran/88117
94 * resolve.c (deferred_op_assign): Return if the lhs expression
95 has the pointer attribute.
96
d4a61138
TK
972019-02-22 Thomas Koenig <tkoenig@gcc.gnu.org>
98
99 PR fortran/71066
100 Backport from trunk
101 * trans-decl.c (generate_coarray_sym_init): For an array
102 constructor in a DATA statement of a coarray variable, set the
103 rank to 1 to avoid confusion later on. If the constructor
104 contains only one value, use that for initiailizig.
105
4c44b708
GA
1062019-02-22 Release Manager
107
108 * GCC 8.3.0 released.
109
d8ead5d1
HA
1102019-02-10 Harald Anlauf <anlauf@gmx.de>
111
112 Backport from trunk
113 PR fortran/89077
114 * decl.c (add_init_expr_to_sym): Copy length of string initializer
115 to declared symbol.
116
49c45748
TK
1172019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
118
119 PR fortran/71237
120 Backport from trunk
121 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
122 looking at an init expression, issue error if the target is not a
123 TARGET and we are not looking at a procedure pointer.
124 * gfortran.h (gfc_check_assign): Add optional argument
125 is_init_expr.
126
151a3e4e
JJ
1272019-02-07 Jakub Jelinek <jakub@redhat.com>
128
129 Backported from mainline
fd0e6668
JJ
130 2019-02-01 Jakub Jelinek <jakub@redhat.com>
131
132 PR fortran/83246
133 PR fortran/89084
134 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
135 if sym->ns->construct_entities rather than if
136 sym->ns->parent->code->op == EXEC_BLOCK.
137
151a3e4e
JJ
138 2019-01-19 Jakub Jelinek <jakub@redhat.com>
139
140 PR fortran/88902
141 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
142 or parent function if it has been added there already.
143
cc04395d
TK
1442019-02-05 Thomas Koenig <tkoenig@gcc.gnu.org>
145
146 PR fortran/67679
147 Backport from trunk
148 * trans-array.c (gfc_array_allocate): For setting the bounds on
149 the new array, add a condition for a not previously allocated
150 variable.
151
625185ef
PT
1522019-02-03 Paul Thomas <pault@gcc.gnu.org>
153
154 Backport from trunk
155 PR fortran/88393
156 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
157 passed in parentheses to class formals, invert the order of
158 copying allocatable components to taking the _data of the
159 class expression.
160
1612019-02-03 Paul Thomas <pault@gcc.gnu.org>
1ff97ef8
PT
162
163 Backport from trunk
164 PR fortran/88980
165 * trans-array.c (gfc_array_init_size): Add element_size to the
166 arguments.
167 (gfc_array_allocate): Remove the recalculation of the size of
168 the element and use element_size from the call to the above.
169 Unconditionally set the span field of the descriptor.
170
242e0978
PT
1712019-02-03 Paul Thomas <pault@gcc.gnu.org>
172
173 Backport from trunk
174 PR fortran/88685
175 * expr.c (is_subref_array): Move the check for class pointer
176 dummy arrays to after the reference check. If we haven't seen
177 an array reference other than an element and a component is not
178 class or derived, return false.
179
a7c0dded
TK
1802019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
181
182 PR fortran/88298
183 Backport from trunk
184 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
185 * gfortran.h (gfc_expr): Add flag do_not_warn.
186 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
187 no warning is desired.
188
08cc146f
TK
1892019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
190
191 PR fortran/57048
192 Backport from trunk
193 * interface.c (gfc_compare_types): If a derived type and an
194 integer both have a derived type, and they are identical,
195 this is a C binding type and compares equal.
196
bfb5990c
PT
1972019-01-27 Paul Thomas <pault@gcc.gnu.org>
198
199 Backport from trunk
200 PR fortran/56386
201 PR fortran/58906
202 PR fortran/77385
203 PR fortran/80260
204 PR fortran/82077
205 * resolve.c (resolve_variable): Fix up expressions with array
206 associate names, where the parser did not detect that this is
207 array and there was no array part_ref in the expression.
208 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): base_expr
209 should be a copy of e and not the initialization expr.
210
ece82783
PT
2112019-01-25 Paul Thomas <pault@gcc.gnu.org>
212
213 PR fortran/87336
214 * trans-array.c (gfc_get_array_span): Try to get the element
215 length of incomplete types. Return NULL_TREE otherwise.
216 (gfc_conv_expr_descriptor): Only set the 'span' field if the
217 above does not return NULL_TREE. Set 'span' field if possible
218 for all new descriptors.
219
e79f8517
SK
2202019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
221
222 PR fortran/81849
223 * resolve.c (resolve_symbol): Host associated varaibles can appear
224 in the specification statement of a RESULT array.
225
b6fa56ee
DH
2262019-01-15 Dominique d'Humieres <dominiq@gcc.gnu.org>
227
228 PR fortran/88803
229 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
230
d8ddd1be
SK
2312019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
232
233 PR fortran/35031
234 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
235 mis-indentation.
236
71366bd6
JJ
2372019-01-08 Jakub Jelinek <jakub@redhat.com>
238
239 Backported from mainline
cce88ff3
JJ
240 2018-12-12 Jakub Jelinek <jakub@redhat.com>
241
242 PR fortran/88463
243 * trans-openmp.c (gfc_omp_predetermined_sharing): Handle TREE_READONLY
244 VAR_DECLs with DECL_EXTERNAL like those with TREE_STATIC.
245
71366bd6
JJ
246 2018-12-07 Jakub Jelinek <jakub@redhat.com>
247
248 PR fortran/88377
249 * trans-openmp.c (gfc_omp_clause_default_ctor,
250 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
251 gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
252 GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
253 have pointer type.
254
3b6e3d87
PT
2552018-12-23 Paul Thomas <pault@gcc.gnu.org>
256
257 Backport from trunk
258 PR fortran/77703
259 * resolve.c (get_temp_from_expr): Use the string length of
260 constant character expressions.
261
6e5c3b82
PT
2622018-12-23 Paul Thomas <pault@gcc.gnu.org>
263
264 Backport from trunk
265 PR fortran/77325
266 * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
267 rhs has a charlen expression, convert that and use it.
268 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
269 assignment of deferred character array vars to a realocatable
270 lhs should not be added to the exterior block since vector
271 indices, for example, generate temporaries indexed within the
272 loop.
273
38f63261
SK
2742018-12-22 Steven G . Kargl <kargl@gcc.gnu.org>
275
276 PR fortran/85798
277 * decl.c (gfc_match_data): If a component of a derived type entity
278 appears in data statement, check that does not have the allocatable
279 attribute.
6e5c3b82 280
803458db
TK
2812018-12-22 Thomas Koenig <tkoenig@gcc.gnu.org>
282
283 Backport from trunk
284 PR fortran/85544
285 * frontend-passes.c (optimize_power): Remove.
286 (optimize_op): Remove call to optimize_power.
287 * trans-expr.c (gfc_conv_power_op): Handle cases of 1**integer,
288 (2|4|8|16) ** integer and (-1) ** integer.
289
b198616b
SK
2902018-12-22 Steven G. Kargl <kargl@gcc.gnu.org>
291
292 PR fortran/88169
293 * module.c (mio_namelist): Remove an error condition/message that
294 is contrary to the Fortran standard.
295
31dc21eb
PT
2962018-12-21 Paul Thomas <pault@gcc.gnu.org>
297
298 PR fortran/87359
299 * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
300 introduced by r264358, which prevented components of associate
301 names from being reallocated on assignment.
302
a2bf1fd7
SK
3032018-12-16 Steven G. Kargl <kargl@gcc.gnu.org>
304
305 PR fortran/88116
306 PR fortran/88467
307 * array.c (gfc_match_array_constructor): Check return value of
308 gfc_convert_type(). Skip constructor elements with BT_UNKNOWN,
309 which need to go through resolution.
310 * intrinsic.c (gfc_convert_type_warn): Return early if the types
311 martch (i.e., no conversion is required).
312 * simplify.c (gfc_convert_constant): Remove a gfc_internal_error,
313 and return gfc_bad_expr.
314
c0b003d0
SK
3152018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
316
317 PR fortran/88138
318 * decl.c (variable_decl): Check that a derived isn't being assigned
319 an incompatible entity in an initialization.
31dc21eb 320
1e8efa75
SK
3212018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
322
323 PR fortran/88155
324 * primary.c (gfc_match_structure_constructor): Set the locus of
325 an expression to avoid a NULL pointer dereference.
326
03897611
SK
3272018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
328
329 PR fortran/88249
330 * gfortran.h: Update prototype for gfc_resolve_filepos().
331 * io.c (gfc_resolve_filepos): Check for UNIT number if ERR= is present.
332 Use passed in locus for error message.
333 * resolve.c (gfc_resolve_code): Pass locus in gfc_resolve_filepos()
334 call.
335
6a87be76
SK
3362018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
337
338 PR fortran/87922
339 * io.c (gfc_match_open): Additional checks on ASYNCHRONOUS.
340
64ea4808
SK
3412018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
342
343 PR fortran/88269
344 * io.c (io_constraint): Update macro. If locus line buffer is NULL,
345 use gfc_current_locus in error messages.
346 (check_io_constraints): Catch missing IO UNIT in write and read
347 statements. io_constraint macro is incompatible here.
348
f5cf6059
SK
3492018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
350
351 PR fortran/88205
352 * io.c (gfc_match_open): Move NEWUNIT checks to after STATUS checks.
353
9537adfe
SK
3542018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
355
356 PR fortran/88206
357 * match.c (gfc_match_type_spec): REAL can be an intrinsic function.
358
923d7e39
SK
3592018-12-09 Fritz Reese <fritzoreese@gmail.com>
360
361 PR fortran/88228
362 * resolve.c (resolve_operator): Do not call resolve_function.
363 Break like other cases.
364
a6027f8c
SK
3652018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
366
367 PR fortran/88048
368 * resolve.c (check_data_variable): Named constant cannot be a
369 data object.
370
b3f5cadb
SK
3712018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
372
373 PR fortran/88025
374 * expr.c (gfc_apply_init): Remove asserts that cannot trigger.
375 Check for a NULL pointer.
376
74487f5c
TK
3772018-11-25 Thomas Koenig <tkoenig@gcc.gnu.org>
378
379 Backport from trunk
380 PR fortran/88073
381 * frontend-passes.c (combine_array_constructor): Do not do
382 anything if in a WHERE statement.
383
bbdef456
PT
3842018-11-24 Paul Thomas <pault@gcc.gnu.org>
385
386 Backport from trunk
387 PR fortran/88143
388 * resolve.c (resolve_variable): Check for associate names with
389 NULL target.
390
19349207
JJ
3912018-11-05 Jakub Jelinek <jakub@redhat.com>
392
393 Backported from mainline
394 2018-10-25 Jakub Jelinek <jakub@redhat.com>
395
396 PR fortran/87725
397 * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
398 nonmonotonic modifiers regardless of if they have been parsed
399 already or if the opposite one has. Fix up check whether
400 comma after modifier should be parsed.
401 (resolve_omp_clauses): Diagnose schedule modifier restrictions.
402
2af2edf9 4032019-11-03 Tobias Burnus <burnus@net-b.de>
19349207 404 Thomas Koenig <tkoenig@gcc.gnu.org>
2af2edf9
TB
405
406 Backport from trunk
407 PR fortran/87597
408 * expr.c (gfc_simplify_expr): Avoid simplifying
409 the 'array' argument to lbound/ubound/lcobound/
410 ucobound.
411
4867d759
PT
4122018-10-08 Paul Thomas <pault@gcc.gnu.org>
413
414 PR fortran/83999
415 Backport from trunk
416 * resolve.c (resolve_fl_procedure): Include class functions in
417 the test that elemental function results be scalar.
418
7b6eeffd
PT
4192018-10-08 Paul Thomas <pault@gcc.gnu.org>
420
421 Backport from trunk
422 PR fortran/86372
423 * trans-stmt.c (trans_associate_var): Character associate names
424 with variable string length do not have to be deferred length
425 for the string length to be set, if variable.
426
42105025
TK
4272018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
428
7b6eeffd 429 PR fortran/86111
42105025 430 Backport from trunk
7b6eeffd
PT
431 * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
432 * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
433 (gfc_arith_concat): If the types of op1 and op2 are not
434 character of if their kinds do not match, issue ARITH_WRONGCONCAT.
42105025 435
dd71307f
JW
4362018-09-18 Janus Weil <janus@gcc.gnu.org>
437
438 Backport from trunk
439 PR fortran/85395
440 * decl.c (match_binding_attributes): Use correct default accessibility
441 for procedure pointer components.
442
fa2128cb
JW
4432018-09-18 Janus Weil <janus@gcc.gnu.org>
444
445 Backport from trunk
446 PR fortran/86830
447 * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
448 with non-polymorphic objects.
449
9856bb90
PT
4502018-09-18 Paul Thomas <pault@gcc.gnu.org>
451
452 Backported from trunk
453 PR fortran/85954
454 * resolve.c (resolve_assoc_var): If the target expression is a
455 deferred charlen dummy and the associate name shares the
456 charlen, generate a new one. Make sure that new charlens are in
457 the namespace list so that they get cleaned up.
458 * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
459 not reallocatable.
460 * trans-decl.c (gfc_get_symbol_decl): Put deferred character
461 length dummy and result arrays on the deferred initialization
462 list so that the variable length arrays can be correctly dealt
463 with.
464 * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
465 NULL rather than ICEing.
466
c09bc715
PT
4672018-09-12 Paul Thomas <pault@gcc.gnu.org>
468
469 Backported from trunk
470 PR fortran/87284
471 * trans-expr.c (gfc_trans_class_init_assign): Access to
472 to array elements of the dynamic type requires that the array
473 reference be added to the class expression and not the _data
474 component, unlike scalar expressions.
475
c4d38471
PT
4762018-09-11 Paul Thomas <pault@gcc.gnu.org>
477
478 Backported from trunk
479 PR fortran/87277
480 * expr.c (is_subref_array): Add the check of dimensionality for
481 class, dummy, pointer arrays.
482
a0fff4c4
JW
4832018-09-05 Janus Weil <janus@gcc.gnu.org>
484
485 Backported from trunk
486 PR fortran/86116
487 * interface.c (compare_type): Remove a CLASS/TYPE check.
488 (compare_type_characteristics): New function that behaves like the old
489 'compare_type'.
490 (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
491 Call 'compare_type_characteristics' instead of 'compare_type'.
492
afe13a41
JD
4932018-09-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
494
495 * simplify.c (gfc_simplify_modulo): Re-arrange code to test
496 whether 'P' is zero and issue an error if it is.
497
bc35aae0
PT
4982018-09-01 Paul Thomas <pault@gcc.gnu.org>
499
500 PR fortran/86328
501 PR fortran/86760
502 * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
503 info->descriptor but pass it directly to gfc_build_array_ref.
504 (gfc_conv_array_ref): Likewise for se->expr.
505 * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
506 obtain the span field directly from it.
507
3911571d
TK
5082018-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
509
510 Backport from trunk
511 PR fortran/86837
512 * frontend-passes.c (var_in_expr_callback): New function.
513 (var_in_expr): New function.
514 (traverse_io_block): Use var_in_expr instead of
515 gfc_check_dependency for checking if the variable depends on the
516 previous interators.
517
5efd6bce
PT
5182018-08-12 Paul Thomas <pault@gcc.gnu.org>
519
520 Backported from trunk
521 PR fortran/86906
522 * resolve.c (resolve_fl_variable_derived): Check if the derived
523 type is use associated before checking for the host association
524 error.
525
b1f88ff2
JJ
5262018-07-26 Jakub Jelinek <jakub@redhat.com>
527
528 Backported from mainline
529 2018-07-10 Jakub Jelinek <jakub@redhat.com>
530
531 PR fortran/86421
532 * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
533 _UVAL suffixes.
534 (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
535 on linear clauses. Initialize n->where to gfc_current_locus.
536
ddeb81e7
GA
5372018-07-26 Release Manager
538
539 * GCC 8.2.0 released.
540
0036d193
FR
5412018-07-16 Fritz Reese <fritzoreese@gmail.com>
542
543 PR fortran/83184
544 Backport from trunk.
545 * decl.c (match_old_style_init): Initialize locus of variable expr when
546 creating a data variable.
547 (match_clist_expr): Verify array is explicit shape/size before
548 attempting to allocate constant array constructor.
549
674c2cac
FR
5502018-07-16 Fritz Reese <fritzoreese@gmail.com>
551
552 Backport from trunk:
553
554 PR fortran/86417
555 * module.c (mio_component): Set component->loc when loading from module.
556
557 PR fortran/83183
558 PR fortran/86325
559 * expr.c (class_allocatable, class_pointer, comp_allocatable,
560 comp_pointer): New helpers.
561 (component_initializer): Generate EXPR_NULL for allocatable or pointer
562 components. Do not generate initializers for components within BT_CLASS.
563 Do not assign to comp->initializer.
564 (gfc_generate_initializer): Use new helpers; move code to generate
565 EXPR_NULL for class allocatable components into component_initializer().
566
ff9b55e2
PT
5672018-07-02 Paul Thomas <pault@gcc.gnu.org>
568
569 PR fortran/82969
570 PR fortran/86242
571 * trans-array.c (structure_alloc_comps): Do not explicitly copy
572 procedure pointer components.
573
945b9c9e
FR
5742018-06-28 Fritz Reese <fritzoreese@gmail.com>
575
576 PR fortran/82865
577 Backport from trunk.
578 * decl.c (gfc_match_type): Refactor and check for PDT declarations.
579
40a4fc21
FR
5802018-06-25 Fritz Reese <fritzoreese@gmail.com>
581
582 PR fortran/82972
583 PR fortran/83088
584 PR fortran/85851
585 Backport from trunk.
586 * expr.c (component_initializer): Assign init expr to c->initializer.
587 (generate_isocbinding_initializer): New.
588 (gfc_generate_initializer): Call generate_isocbinding_initializer to
589 generate initializers for c_ptr and c_funptr with -finit-derived.
590
0ea08d38
PT
5912018-06-25 Paul Thomas <pault@gcc.gnu.org>
592
593 PR fortran/83118
594 Back port from trunk
595 * resolve.c (resolve_ordinary_assign): Force the creation of a
596 vtable for assignment of non-polymorphic expressions to an
597 unlimited polymorphic object.
598 * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
599 size of the rhs type for such assignments. Set the dtype, _len
600 and vptrs appropriately.
601 * trans-expr.c (gfc_trans_assignment): Force the use of the
602 _copy function for these assignments.
603
53f37cfe
CP
6042018-06-15 Cesar Philippidis <cesar@codesourcery.com>
605
606 Backport from mainline
607 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
608
609 PR fortran/85703
610 * parse.c (decode_oacc_directive): Set gfc_matching_function
611 to false.
612 (decode_omp_directive): Likewise.
613
3a8d6494
CP
6142018-06-15 Cesar Philippidis <cesar@codesourcery.com>
615
616 Backport from mainline
617 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
618
619 PR fortran/85702
620 * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
621
26a5c9ea
CP
6222018-06-15 Cesar Philippidis <cesar@codesourcery.com>
623
624 Backport from mainline
625 2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
626
627 PR fortran/85701
628 * openmp.c (gfc_resolve_oacc_declare): Error on functions and
629 subroutine data clause arguments.
630
c575c6d2
SK
6312018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
632
633 PR fortran/86110
0ea08d38 634 * array.c (gfc_resolve_character_array_constructor): Avoid NULL
c575c6d2
SK
635 pointer dereference.
636
09c6ee64
SK
6372018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
638
639 PR fortran/44491
640 * expr.c (gfc_check_assign): Select non-NULL locus.
641
04d26d0e
SK
6422018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
643
644 PR fortran/85138
645 PR fortran/85996
646 PR fortran/86051
647 * decl.c (gfc_match_char_spec): Use private namespace in attempt to
648 reduce a charlen to a constant.
649
994774fc
SK
6502018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
651
652 PR fortran/86059
653 * array.c (match_array_cons_element): NULL() cannot be in an
654 array constructor.
655
3068f997
SK
6562018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
657
658 PR fortran/63514
659 * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
660
211f93e3
SK
6612018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
662
663 PR fortran/78278
664 Committed as part of r261364
665 * data.c (gfc_assign_data_value): Re-arrange code to allow for
666 an error for double initialization of CHARACTER entities.
667
68d2262f
SK
6682018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
669
670 PR fortran/38351
671 * resolve.c (resolve_operator): Provide better error message for
672 derived type entity used in an binary intrinsic numeric operator.
673
fe4f79c0
SK
6742018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
675
676 PR fortran/78571
677 * data.c (create_character_initializer): Return early if type is
678 incompatible with CHARACTER.
679
84f486e7
TK
6802018-06-09 Thomas Koenig <tkoenig@gcc.gnu.org>
681
682 PR fortran/85631
683 Backport from trunk.
684 * trans.h (gfc_ss): Add field no_bounds_check.
685 * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
686 ss->no_bounds_check is set, do not use runtime checks.
687 * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
688 for reallocatable lhs.
689
638fab73
SK
6902018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
691
692 PR fortran/86045
693 Backport from trunk.
694 * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
695 'P' is zero and issue an error if it is.
696
83b578b1
TK
6972018-06-07 Thomas Koenig <tkoenig@gcc.gnu.org>
698
699 PR fortran/85641
700 Backport from trunk.
701 * frontend-passes.c (is_fe_temp): Add prototype.
702 (realloc_string_callback): Early return for frontend-generated
703 temporary.
704
463f60d0
SK
7052018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
706
707 PR fortran/85981
708 * resolve.c (resolve_allocate_deallocate): Check errmsg is default
709 character kind.
710
ad0fbf0d
SK
7112018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
712
713 PR fortran/85786
714 * trans-intrinsic.c (gfc_conv_associated): Add arg1se to the block.
715
43de19a6
SK
7162018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
717
718 PR fortran/85895
719 Backport from trunk
720 * resolve.c (resolve_sync): Resolve expression before checking for
721 an error.
722
16d584b3
SK
7232018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
724
725 PR fortran/85780
726 Backport from trunk
727 * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
728
6505ea02
SK
7292018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
730
731 PR fortran/85779
732 Backport from trunk
733 * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
734
d7a19075
SK
7352018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
736
737 PR fortran/85543
738 Backport from trunk
739 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
740 pointer dereference.
741
9d7cd37c
PT
7422018-05-20 Paul Thomas <pault@gcc.gnu.org>
743
744 PR fortran/80657
745 Backport from trunk
746 * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
747 test for self refs to the function result in the character len
748 expression. If a self reference is found, emit an error and
749 return true.
750 (resolve_fntype): Use the function symbol in the calls to the
751 above.
752
9b2b4766
PT
7532018-05-20 Paul Thomas <pault@gcc.gnu.org>
754
755 PR fortran/49636
756 Backport from trunk
757 * trans-array.c (gfc_get_array_span): Renamed from
758 'get_array_span'.
759 (gfc_conv_expr_descriptor): Change references to above.
760 * trans-array.h : Add prototype for 'gfc_get_array_span'.
761 * trans-stmt.c (trans_associate_var): If the associate name is
762 a subref array pointer, use gfc_get_array_span for the span.
763
3ddfcb23
PT
7642018-05-20 Paul Thomas <pault@gcc.gnu.org>
765
766 PR fortran/82275
767 Backport from trunk
768 * match.c (gfc_match_type_spec): Go through the array ref and
769 decrement 'rank' for every dimension that is an element.
770
65e3cafd
PT
7712018-05-19 Paul Thomas <pault@gcc.gnu.org>
772
773 PR fortran/82923
774 PR fortran/66694
775 PR fortran/82617
776 Backport from trunk
777 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
778 charlen backend_decl of the rhs expr to ss->info->string_length
779 so that the value in the current scope is used.
780
491f0d87
PT
7812018-05-13 Paul Thomas <pault@gcc.gnu.org>
782
783 PR fortran/85742
784 * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
785 of 'size'. If the element type is a pointer use the size of the
786 TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
787 case, set the size to zero.
788
02e4b9e1
SK
7892018-05-12 Steven G. Kargl <kargl@gcc.gnu.org>
790
791 PR fortran/85542
792 Backport from trunk
793 * expr.c (check_inquiry): Avoid NULL pointer dereference.
491f0d87 794
e41047ce
SK
7952018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
796
797 PR fortran/70870
798 Backport from trunk
799 * data.c (gfc_assign_data_value): Check that a data object does
800 not also have default initialization.
801
3eee1299
SK
8022018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
803
804 PR fortran/85521
805 Backport from trunk
806 * array.c (gfc_resolve_character_array_constructor): Substrings
807 with upper bound smaller than lower bound are zero length strings.
808
c46d6cbb
SK
8092018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
810
811 PR fortran/85687
812 Backport from trunk
813 * check.c (gfc_check_rank): Check that the argument is a data object.
814
408be5fc
PT
8152018-05-11 Paul Thomas <pault@gcc.gnu.org>
816
817 PR fortran/68846
818 PR fortran/70864
819 Backport from trunk
820 * resolve.c (get_temp_from_expr): The temporary must not have
821 dummy or intent attributes.
822
238b4836
AV
8232018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
824
825 PR fortran/85507
826 Backport from trunk.
827 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
828 introduced by r259385.
829 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
830 same variables in coarray assignments.
831
730af511
GA
8322018-05-02 Release Manager
833
834 * GCC 8.1.0 released.
835
58da192e
SK
8362018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
837
838 PR fortran/85520
839 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
840
2368eaf9
AV
8412018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
842
843 PR fortran/81773
844 PR fortran/83606
845 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
846 during dependency computation. They define no data dependency.
847 * trans-array.c (conv_array_index_offset): The stride can not be set
848 here, prevent fail.
849 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
850 for caf_get's result and copying to the array with vectorial
851 indexing.
852
acd1559a
TK
8532018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
854
855 PR fortran/85387
856 * frontend-passes.c (traverse_io_block): Check for start, end or
857 stride being defined by an outer implied DO loop.
858
bc436e10
TK
8592018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
860
861 PR fortran/83064
862 PR testsuite/85346
863 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
864 for annotation and remove dependence on -ftree-parallelize-loops.
865
24f80aa4
JJ
8662018-04-10 Jakub Jelinek <jakub@redhat.com>
867
868 PR fortran/85313
869 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
870 (resolve_oacc_nested_loops): Likewise. Formatting fix.
871
f0caea48
TK
8722018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
873
874 PR fortran/83064
875 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
876 parallell processing of DO CONCURRENT -ftree-parallelize-loops
877 is set.
878
06e8d82e
TK
8792018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
880
881 PR fortran/51260
882 * resolve.c (resolve_variable): Simplify cases where access to a
883 parameter array results in a single constant.
884
078c5aff
TK
8852018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
886
887 PR fortran/85102
888 * decl.c (variable_decl): If upper or lower bounds simplify
889 to a constant, use that.
890
0ada0dc0
PT
8912018-03-30 Paul Thomas <pault@gcc.gnu.org>
892
893 PR fortran/84931
894 * simplify.c (gfc_convert_constant): Handle case of array
895 constructors within an array that has no iterator and improve
896 the conciseness of this section of code.
897
cd6094bf
TK
8982017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
899
900 PR fortran/85111
901 * array.c (gfc_resolve_character_array_constructor): Early
902 exit for zero-size arrays.
903 * simplify.c (simplify_transformation_to_array): Exit early
904 if the result size is zero.
905 (simplify_minmaxloc_to_array): Likewise.
906
9b0588e9
MM
9072018-03-28 Mikael Morin <mikael@gcc.gnu.org>
908
909 PR fortran/69497
910 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
911 from the root.
0ada0dc0 912 (gfc_free_namespace): Restore assert (revert r258839).
9b0588e9 913
7ee4f6f3
JJ
9142018-03-28 Jakub Jelinek <jakub@redhat.com>
915
916 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
917 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
918 (IOPARM_dt_dec_ext): ... this.
919 * trans-io.c (build_dt): Adjust for default_exp renaming to
920 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
921 * io.c (match_io): Likewise.
922
ef22816c
TK
9232018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
924
925 PR fortran/85084
926 * frontend-passes.c (gfc_run_passes): Do not run front-end
927 optimizations if a previous error occurred.
928
13a7688f
TK
9292018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
930 Harald Anlauf <anlauf@gmx.de>
931
932 PR fortran/85083
933 * primary.c (gfc_convert_to_structure_constructor): Check
934 conformance of argument types in structure constructor.
935
a48718a2
TK
9362018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
937
938 PR fortran/66709
939 * io.c: Include constructor.h.
940 (resolve_tag_format): For a constant character array, concatenate
941 into a single character expression.
942
a2b471e4
SJ
9432018-03-25 Seth Johnson <johnsonsr@ornl.gov>
944 Dominique d'Humieres <dominiq@gcc.gnu.org>
945
946 PR fortran/84924
947 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
948 scalar derived type with -std=f2003 and -std=f2008.
949
8954606d
JD
9502018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
951 Dominique d'Humieres <dominiq@gcc.gnu.org>
952
12056b7c 953 PR fortran/69497
8954606d
JD
954 * symbol.c (gfc_free_namespace): Delete the assert and only if
955 refs count is equals zero, free the namespace. Otherwise,
956 something is halfway and other errors will resound.
957
335d0338
TK
9582018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
959
960 PR fortran/70068
961 * expr.c (find_substring_ref): Change types of start, end
962 and length variables to gfc_charlen_t. Set length to zero
963 for empty substring.
964
ba77f7ba
SK
9652018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
966
967 PR fortran/42651
968 * decl.c (check_function_name): Improved error message
969 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
970
b74fa126
SK
9712018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
972
973 PR fortran/84922
974 * decl.c (get_proc_name): If the MODULE prefix appears in interface
975 body, then it must appear on the contained subroutine or function.
976 While here, fix nearby mis-indented code.
977
482768bd
TK
9782018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
979 Harald Anlauf <anlauf@gmx.de>
980
981 PR fortran/84957
982 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
983
983d49dd
JB
9842018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
985
986 PR fortran/84615
987 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
988 gfc_charlen_type_node when calling procedure.
989
f11600c9
SK
9902018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
991
992 PR fortran/85001
993 * interface.c (symbol_rank): Remove bogus null pointer check that
983d49dd 994 crept in when translating a ternary operator into an if-else
f11600c9
SK
995 constructor.
996
949d0060
TK
9972018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
998
999 PR fortran/84931
1000 * simplify.c (gfc_convert_constant): Correctly handle iterators
1001 for type conversion.
1002
96c8b253
SK
10032018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1004
1005 PR fortran/77414
1006 * decl.c (get_proc_name): Check for a subroutine re-defined in
1007 the contain portion of a subroutine. Change language of existing
1008 error message to better describe the issue. While here fix whitespace
1009 issues.
1010
81ea7c11
SK
10112018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1012
1013 PR fortran/65453
1014 * decl.c (get_proc_name): Catch clash between a procedure statement
1015 and a contained subprogram
1016
299ab1b2
SK
10172018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
1018
1019 PR fortran/69395
1020 * decl.c (merge_array_spec): Correct the error condition.
1021
64300da7
SK
10222018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1023
1024 PR fortran/78741
1025 * decl.c (get_proc_name): Check for clash of entry name with
1026 subroutine name.
1027
93d1ab50
SK
10282018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1029
1030 PR fortran/69395
1031 * decl.c (merge_array_spec): Limit the merging to maximum allowed
1032 dimensions, and issue error message if limit is exceeded.
1033
17164de4
SK
10342018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
1035
1036 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
1037 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
1038 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
1039 * intrinsic.texi: Update documentation.
1040 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
1041 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
1042 gfor_fndecl_kill and gfor_fndecl_kill_sub
1043 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
1044 functions.
1045 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
1046 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
1047 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
1048
26219cee
PT
10492018-03-11 Paul Thomas <pault@gcc.gnu.org>
1050
1051 PR fortran/84546
1052 * trans-array.c (structure_alloc_comps): Make sure that the
1053 vptr is copied and that the unlimited polymorphic _len is used
1054 to compute the size to be allocated.
1055 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
1056 unlimited polymorphic _len for the offset to the element.
1057 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
1058 * trans.h : Add the boolean 'unlimited' to the prototype.
1813c97a
SK
1059
10602018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
1061
1062 PR fortran/83939
1063 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
1064
fbe1f017
SK
10652018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
1066
1067 * check.c (gfc_check_kill): Check pid and sig are scalar.
1068 (gfc_check_kill_sub): Restrict kind to 4 and 8.
1069 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
1070 keywords for KILL. Remove redundant *back="back" in favor of the
1071 original *bck="back".
1072 (add_subroutines): Sort keyword list. Add pid and sig keywords
1073 for KILL.
1074 * intrinsic.texi: Fix documentation to consistently use pid and sig.
1075 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
1076 correct function.
1077 (gfc_resolve_rename_sub): Add comment.
1078
10792018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
6f76317a
TK
1080
1081 PR fortran/66128
1082 * simplify.c (simplify_transformation): Return default result for
1083 empty array argument.
1084 (gfc_simplify_all): Remove special-case handling for zerosize.
1085 (gfc_simplify_any): Likewise.
1086 (gfc_simplify_count): Likewise.
1087 (gfc_simplify_iall): Likewise.
1088 (gfc_simplify_iany): Likewise.
1089 (gfc_simplify_iparity): Likewise.
1090 (gfc_simplify_minval): Likewise.
1091 (gfc_simplify_maxval): Likewise.
1092 (gfc_simplify_norm2): Likewise.
1093 (gfc_simplify_product): Likewise.
1094 (gfc_simplify_sum): Likewise.
1095
7d2fb01c
SK
10962018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
1097
1098 PR fortran/84734
1099 * arith.c (check_result, eval_intrinsic): If result overflows, pass
1100 the expression up the chain instead of a NULL pointer.
1101
00df7c36
SK
11022018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
1103
1104 PR fortran/64124
1105 PR fortran/70409
1106 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
1107
5867bb9a
TK
11082017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1109
1110 PR fortran/84697
1111 PR fortran/66128
1112 * expr.c (simplify_parameter_variable): If p is a size zero array
1113 and not an ARRAY_EXPR insert an empty array constructor and
1114 return.
1115 * gfortran.h: Add prototype for gfc_is_size_zero_array.
1116 * simplify.c (is_size_zero_array): Make non-static and rename into
1117 (gfc_is_size_zero_array): Check for parameter arrays of zero
1118 size by comparing shape and absence of constructor.
1119 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
1120 is_size_zero_array.
1121 (gfc_simplify_count): Likewise.
1122 (gfc_simplify_iall): Likewise.
1123 (gfc_simplify_iany): Likewise.
1124 (gfc_simplify_iparity): Likewise.
1125 (gfc_simplify_minval): Likewise.
1126 (gfc_simplify_maxval): Likewise.
1127 (gfc_simplify_product): Likewise.
1128 (gfc_simplify_sum): Likewise.
1129
284ee475
SK
11302018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
1131
1132 PR fortran/56667
1133 * primary.c (match_sym_complex_part): Give the matcher for an implied
1134 do-loop a chance to run.
1135
ac80378f
HA
11362018-03-03 Harald Anlauf <anlauf@gmx.de>
1137
1138 PR fortran/71085
1139 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
1140 dereference NULL pointer.
1141
94e6b5e5
SK
11422018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
1143
1144 PR fortran/66128
1145 * simplify.c (is_size_zero_array): New function to check for size
1146 zero array.
26219cee 1147 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
94e6b5e5
SK
1148 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1149 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
1150 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
1151 requirements from F2018.
1152
a900a060
SK
11532018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
1154
1155 PR fortran/51434
1156 * simplify.c (gfc_simplify_transfer): Resolve mold.
1157
c8bd326c
PT
11582018-03-03 Paul Thomas <pault@gcc.gnu.org>
1159
1160 PR fortran/80965
1161 * resolve.c (build_loc_call): Change symtree name from 'loc' to
1162 '_loc'.
1163
71a93e81
PT
11642018-03-01 Paul Thomas <pault@gcc.gnu.org>
1165
1166 PR fortran/84219
1167 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
1168 components are caf tokens.
1169 (gfc_target_interpret_expr): Treat BT_VOID expressions as
1170 integers.
1171
b120c8b2
PT
11722018-03-01 Paul Thomas <pault@gcc.gnu.org>
1173
1174 PR fortran/84538
1175 * class.c (class_array_ref_detected): Remove the condition that
1176 there be no reference after the array reference.
1177 (find_intrinsic_vtab): Remove excess whitespace.
1178 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
1179 as 'base and call build_class_array_ref earlier.
1180
b14a13fa
PT
11812018-02-28 Paul Thomas <pault@gcc.gnu.org>
1182
1183 PR fortran/83901
1184 * trans-stmt.c (trans_associate_var): Make sure that the se
1185 expression is a pointer type before converting it to the symbol
1186 backend_decl type.
1187
09ef33c1
SK
11882018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
1189
1190 PR fortran/83633
1191 * decl.c (variable_decl): Check that an explicit-shape-array with
1192 nonconstant bounds is allowed.
1193
8fba26f4
PT
11942018-02-25 Paul Thomas <pault@gcc.gnu.org>
1195
1196 PR fortran/84523
1197 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
1198 has a pre block, add it to the expression pre block.
1199
6ef1366a
TK
12002018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1201
1202 PR fortran/78238
1203 * gfortran.h (gfc_integer_4_kind): Define.
1204 * resolve.c (resolve_select_type): Make sure that the
1205 kind of c->high is gfc_integer_4_kind.
1206
c034c38f
SK
12072018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
1208
1209 PR fortran/30792
1210 * decl.c (gfc_match_data): Check for invalid substring in
1211 data-implied-do
1212
161ac473
SK
12132018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1214
1215 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
1216
a26f63a8
SK
12172018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1218
1219 PR fortran/84511
1220 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
1221
3453b6aa
SK
12222018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1223
1224 PR fortran/84346
1225 * interface.c (compare_actual_formal): Issue error if keyword is
1226 used in a statement function.
1227
55ebc31f
JD
12282018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1229
1230 PR fortran/84506
1231 * trans-io.c (set_parameter_value_inquire): Adjust range check of
1232 negative unit values for kind=8 units to the kind=4 negative limit.
1233
1996c75e
PT
12342018-02-23 Paul Thomas <pault@gcc.gnu.org>
1235
1236 PR fortran/83149
1237 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
1238 accessing its components.
1239
6869c12d
PT
12402018-02-23 Paul Thomas <pault@gcc.gnu.org>
1241
1242 PR fortran/83149
1243 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
1244 before accessing its components.
1245
c287dea0
PT
12462018-02-23 Paul Thomas <pault@gcc.gnu.org>
1247
1248 PR fortran/83148
1249 * trans-const.c : Clean up some whitespace issues.
1250 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
1251 derived type has a kind value of zero, set it to the default
1252 integer kind.
1253
dffb1e22
JB
12542018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
1255
1256 PR fortran/84519
1257 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
1258 argument to stop and error stop decls.
1259 * trans-stmt.c (gfc_trans_stop): Add false value to argument
1260 lists.
1261
6cc22cf4
JB
12622018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
1263
1264 PR 78534
1265 PR 84509
1266 * trans-decl.c (gfc_build_builtin_function_decls): Pass
1267 gfc_int8_type node to pause_numeric, size_type_node to
1268 pause_string.
1269 * trans-stmt.c (gfc_trans_pause): Likewise.
1270
3f5fabc0
JB
12712018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
1272
1273 * gfortran.texi: Update Coarray API description.
1274 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
1275 character lengths, int for exit codes.
1276 (generate_coarray_sym_init): Use size_t for character length.
1277 * trans-intrinsic.c (conv_co_collective): Likewise.
1278 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
1279 (gfc_trans_event_post_wait): Likewise.
1280 (gfc_trans_sync): Likewise.
1281 (gfc_trans_stop): Use size_t for character lengths, int for exit
1282 codes.
1283
04946c6b
TK
12842018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
1285
1286 PR fortran/48890
1287 PR fortran/83823
1288 * primary.c (gfc_convert_to_structure_constructor):
1289 For a constant string constructor, make sure the length
1290 is correct.
1291
5c60dbc1
PT
12922018-02-19 Paul Thomas <pault@gcc.gnu.org>
1293
1294 PR fortran/83344
1295 PR fortran/83975
1296 * resolve.c (resolve_assoc_var): Rearrange the logic for the
1297 determination of the character length of associate names. If
1298 the associate name is missing a length expression or the length
1299 expression is not a constant and the target is not a variable,
1300 make the associate name allocatable and deferred length.
1301 * trans-decl.c (gfc_get_symbol_decl): Null the character length
1302 backend_decl for deferred length associate names that are not
1303 variables. Set 'length' to gfc_index_zero_node for character
1304 associate names, whose character length is a PARM_DECL.
1305
d48fc34a
TK
13062018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1307
1308 PR fortran/35339
1309 * frontend-passes.c (traverse_io_block): Remove workaround for
1310 PR 80945.
1311
87e8aa3b
AV
13122018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1313
1314 * gfortran.texi: Document additional src/dst_type. Fix some typos.
1315 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
1316 argument of _caf_*_by_ref () with * e { get, send, sendget }.
1317 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
1318 data referenced when generating a call to caf_get_by_ref ().
1319 (conv_caf_send): Same but for caf_send_by_ref () and
1320 caf_sendget_by_ref ().
1321
26eacfe8
JD
13222018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1323
1324 PR fortran/84389
1325 * io.c (check_format): Allow FMT_COLON.
1326
d5ace305
PT
13272018-02-18 Paul Thomas <pault@gcc.gnu.org>
1328
1329 PR fortran/80945
1330 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
1331 the typenode in the case of deferred length characters.
1332
aab20638
TK
13332018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1334
1335 PR fortran/84270
1336 * frontend-passes (scalarized_expr): If the expression
1337 is an assumed size array, leave in the last reference
1338 and pass AR_SECTION instead of AR_FULL to gfc_resolve
1339 in order to avoid an error.
1340
a8399af8
PT
13412018-02-17 Paul Thomas <pault@gcc.gnu.org>
1342
1343 PR fortran/84115
1344 * resolve.c (resolve_assoc_var): If a non-constant target expr.
1345 has no string length expression, make the associate variable
1346 into a deferred length, allocatable symbol.
1347 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
1348 the symbol.
1349 * trans-stmt.c (trans_associate_var): Null and free scalar
1350 associate names that are allocatable. After assignment, remove
1351 the allocatable attribute to prevent reallocation.
1352
83d9be55
JJ
13532018-02-16 Jakub Jelinek <jakub@redhat.com>
1354
1355 PR fortran/84418
1356 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
1357 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
1358
13592018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
71a21b9e
DH
1360
1361 PR fortran/84354
1362 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
1363
f3ad8745
JW
13642018-02-15 Janus Weil <janus@gcc.gnu.org>
1365
1366 PR fortran/84409
1367 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
1368 length.
1369
ee3bb1b7
JW
13702018-02-14 Janus Weil <janus@gcc.gnu.org>
1371
1372 PR fortran/84385
1373 * match.c (gfc_match_select_type): Fix check for selector in
1374 SELECT TYPE statement.
1375
4155fafc
JW
13762018-02-13 Janus Weil <janus@gcc.gnu.org>
1377
1378 PR fortran/84313
1379 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
1380
7b47686d
AM
13812018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
1382 Janne Blomqvist <jb@gcc.gnu.org>
1383
1384 * module.c (dump_module): Use lbasename to ensure that module
1385 files are reproducible.
1386
24abcc44
JW
13872018-02-12 Janus Weil <janus@gcc.gnu.org>
1388
1389 PR fortran/84273
1390 * resolve.c (resolve_component): Fix checks of passed argument in
1391 procedure-pointer components.
1392
6a793a8d
FXC
13932018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1394
1395 PR fortran/35299
1396 * resolve.c (resolve_formal_arglist): Update error message.
1397
61fad608
AV
13982018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
1399
1400 * gfortran.texi: Fix typos in documentation of caf_register ().
1401 * trans-array.c (structure_alloc_comps): Only register a component of
1402 a derived typed corray, not of an ultimate component coarray.
1403
f3883269
SK
14042018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
1405
1406 PR fortran/54223
1407 PR fortran/84276
1408 * interface.c (compare_actual_formal): Add in_statement_function
1409 bool parameter. Skip check of INTENT attribute for statement
1410 functions. Arguments to a statement function cannot be optional,
1411 issue error for missing argument.
1412 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
1413 in_statement_function.
1414
e519d2e8
PT
14152018-02-11 Paul Thomas <pault@gcc.gnu.org>
1416
1417 PR fortran/84074
1418 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
1419 flag. If the is a vector subscript or the expression is not a
1420 variable, make the descriptor one-based.
1421
950ab3f1
PT
14222018-02-10 Paul Thomas <pault@gcc.gnu.org>
1423
1424 PR fortran/84141
1425 PR fortran/84155
1426 * trans-array.c (gfc_array_init_size): Revert the change made
1427 in revision 257356 setting the dtype.
1428 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
1429 Call gfc_get_dtype_rank_type every time.
1430
1431 PR fortran/56691
1432 * trans-array.c (gfc_conv_expr_descriptor): If the source array
1433 is a descriptor type, use its offset, removing the condition
1434 that is be a class expression.
1435
b35a0ccd
SK
14362018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1437
1438 PR fortran/82994
1439 * match.c (gfc_match_deallocate): Check for NULL pointer.
1440
82e259b8
TK
14412018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1442
1443 PR fortran/68560
1444 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
1445 (gfc_conv_intrinsic_function): Call it.
1446
52b16cb3
SK
14472018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1448
1449 PR fortran/82049
1450 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
1451 try to resolve it. While here return early if possible.
1452
26f822c2
PT
14532018-02-04 Paul Thomas <pault@gcc.gnu.org>
1454
1455 PR fortran/84115
1456 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
1457 'length' if the symbol charlen backend_decl is an indirect ref.
1458
2c536ce7
PT
14592018-02-03 Paul Thomas <pault@gcc.gnu.org>
1460
1461 PR fortran/84141
1462 PR fortran/84155
1463 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
1464 use gfc_get_dtype_rank_type.
1465
ae976c33
JB
14662018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
1467
1468 PR 83975
1469 PR 83344
1470 * resolve.c (resolve_assoc_var): Generate an error if
1471 target length unknown.
1472
eae4d8fb
JB
14732018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
1474
1475 PR fortran/83705
1476 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
1477 to runtime, print a warning message.
1478
c9243c04
JJ
14792018-01-31 Jakub Jelinek <jakub@redhat.com>
1480
1481 PR fortran/84116
1482 * openmp.c (gfc_match_omp_clauses): If all the linear
1483 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
1484 nor set *head = NULL. Formatting fixes.
1485
1af73491
PT
14862018-01-31 Paul Thomas <pault@gcc.gnu.org>
1487
1488 PR fortran/84088
1489 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
1490 an address expression passed to an assumed rank dummy, convert
1491 to an indirect reference.
1492
125a677d
TK
14932018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1494
1495 * dump-parse-tree.c (write_proc): Use sym_name (which may
1496 be sym->binding_label) instead of sym->name.
1497
949b40a4
JB
14982018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
1499
1500 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
1501 of int for slen.
1502
9f3dcd14
JB
15032018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
1504
1505 PR fortran/78534
1506 * trans-expr.c (fill_with_spaces): Use memset instead of
1507 generating loop.
1508 (gfc_trans_string_copy): Improve opportunity to use builtins with
1509 constant lengths.
1510
f2adfb89
JJ
15112018-01-30 Jakub Jelinek <jakub@redhat.com>
1512
1513 PR debug/84131
1514 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
1515 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
1516
125a677d 15172018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
8fb2cc6b
TK
1518
1519 PR fortran/84134
1520 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
1521 zero, return false.
1522
dca9e8be
TK
15232018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1524
1525 PR fortran/84133
1526 * frontend-passes (matmul_to_var_expr): Return early if
1527 in association list.
1528 (inline_matmul_assign): Likewise.
1529
3be34c0b
TK
15302017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1531
1532 PR fortran/84073
1533 * resolve.c (resolve_component): Ensure BIND(C) character
1534 components have length one.
1535 (resolve_symbol): Likewise for variables.
1536
aeb8c028
JJ
15372018-01-27 Jakub Jelinek <jakub@redhat.com>
1538
1539 PR fortran/84065
1540 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
1541 lengths.
1542
f8862a1b 15432018-01-26 Damian Rouson <damian@sourceryinstitute.org>
aeb8c028
JJ
1544 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1545 Soren Rasmussen <s.c.rasmussen@gmail.com>
f8862a1b
DR
1546
1547 Partial support for Fortran 2018 teams features.
1548
1549 * array.c (gfc_match_array_ref): add team attribute in coarray
1550 transfers.
1551 * check.c (gfc_check_get_team, gfc_check_team_number): add new
1552 functions for get_team and team_number.
1553 * dump-parse-tree.c (show_code_node): add new statements: form team,
1554 change team, end team, and sync team.
1555 * expr.c (gfc_find_team_co): add new function.
1556 * gfortran.h: add new statements.
1557 * intrinsic.c (add_functions): add get_team and team_number functions.
1558 * intrinsic.h: add get_team and team_number prototypes for check,
1559 simplify, and resolve.
1560 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
1561 functions.
1562 * iso-fortran-env.def: add the team_type derived type.
1563 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
1564 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
1565 add change team, end team, form team, sync team match and functions.
1566 * match.h: add new prototypes for change team, end team, form team,
1567 and sync team.
1568 * parse.c (decode_statement): add cases for change team, end team,
1569 form team, and sync team.
1570 * resolve.c: add cases for exec form team, change team, end team, and
1571 sync team.
1572 * simplify.c (gfc_simplify_get_team): add new function for get team.
1573 * st.c (gfc_free_statement): add cases exec for change team, end team,
1574 form team, sync team.
1575 * trans-decl.c (gfor_fndecl_caf_form_team)
1576 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
1577 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
1578 (gfor_fndecl_caf_team_number): add functions and definitions.
1579 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
1580 new function and team_type argument support.
1581 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
1582 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
1583 * trans-stmt.h: add new prototypes.
1584 * trans-types.c (gfc_get_derived_type): check condition for team_type.
1585 * trans.c (trans_code): new exec cases for form team, change team, end
1586 team, and sync team.
1587 * trans.h: add new prototypes.
1588
deece1aa
SK
15892018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
1590
1591 PR fortran/83998
1592 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
1593 or .false. The summation does the correct type conversion.
1594 (gfc_simplify_dot_product): Special case zero-sized arrays.
1595
7fb43006
PT
15962018-25-01 Paul Thomas <pault@gcc.gnu.org>
1597
1598 PR fortran/37577
1599 * array.c (gfc_match_array_ref): If standard earlier than F2008
1600 it is an error if the reference dimension is greater than 7.
1601 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
1602 dtype masks and shifts accordingly.
1603 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
1604 type node to check the field.
1605 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
1606 (duplicate_allocatable_coarray): Access the rank field of the
1607 dtype descriptor rather than the dtype itself.
1608 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
1609 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
1610 (ie. a character).
1611 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
1612 get_scalar_to_descriptor_type if the actual expression is a
1613 constant.
1614 (gfc_trans_structure_assign): Assign the rank directly to the
1615 dtype rank field.
1616 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
1617 to default integer kind.
1618 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
1619 'elem_len' field of the dtype.
1620 * trans-io.c (gfc_build_io_library_fndecls): Replace
1621 gfc_int4_type_node with dtype_type_node where necessary.
1622 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
1623 scalars.
1624 * trans-types.c : Provide 'get_dtype_type_node' to acces the
1625 dtype_type_node and, if necessary, build it.
1626 The maximum size of an array element is now determined by the
1627 maximum value of size_t.
1628 Update the description of the array descriptor, including the
1629 type def for the dtype_type.
1630 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
1631 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
1632 (gfc_get_array_descriptor_base): Change the type of the dtype
1633 field to dtype_type_node.
1634 (gfc_get_array_descr_info): Get the offset to the rank field of
1635 the dtype.
1636 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
1637 * trans.h : Define the indices of the dtype fields.
1638
f59986b2
PT
16392018-23-01 Paul Thomas <pault@gcc.gnu.org>
1640
1641 PR fortran/83866
1642 * decl.c (gfc_match_derived_decl): If eos not matched, recover
1643 and emit error about garbage after declaration.
1644
84ee745e
PT
16452018-23-01 Paul Thomas <pault@gcc.gnu.org>
1646
1647 PR fortran/83898
1648 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
1649 for characters.
1650
6b271a2e
JB
16512018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
1652
1653 PR 78534
1654 PR 83704
1655 * arith.c (gfc_arith_concat): Use size_t for string length.
1656 (gfc_compare_string): Likewise.
1657 (gfc_compare_with_Cstring): Likewise.
1658 * array.c (gfc_resolve_character_array_constructor): Use
1659 HOST_WIDE_INT, gfc_mpz_get_hwi.
1660 * check.c (gfc_check_fe_runtime_error): Use size_t.
1661 * data.c (create_character_initializer): Use HOST_WIDE_INT,
1662 gfc_extract_hwi.
1663 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
1664 (add_init_expr_to_sym): Use HOST_WIDE_INT.
1665 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
1666 gfc_extract_hwi.
1667 (gfc_apply_init): Likewise.
1668 * match.h (gfc_set_constant_character_len): Update prototype.
1669 * primary.c (match_string_constant): Use size_t.
1670 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
1671 gfc_mpz_get_hwi.
1672 * simplify.c (init_result_expr): Likewise.
1673 (gfc_simplify_len_trim): Use size_t.
1674 * target-memory.c (gfc_encode_character): Use size_t.
1675 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
1676 (interpret_array): Use size_t.
1677 (gfc_interpret_character): Likewise.
1678 * target-memory.h (gfc_encode_character): Update prototype.
1679 (gfc_interpret_character): Likewise.
1680 (gfc_target_interpret_expr): Likewise.
1681 * trans-const.c (gfc_build_string_const): Use size_t for length
1682 argument.
1683 (gfc_build_wide_string_const): Likewise.
1684 * trans-const.h (gfc_build_string_const): Likewise.
1685 (gfc_build_wide_string_const): Likewise.
1686
f5240750
SK
16872018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
1688
1689 PR fortran/83900
1690 * simplify.c (gfc_simplify_matmul): Set return type correctly.
1691
f18fee82
SK
16922018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
1693
1694 PR fortran/83900
1695 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
1696
fcf79237
HA
16972018-01-17 Harald Anlauf <anlauf@gmx.de>
1698
1699 PR fortran/83864
1700 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
1701
c004a341
HA
17022018-01-17 Harald Anlauf <anlauf@gmx.de>
1703
1704 PR fortran/83874
1705 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
1706
75a3c61a
LK
17072018-01-15 Louis Krupp <louis.krupp@zoho.com>
1708
1709 PR fortran/82257
1710 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
1711 from symbol marked unlimited polymorphic.
1712 * resolve.c (resolve_structure_cons): Likewise.
1713 * misc.c (gfc_typename): Don't dereference derived->components
1714 if it's NULL.
1715
64b1806b
TK
17162018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1717
1718 PR fortran/54613
1719 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
1720 (gfc_logical_4_kind): New macro
1721 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
1722 (gfc_simplify_maxloc): Likewise.
1723 (gfc_resolve_maxloc): Likewise.
1724 (gfc_resolve_minloc): Likewise.
1725 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
1726 argument; also raise error if it is used (for now). Add it
1727 if it isn't present.
1728 * intrinsic.c (add_sym_4ml): Rename to
1729 (add_sym_5ml), adjust for extra argument.
1730 (add_functions): Add "back" constant. Adjust maxloc and minloc
1731 for back argument.
1732 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
1733 not of gfc_logical_4_kind, convert.
1734 (gfc_resolve_minloc): Likewise.
1735 * simplify.c (gfc_simplify_minloc): Add back argument.
1736 (gfc_simplify_maxloc): Likewise.
1737 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
1738 argument to %VAL to ensure passing by value.
1739 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
1740 also for library calls.
1741
f208c5cc
JD
17422018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1743
1744 PR fortran/82007
1745 * resolve.c (resolve_transfer): Delete code looking for 'DT'
1746 format specifiers in format strings. Set formatted to true if a
1747 format string or format label is present.
1748 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
1749 whitespace.
64b1806b 1750
83d9be55 17512018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
39f309ac
TK
1752
1753 PR fortran/83744
1754 * dump-parse-tree.c (get_c_type_name): Remove extra line.
1755 Change for loop to use declaration in for loop. Handle BT_LOGICAL
1756 and BT_CHARACTER.
1757 (write_decl): Add where argument. Fix indentation. Replace
1758 assert with error message. Add typename to warning
1759 in comment.
1760 (write_type): Adjust locus to call of write_decl.
1761 (write_variable): Likewise.
1762 (write_proc): Likewise. Replace assert with error message.
1763
567a6e1c
PT
17642018-01-13 Paul Thomas <pault@gcc.gnu.org>
1765
1766 PR fortran/52162
1767 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
1768 the rhs expression is neither an elemental nor a conversion
1769 function.
1770
1771 PR fortran/83622
1772 * trans-array.c (is_pointer_array): Remove unconditional return
1773 of false for -fopenmp.
1774
83d9be55 17752018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
700b62cc
TK
1776 <emsr@gcc.gnu.org>
1777
1778 PR fortran/83803
1779 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
1780 for functions.
1781
bdd82c9b
SK
17822018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1783
1784 PR fortran/82367
1785 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
1786
266404a8
SK
17872018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1788
1789 PR fortran/83093
1790 * resolve.c (resolve_charlen): Check the type of cl->length
1791 after resolution.
1792
85c2c761
JB
17932018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
1794
e10e60cb
JB
1795 PR fortran/83740
1796 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
1797
17982018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
1799
1800 PR fortran/83740
85c2c761
JB
1801 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
1802 LHS type when assigning.
1803
d4319ef8
SK
18042018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
1805
1806 PR fortran/83742
1807 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
1808
8799df67
SK
18092018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
1810
1811 * match.c (gfc_match_allocate): Check for NULL pointer.
1812
a4f759de
SK
18132018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
1814
1815 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
1816
0b627b58
PT
18172018-01-08 Paul Thomas <pault@gcc.gnu.org>
1818
1819 PR fortran/83611
1820 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
1821 an initializer, convert the kind parameters and add to the
1822 component if the instance.
1823 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
1824 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
1825 for parameterized arrays. Clean up typos in comments. Convert
1826 parameterized array initializers and copy into the array.
1827 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
1828 parameterized types.
1829 *trans-stmt.c (trans_associate_var): Deallocate associate vars
1830 as necessary, when they are PDT function results for example.
1831
1832 PR fortran/83731
1833 * trans-array.c (structure_alloc_comps): Only compare len parms
1834 when they are declared explicitly.
1835
ee2d3987
JB
18362018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
1837
1838 PR fortran/50892
1839 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
1840 lhs type.
1841
f622221a
JB
18422018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
1843
1844 PR fortran/78534
1845 PR fortran/66310
1846 * array.c (got_charlen): Use gfc_charlen_int_kind.
1847 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
1848 hardcoded kind.
1849 (find_intrinsic_vtab): Likewise.
1850 * decl.c (match_char_length): Use gfc_charlen_int_kind.
1851 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
1852 (gfc_match_implicit): Use gfc_charlen_int_kind.
1853 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
1854 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
1855 * expr.c (gfc_get_character_expr): Length parameter of type
1856 gfc_charlen_t.
1857 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
1858 (gfc_extract_hwi): New function.
1859 (simplify_const_ref): Make string_len of type gfc_charlen_t.
1860 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
1861 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
1862 * gfortran.h (gfc_mpz_get_hwi): New prototype.
1863 (gfc_mpz_set_hwi): Likewise.
1864 (gfc_charlen_t): New typedef.
1865 (gfc_expr): Use gfc_charlen_t for character lengths.
1866 (gfc_size_kind): New extern variable.
1867 (gfc_extract_hwi): New prototype.
1868 (gfc_get_character_expr): Use gfc_charlen_t for character length.
1869 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
1870 * gfortran.texi: Update description of hidden string length argument.
1871 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
1872 (gfc_resolve_char_achar): Likewise.
1873 (gfc_resolve_repeat): Pass string length directly without
1874 temporary, use gfc_charlen_int_kind.
1875 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
1876 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
1877 * misc.c (gfc_mpz_get_hwi): New function.
1878 (gfc_mpz_set_hwi): New function.
1879 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
1880 (parse_integer): Don't complain about large integers.
1881 (write_atom): Use HOST_WIDE_INT for integers.
1882 (mio_integer): Handle integer type mismatch.
1883 (mio_hwi): New function.
1884 (mio_intrinsic_op): Use HOST_WIDE_INT.
1885 (mio_array_ref): Likewise.
1886 (mio_expr): Likewise.
1887 * primary.c (match_substring): Use gfc_charlen_int_kind.
1888 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
1889 (resolve_character_operator): Likewise.
1890 (resolve_assoc_var): Likewise.
1891 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
1892 (resolve_charlen): Use mpz_sgn to determine sign.
1893 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
1894 instead of long.
1895 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
1896 * target-memory.c (size_character): Length argument of type
1897 gfc_charlen_t.
1898 (gfc_encode_character): Likewise.
1899 (gfc_interpret_character): Use gfc_charlen_t.
1900 * target-memory.h (gfc_encode_character): Modify prototype.
1901 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
1902 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
1903 (trans_array_constructor): Use existing type.
1904 (get_array_charlen): Likewise.
1905 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
1906 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
1907 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
1908 (add_argument_checking): Likewise.
1909 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
1910 gfc_charlen_type_node.
1911 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
1912 4, fold_convert to correct type.
1913 (gfc_conv_class_to_class): Build const of type size_type_node for
1914 size.
1915 (gfc_copy_class_to_class): Likewise.
1916 (gfc_conv_string_length): Use same type in expression.
1917 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
1918 (gfc_conv_string_tmp): Make sure len is of the right type.
1919 (gfc_conv_concat_op): Use same type in expression.
1920 (gfc_conv_procedure_call): Likewise.
1921 (fill_with_spaces): Comment out memset() block due to spurious
1922 -Wstringop-overflow warnings.
1923 (gfc_trans_string_copy): Use gfc_charlen_type_node.
1924 (alloc_scalar_allocatable_for_subcomponent_assignment):
1925 fold_convert to right type.
1926 (gfc_trans_subcomponent_assign): Likewise.
1927 (trans_class_vptr_len_assignment): Build const of correct type.
1928 (gfc_trans_pointer_assignment): Likewise.
1929 (alloc_scalar_allocatable_for_assignment): fold_convert to right
1930 type in expr.
1931 (trans_class_assignment): Build const of correct type.
1932 * trans-intrinsic.c (gfc_conv_associated): Likewise.
1933 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
1934 * trans-io.c (gfc_build_io_library_fndecls): Use
1935 gfc_charlen_type_node for character lengths.
1936 (set_string): Convert to right type in assignment.
1937 * trans-stmt.c (gfc_trans_label_assign): Build const of
1938 gfc_charlen_type_node.
1939 (trans_associate_var): Likewise.
1940 (gfc_trans_character_select): Likewise.
1941 (gfc_trans_allocate): Likewise, don't typecast strlen result.
1942 (gfc_trans_deallocate): Don't typecast strlen result.
1943 * trans-types.c (gfc_size_kind): New variable.
1944 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
1945 from size_type_node.
1946 * trans-types.h: Fix comment.
1947
fbd35ba1
TK
19482018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
1949
1950 PR fortran/83683
1951 PR fortran/45689
1952 * check.c (gfc_check_eoshift): Check for string length and
1953 for conformance of boundary.
1954 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
1955 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
1956 * simplify.c (gfc_simplify_eoshift): New function.
1957
5c0caeb3
RS
19582018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1959 Alan Hayward <alan.hayward@arm.com>
1960 David Sherwood <david.sherwood@arm.com>
1961
1962 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
1963
928686b1
RS
19642018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1965 Alan Hayward <alan.hayward@arm.com>
1966 David Sherwood <david.sherwood@arm.com>
1967
1968 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
1969
8987beac
TK
19702018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
1971
1972 PR fortran/83664
1973 * check.c (gfc_check_eoshift): Error for missing boundary if array
1974 is not one of the standard types.
1975
65e6aea3
JJ
19762018-01-03 Jakub Jelinek <jakub@redhat.com>
1977
85ec4feb
JJ
1978 Update copyright years.
1979
65e6aea3
JJ
1980 * gfortranspec.c (lang_specific_driver): Update copyright notice
1981 dates.
1982 * gfc-internals.texi: Bump @copying's copyright year.
1983 * gfortran.texi: Ditto.
1984 * intrinsic.texi: Ditto.
1985 * invoke.texi: Ditto.
1986
a1d6c052
TK
19872017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1988
1989 PR fortran/45689
1990 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
1991 gfc_simplify_minloc to maxloc and minloc, respectively.
1992 * intrinsic.h: Add prototypes for gfc_simplify_minloc
1993 and gfc_simplify_maxloc.
1994 * simplify.c (min_max_chose): Adjust prototype. Modify function
1995 to have a return value which indicates if the extremum was found.
1996 (is_constant_array_expr): Fix typo in comment.
1997 (simplify_minmaxloc_to_scalar): New function.
1998 (simplify_minmaxloc_nodim): New function.
1999 (new_array): New function.
2000 (simplify_minmaxloc_to_array): New function.
2001 (gfc_simplify_minmaxloc): New function.
2002 (simplify_minloc): New function.
2003 (simplify_maxloc): New function.
2004
a9ec0cfc
TK
20052018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2006
2007 PR fortran/45689
2008 PR fortran/83650
2009 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
2010 range of arguments.
2011
f549bfb3
PT
20122018-01-01 Paul Thomas <pault@gcc.gnu.org>
2013
2014 PR fortran/83076
2015 * resolve.c (resolve_fl_derived0): Add caf_token fields for
2016 allocatable and pointer scalars, when -fcoarray selected.
2017 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
2018 field as well as the backend_decl.
2019 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
2020 derived types that are not vtypes. Components with caf_token
2021 attribute are pvoid types. For a component requiring it, find
2022 the caf_token field and have the component token field point to
2023 its backend_decl.
2024
2025 PR fortran/83319
2026 *trans-types.c (gfc_get_array_descriptor_base): Add the token
2027 field to the descriptor even when codimen not set.
21fa2a29 2028\f
65e6aea3 2029Copyright (C) 2018 Free Software Foundation, Inc.
ad41bd84
JM
2030
2031Copying and distribution of this file, with or without modification,
2032are permitted in any medium without royalty provided the copyright
2033notice and this notice are preserved.
This page took 3.621023 seconds and 5 git commands to generate.