]> gcc.gnu.org Git - gcc.git/blame - gcc/fortran/ChangeLog
Daily bump.
[gcc.git] / gcc / fortran / ChangeLog
CommitLineData
a69d724d
TK
12019-03-23 Thomas Koenig <tkoeng@gcc.gnu.org>
2
3 PR fortran/68009
4 Backport from trunk
5 * iresolve.c: Include trans.h.
6 (gfc_resolve_fe_runtine_error): Set backend_decl on
7 resolved_sym.
8
66716547
TK
92019-03-17 Thomas Koenig <tkoenig@gcc.gnu.org>
10
11 PR fortran/84394
12 Backport from trunk
13 * symbol.c (gfc_add_subroutine): If we are encountering a
14 subrtoutine within a BLOCK DATA and the name starts with an
15 underscore, do not check.
16
322201c8
TK
172019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
18
19 PR fortran/66089
20 Backport from trunk
21 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
22 Return false if a scalar tempoary is needed.
23 (gfc_walk_variable_expr): Fix up class refs.
24
f93af968
TK
252019-03-16 Thomas Koenig <tkoenig@gcc.gnu.org>
26
27 PR fortran/66695
28 PR fortran/77746
29 PR fortran/79485
30 Backport from trunk
31 * gfortran.h (gfc_symbol): Add bind_c component.
32 (gfc_get_gsymbol): Add argument bind_c.
33 * decl.c (add_global_entry): Add bind_c argument to
34 gfc_get_symbol.
35 * parse.c (parse_block_data): Likewise.
36 (parse_module): Likewise.
37 (add_global_procedure): Likewise.
38 (add_global_program): Likewise.
39 * resolve.c (resolve_common_blocks): Likewise.
40 (resolve_global_procedure): Likewise.
41 (gfc_verify_binding_labels): Likewise.
42 * symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
43 in gsym.
44 * trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
45 to gfc_get_symbol.
46 (gfc_get_extern_function_decl): If the sym has a binding label
47 and it cannot be found in the global symbol tabel, it is the wrong
48 one and vice versa.
49
76d9bf53
TK
502019-03-13 Thomas Koenig <tkoenig@gcc.gnu.org>
51
52 PR fortran/87673
53 Backport from trunk
54 * match.c (gfc_match_type_spec): Remove call to
55 gfc_resolve_expr for character length.
56
8cf9a9b7
TK
572019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
58
59 PR fortran/71544
60 Backport from trunk
61 * trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
62 C_PTR and C_FUNPTR.
63 (create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
64
9a8c5d2d
TK
652019-03-10 Thomas Koenig <tkoenig@gcc.gnu.org>
66 Steven G. Kargl <kargl@gcc.gnu.org>
67
68 PR fortran/87734
69 Backort from trunk
70 * symbol.c (gfc_add_procedure): Only throw an error if the
71 procedure has not been declared either PUBLIC or PRIVATE.
72 * resolve.c (is_illegal_recursion): Remove an assert().
73
7c08452f
HA
742019-03-06 Harald Anlauf <anlauf@gmx.de>
75
76 Backport from trunk
77 PR fortran/71203
78 * expr.c (simplify_const_ref): Avoid null pointer dereference.
79
1e83b120
TK
802019-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
81
82 PR fortran/72714
83 Backport from trunk
84 * resolve.c (resolve_allocate_expr): Add some tests for coarrays.
85
c867f658
HA
862019-03-03 Harald Anlauf <anlauf@gmx.de>
87
88 Backport from trunk
89 PR fortran/89077
90 * decl.c (gfc_set_constant_character_len): Clear original string
91 representation after padding has been performed to target length.
92 * resolve.c (gfc_resolve_substring_charlen): Check substring
93 length for constantness prior to general calculation of length.
94
8546491e
HA
952019-03-03 Harald Anlauf <anlauf@gmx.de>
96 Steven G. Kargl <kargl@gcc.gnu.org>
97
98 Backport from trunk
99 PR fortran/77583
100 * symbol.c (check_conflict): Check for valid procedure name
101 passed to error reporting routine.
102
e9d86220
TK
1032019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
104
105 PR fortran/89174
106 Backport from trunk
107 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
108 to garguments. If we are dealing with a MOLD, call
109 gfc_expr_to_initialize().
110 * trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
111 to gfc_find_and_cut_at_last_class_ref.
112 * trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
113 argument is_mold with default false.
114
8517f286
TK
1152019-03-03 Thomas Koenig <tkoenig@gcc.gnu.org>
116
117 PR fortran/87689
118 Backport from trunk
119 * gfortran.dg/lto/20091028-1_0.f90: Add -Wno-lto-type-mismatch to
120 options.
121 * gfortran.dg/lto/20091028-2_0.f90: Likewise.
122 * gfortran.dg/lto/pr87689_0.f: New file.
123 * gfortran.dg/lto/pr87689_1.f: New file.
124 * gfortran.dg/altreturn_9_0.f90: New file.
125 * gfortran.dg/altreturn_9_1.f90: New file.
126
70a671cd
JD
1272019-03-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
128
129 Backport from trunk
130 PR fortran/84387
131 * trans-io.c (transfer_expr): Do not return if there are no
132 components to the derived type or class.
133
8eecc0e4
HA
1342019-03-02 Harald Anlauf <anlauf@gmx.de>
135
136 Backport from trunk
137 PR fortran/89516
138 * check.c (gfc_calculate_transfer_sizes): Correct checks for cases
139 where storage size of elements of MOLD is 0.
140
141 PR fortran/89492
142 * check.c (gfc_calculate_transfer_sizes): Handle cases where
143 storage size of elements of MOLD is 0.
144
145 PR fortran/89266
146 PR fortran/88326
147 * target-memory.c (gfc_element_size): Return false if element size
148 cannot be determined; element size is returned separately.
149 (gfc_target_expr_size): Return false if expression size cannot be
150 determined; expression size is returned separately.
151 * target-memory.h: Adjust prototypes.
152 * check.c (gfc_calculate_transfer_sizes): Adjust references to
153 gfc_target_expr_size, gfc_element_size.
154 * arith.c (hollerith2representation): Likewise.
155 * class.c (find_intrinsic_vtab): Likewise.
156 * simplify.c (gfc_simplify_sizeof): Likewise.
157
ec020ecf
TK
1582019-02-23 Thomas Koenig <tkoenig@gcc.gnu.org>
159
160 PR fortran/86119
161 Backport from trunk
162 * class.c (gfc_get_len_component): Add argument k for kind.
163 If the kind of the resulting expression is not equal to k,
164 convert it.
165 * gfortran.h (gfc_len_component): Adjust prototype.
166 * simplify.c (gfc_simplify_len): Pass kind to
167 gfc_get_len_component.
168
da1ea873
PT
1692019-02-23 Paul Thomas <pault@gcc.gnu.org>
170
171 Backport from trunk
172 PR fortran/88117
173 * resolve.c (deferred_op_assign): Return if the lhs expression
174 has the pointer attribute.
175
d4a61138
TK
1762019-02-22 Thomas Koenig <tkoenig@gcc.gnu.org>
177
178 PR fortran/71066
179 Backport from trunk
180 * trans-decl.c (generate_coarray_sym_init): For an array
181 constructor in a DATA statement of a coarray variable, set the
182 rank to 1 to avoid confusion later on. If the constructor
183 contains only one value, use that for initiailizig.
184
4c44b708
GA
1852019-02-22 Release Manager
186
187 * GCC 8.3.0 released.
188
d8ead5d1
HA
1892019-02-10 Harald Anlauf <anlauf@gmx.de>
190
191 Backport from trunk
192 PR fortran/89077
193 * decl.c (add_init_expr_to_sym): Copy length of string initializer
194 to declared symbol.
195
49c45748
TK
1962019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
197
198 PR fortran/71237
199 Backport from trunk
200 * expr.c (gfc_check_assign): Add argument is_init_expr. If we are
201 looking at an init expression, issue error if the target is not a
202 TARGET and we are not looking at a procedure pointer.
203 * gfortran.h (gfc_check_assign): Add optional argument
204 is_init_expr.
205
151a3e4e
JJ
2062019-02-07 Jakub Jelinek <jakub@redhat.com>
207
208 Backported from mainline
fd0e6668
JJ
209 2019-02-01 Jakub Jelinek <jakub@redhat.com>
210
211 PR fortran/83246
212 PR fortran/89084
213 * trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
214 if sym->ns->construct_entities rather than if
215 sym->ns->parent->code->op == EXEC_BLOCK.
216
151a3e4e
JJ
217 2019-01-19 Jakub Jelinek <jakub@redhat.com>
218
219 PR fortran/88902
220 * trans-decl.c (gfc_get_symbol_decl): Don't add length to function
221 or parent function if it has been added there already.
222
cc04395d
TK
2232019-02-05 Thomas Koenig <tkoenig@gcc.gnu.org>
224
225 PR fortran/67679
226 Backport from trunk
227 * trans-array.c (gfc_array_allocate): For setting the bounds on
228 the new array, add a condition for a not previously allocated
229 variable.
230
625185ef
PT
2312019-02-03 Paul Thomas <pault@gcc.gnu.org>
232
233 Backport from trunk
234 PR fortran/88393
235 * trans-expr.c (gfc_conv_procedure_call): For derived entities,
236 passed in parentheses to class formals, invert the order of
237 copying allocatable components to taking the _data of the
238 class expression.
239
2402019-02-03 Paul Thomas <pault@gcc.gnu.org>
1ff97ef8
PT
241
242 Backport from trunk
243 PR fortran/88980
244 * trans-array.c (gfc_array_init_size): Add element_size to the
245 arguments.
246 (gfc_array_allocate): Remove the recalculation of the size of
247 the element and use element_size from the call to the above.
248 Unconditionally set the span field of the descriptor.
249
242e0978
PT
2502019-02-03 Paul Thomas <pault@gcc.gnu.org>
251
252 Backport from trunk
253 PR fortran/88685
254 * expr.c (is_subref_array): Move the check for class pointer
255 dummy arrays to after the reference check. If we haven't seen
256 an array reference other than an element and a component is not
257 class or derived, return false.
258
a7c0dded
TK
2592019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
260
261 PR fortran/88298
262 Backport from trunk
263 * arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
264 * gfortran.h (gfc_expr): Add flag do_not_warn.
265 * intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
266 no warning is desired.
267
08cc146f
TK
2682019-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
269
270 PR fortran/57048
271 Backport from trunk
272 * interface.c (gfc_compare_types): If a derived type and an
273 integer both have a derived type, and they are identical,
274 this is a C binding type and compares equal.
275
bfb5990c
PT
2762019-01-27 Paul Thomas <pault@gcc.gnu.org>
277
278 Backport from trunk
279 PR fortran/56386
280 PR fortran/58906
281 PR fortran/77385
282 PR fortran/80260
283 PR fortran/82077
284 * resolve.c (resolve_variable): Fix up expressions with array
285 associate names, where the parser did not detect that this is
286 array and there was no array part_ref in the expression.
287 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): base_expr
288 should be a copy of e and not the initialization expr.
289
ece82783
PT
2902019-01-25 Paul Thomas <pault@gcc.gnu.org>
291
292 PR fortran/87336
293 * trans-array.c (gfc_get_array_span): Try to get the element
294 length of incomplete types. Return NULL_TREE otherwise.
295 (gfc_conv_expr_descriptor): Only set the 'span' field if the
296 above does not return NULL_TREE. Set 'span' field if possible
297 for all new descriptors.
298
e79f8517
SK
2992019-01-15 Steven G. Kargl <kargl@gcc.gnu.org>
300
301 PR fortran/81849
302 * resolve.c (resolve_symbol): Host associated varaibles can appear
303 in the specification statement of a RESULT array.
304
b6fa56ee
DH
3052019-01-15 Dominique d'Humieres <dominiq@gcc.gnu.org>
306
307 PR fortran/88803
308 * gfortran.texi: Replace @xref with @ref and adjust the sentence.
309
d8ddd1be
SK
3102019-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
311
312 PR fortran/35031
313 * decl.c (gfc_match_entry): Check for F2018:C1546. Fix nearby
314 mis-indentation.
315
71366bd6
JJ
3162019-01-08 Jakub Jelinek <jakub@redhat.com>
317
318 Backported from mainline
cce88ff3
JJ
319 2018-12-12 Jakub Jelinek <jakub@redhat.com>
320
321 PR fortran/88463
322 * trans-openmp.c (gfc_omp_predetermined_sharing): Handle TREE_READONLY
323 VAR_DECLs with DECL_EXTERNAL like those with TREE_STATIC.
324
71366bd6
JJ
325 2018-12-07 Jakub Jelinek <jakub@redhat.com>
326
327 PR fortran/88377
328 * trans-openmp.c (gfc_omp_clause_default_ctor,
329 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
330 gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
331 GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
332 have pointer type.
333
3b6e3d87
PT
3342018-12-23 Paul Thomas <pault@gcc.gnu.org>
335
336 Backport from trunk
337 PR fortran/77703
338 * resolve.c (get_temp_from_expr): Use the string length of
339 constant character expressions.
340
6e5c3b82
PT
3412018-12-23 Paul Thomas <pault@gcc.gnu.org>
342
343 Backport from trunk
344 PR fortran/77325
345 * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
346 rhs has a charlen expression, convert that and use it.
347 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
348 assignment of deferred character array vars to a realocatable
349 lhs should not be added to the exterior block since vector
350 indices, for example, generate temporaries indexed within the
351 loop.
352
38f63261
SK
3532018-12-22 Steven G . Kargl <kargl@gcc.gnu.org>
354
355 PR fortran/85798
356 * decl.c (gfc_match_data): If a component of a derived type entity
357 appears in data statement, check that does not have the allocatable
358 attribute.
6e5c3b82 359
803458db
TK
3602018-12-22 Thomas Koenig <tkoenig@gcc.gnu.org>
361
362 Backport from trunk
363 PR fortran/85544
364 * frontend-passes.c (optimize_power): Remove.
365 (optimize_op): Remove call to optimize_power.
366 * trans-expr.c (gfc_conv_power_op): Handle cases of 1**integer,
367 (2|4|8|16) ** integer and (-1) ** integer.
368
b198616b
SK
3692018-12-22 Steven G. Kargl <kargl@gcc.gnu.org>
370
371 PR fortran/88169
372 * module.c (mio_namelist): Remove an error condition/message that
373 is contrary to the Fortran standard.
374
31dc21eb
PT
3752018-12-21 Paul Thomas <pault@gcc.gnu.org>
376
377 PR fortran/87359
378 * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
379 introduced by r264358, which prevented components of associate
380 names from being reallocated on assignment.
381
a2bf1fd7
SK
3822018-12-16 Steven G. Kargl <kargl@gcc.gnu.org>
383
384 PR fortran/88116
385 PR fortran/88467
386 * array.c (gfc_match_array_constructor): Check return value of
387 gfc_convert_type(). Skip constructor elements with BT_UNKNOWN,
388 which need to go through resolution.
389 * intrinsic.c (gfc_convert_type_warn): Return early if the types
390 martch (i.e., no conversion is required).
391 * simplify.c (gfc_convert_constant): Remove a gfc_internal_error,
392 and return gfc_bad_expr.
393
c0b003d0
SK
3942018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
395
396 PR fortran/88138
397 * decl.c (variable_decl): Check that a derived isn't being assigned
398 an incompatible entity in an initialization.
31dc21eb 399
1e8efa75
SK
4002018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
401
402 PR fortran/88155
403 * primary.c (gfc_match_structure_constructor): Set the locus of
404 an expression to avoid a NULL pointer dereference.
405
03897611
SK
4062018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
407
408 PR fortran/88249
409 * gfortran.h: Update prototype for gfc_resolve_filepos().
410 * io.c (gfc_resolve_filepos): Check for UNIT number if ERR= is present.
411 Use passed in locus for error message.
412 * resolve.c (gfc_resolve_code): Pass locus in gfc_resolve_filepos()
413 call.
414
6a87be76
SK
4152018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
416
417 PR fortran/87922
418 * io.c (gfc_match_open): Additional checks on ASYNCHRONOUS.
419
64ea4808
SK
4202018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
421
422 PR fortran/88269
423 * io.c (io_constraint): Update macro. If locus line buffer is NULL,
424 use gfc_current_locus in error messages.
425 (check_io_constraints): Catch missing IO UNIT in write and read
426 statements. io_constraint macro is incompatible here.
427
f5cf6059
SK
4282018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
429
430 PR fortran/88205
431 * io.c (gfc_match_open): Move NEWUNIT checks to after STATUS checks.
432
9537adfe
SK
4332018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
434
435 PR fortran/88206
436 * match.c (gfc_match_type_spec): REAL can be an intrinsic function.
437
923d7e39
SK
4382018-12-09 Fritz Reese <fritzoreese@gmail.com>
439
440 PR fortran/88228
441 * resolve.c (resolve_operator): Do not call resolve_function.
442 Break like other cases.
443
a6027f8c
SK
4442018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
445
446 PR fortran/88048
447 * resolve.c (check_data_variable): Named constant cannot be a
448 data object.
449
b3f5cadb
SK
4502018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
451
452 PR fortran/88025
453 * expr.c (gfc_apply_init): Remove asserts that cannot trigger.
454 Check for a NULL pointer.
455
74487f5c
TK
4562018-11-25 Thomas Koenig <tkoenig@gcc.gnu.org>
457
458 Backport from trunk
459 PR fortran/88073
460 * frontend-passes.c (combine_array_constructor): Do not do
461 anything if in a WHERE statement.
462
bbdef456
PT
4632018-11-24 Paul Thomas <pault@gcc.gnu.org>
464
465 Backport from trunk
466 PR fortran/88143
467 * resolve.c (resolve_variable): Check for associate names with
468 NULL target.
469
19349207
JJ
4702018-11-05 Jakub Jelinek <jakub@redhat.com>
471
472 Backported from mainline
473 2018-10-25 Jakub Jelinek <jakub@redhat.com>
474
475 PR fortran/87725
476 * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
477 nonmonotonic modifiers regardless of if they have been parsed
478 already or if the opposite one has. Fix up check whether
479 comma after modifier should be parsed.
480 (resolve_omp_clauses): Diagnose schedule modifier restrictions.
481
2af2edf9 4822019-11-03 Tobias Burnus <burnus@net-b.de>
19349207 483 Thomas Koenig <tkoenig@gcc.gnu.org>
2af2edf9
TB
484
485 Backport from trunk
486 PR fortran/87597
487 * expr.c (gfc_simplify_expr): Avoid simplifying
488 the 'array' argument to lbound/ubound/lcobound/
489 ucobound.
490
4867d759
PT
4912018-10-08 Paul Thomas <pault@gcc.gnu.org>
492
493 PR fortran/83999
494 Backport from trunk
495 * resolve.c (resolve_fl_procedure): Include class functions in
496 the test that elemental function results be scalar.
497
7b6eeffd
PT
4982018-10-08 Paul Thomas <pault@gcc.gnu.org>
499
500 Backport from trunk
501 PR fortran/86372
502 * trans-stmt.c (trans_associate_var): Character associate names
503 with variable string length do not have to be deferred length
504 for the string length to be set, if variable.
505
42105025
TK
5062018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
507
7b6eeffd 508 PR fortran/86111
42105025 509 Backport from trunk
7b6eeffd
PT
510 * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
511 * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
512 (gfc_arith_concat): If the types of op1 and op2 are not
513 character of if their kinds do not match, issue ARITH_WRONGCONCAT.
42105025 514
dd71307f
JW
5152018-09-18 Janus Weil <janus@gcc.gnu.org>
516
517 Backport from trunk
518 PR fortran/85395
519 * decl.c (match_binding_attributes): Use correct default accessibility
520 for procedure pointer components.
521
fa2128cb
JW
5222018-09-18 Janus Weil <janus@gcc.gnu.org>
523
524 Backport from trunk
525 PR fortran/86830
526 * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
527 with non-polymorphic objects.
528
9856bb90
PT
5292018-09-18 Paul Thomas <pault@gcc.gnu.org>
530
531 Backported from trunk
532 PR fortran/85954
533 * resolve.c (resolve_assoc_var): If the target expression is a
534 deferred charlen dummy and the associate name shares the
535 charlen, generate a new one. Make sure that new charlens are in
536 the namespace list so that they get cleaned up.
537 * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
538 not reallocatable.
539 * trans-decl.c (gfc_get_symbol_decl): Put deferred character
540 length dummy and result arrays on the deferred initialization
541 list so that the variable length arrays can be correctly dealt
542 with.
543 * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
544 NULL rather than ICEing.
545
c09bc715
PT
5462018-09-12 Paul Thomas <pault@gcc.gnu.org>
547
548 Backported from trunk
549 PR fortran/87284
550 * trans-expr.c (gfc_trans_class_init_assign): Access to
551 to array elements of the dynamic type requires that the array
552 reference be added to the class expression and not the _data
553 component, unlike scalar expressions.
554
c4d38471
PT
5552018-09-11 Paul Thomas <pault@gcc.gnu.org>
556
557 Backported from trunk
558 PR fortran/87277
559 * expr.c (is_subref_array): Add the check of dimensionality for
560 class, dummy, pointer arrays.
561
a0fff4c4
JW
5622018-09-05 Janus Weil <janus@gcc.gnu.org>
563
564 Backported from trunk
565 PR fortran/86116
566 * interface.c (compare_type): Remove a CLASS/TYPE check.
567 (compare_type_characteristics): New function that behaves like the old
568 'compare_type'.
569 (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
570 Call 'compare_type_characteristics' instead of 'compare_type'.
571
afe13a41
JD
5722018-09-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
573
574 * simplify.c (gfc_simplify_modulo): Re-arrange code to test
575 whether 'P' is zero and issue an error if it is.
576
bc35aae0
PT
5772018-09-01 Paul Thomas <pault@gcc.gnu.org>
578
579 PR fortran/86328
580 PR fortran/86760
581 * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
582 info->descriptor but pass it directly to gfc_build_array_ref.
583 (gfc_conv_array_ref): Likewise for se->expr.
584 * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
585 obtain the span field directly from it.
586
3911571d
TK
5872018-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
588
589 Backport from trunk
590 PR fortran/86837
591 * frontend-passes.c (var_in_expr_callback): New function.
592 (var_in_expr): New function.
593 (traverse_io_block): Use var_in_expr instead of
594 gfc_check_dependency for checking if the variable depends on the
595 previous interators.
596
5efd6bce
PT
5972018-08-12 Paul Thomas <pault@gcc.gnu.org>
598
599 Backported from trunk
600 PR fortran/86906
601 * resolve.c (resolve_fl_variable_derived): Check if the derived
602 type is use associated before checking for the host association
603 error.
604
b1f88ff2
JJ
6052018-07-26 Jakub Jelinek <jakub@redhat.com>
606
607 Backported from mainline
608 2018-07-10 Jakub Jelinek <jakub@redhat.com>
609
610 PR fortran/86421
611 * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
612 _UVAL suffixes.
613 (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
614 on linear clauses. Initialize n->where to gfc_current_locus.
615
ddeb81e7
GA
6162018-07-26 Release Manager
617
618 * GCC 8.2.0 released.
619
0036d193
FR
6202018-07-16 Fritz Reese <fritzoreese@gmail.com>
621
622 PR fortran/83184
623 Backport from trunk.
624 * decl.c (match_old_style_init): Initialize locus of variable expr when
625 creating a data variable.
626 (match_clist_expr): Verify array is explicit shape/size before
627 attempting to allocate constant array constructor.
628
674c2cac
FR
6292018-07-16 Fritz Reese <fritzoreese@gmail.com>
630
631 Backport from trunk:
632
633 PR fortran/86417
634 * module.c (mio_component): Set component->loc when loading from module.
635
636 PR fortran/83183
637 PR fortran/86325
638 * expr.c (class_allocatable, class_pointer, comp_allocatable,
639 comp_pointer): New helpers.
640 (component_initializer): Generate EXPR_NULL for allocatable or pointer
641 components. Do not generate initializers for components within BT_CLASS.
642 Do not assign to comp->initializer.
643 (gfc_generate_initializer): Use new helpers; move code to generate
644 EXPR_NULL for class allocatable components into component_initializer().
645
ff9b55e2
PT
6462018-07-02 Paul Thomas <pault@gcc.gnu.org>
647
648 PR fortran/82969
649 PR fortran/86242
650 * trans-array.c (structure_alloc_comps): Do not explicitly copy
651 procedure pointer components.
652
945b9c9e
FR
6532018-06-28 Fritz Reese <fritzoreese@gmail.com>
654
655 PR fortran/82865
656 Backport from trunk.
657 * decl.c (gfc_match_type): Refactor and check for PDT declarations.
658
40a4fc21
FR
6592018-06-25 Fritz Reese <fritzoreese@gmail.com>
660
661 PR fortran/82972
662 PR fortran/83088
663 PR fortran/85851
664 Backport from trunk.
665 * expr.c (component_initializer): Assign init expr to c->initializer.
666 (generate_isocbinding_initializer): New.
667 (gfc_generate_initializer): Call generate_isocbinding_initializer to
668 generate initializers for c_ptr and c_funptr with -finit-derived.
669
0ea08d38
PT
6702018-06-25 Paul Thomas <pault@gcc.gnu.org>
671
672 PR fortran/83118
673 Back port from trunk
674 * resolve.c (resolve_ordinary_assign): Force the creation of a
675 vtable for assignment of non-polymorphic expressions to an
676 unlimited polymorphic object.
677 * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
678 size of the rhs type for such assignments. Set the dtype, _len
679 and vptrs appropriately.
680 * trans-expr.c (gfc_trans_assignment): Force the use of the
681 _copy function for these assignments.
682
53f37cfe
CP
6832018-06-15 Cesar Philippidis <cesar@codesourcery.com>
684
685 Backport from mainline
686 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
687
688 PR fortran/85703
689 * parse.c (decode_oacc_directive): Set gfc_matching_function
690 to false.
691 (decode_omp_directive): Likewise.
692
3a8d6494
CP
6932018-06-15 Cesar Philippidis <cesar@codesourcery.com>
694
695 Backport from mainline
696 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
697
698 PR fortran/85702
699 * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
700
26a5c9ea
CP
7012018-06-15 Cesar Philippidis <cesar@codesourcery.com>
702
703 Backport from mainline
704 2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
705
706 PR fortran/85701
707 * openmp.c (gfc_resolve_oacc_declare): Error on functions and
708 subroutine data clause arguments.
709
c575c6d2
SK
7102018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
711
712 PR fortran/86110
0ea08d38 713 * array.c (gfc_resolve_character_array_constructor): Avoid NULL
c575c6d2
SK
714 pointer dereference.
715
09c6ee64
SK
7162018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
717
718 PR fortran/44491
719 * expr.c (gfc_check_assign): Select non-NULL locus.
720
04d26d0e
SK
7212018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
722
723 PR fortran/85138
724 PR fortran/85996
725 PR fortran/86051
726 * decl.c (gfc_match_char_spec): Use private namespace in attempt to
727 reduce a charlen to a constant.
728
994774fc
SK
7292018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
730
731 PR fortran/86059
732 * array.c (match_array_cons_element): NULL() cannot be in an
733 array constructor.
734
3068f997
SK
7352018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
736
737 PR fortran/63514
738 * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
739
211f93e3
SK
7402018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
741
742 PR fortran/78278
743 Committed as part of r261364
744 * data.c (gfc_assign_data_value): Re-arrange code to allow for
745 an error for double initialization of CHARACTER entities.
746
68d2262f
SK
7472018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
748
749 PR fortran/38351
750 * resolve.c (resolve_operator): Provide better error message for
751 derived type entity used in an binary intrinsic numeric operator.
752
fe4f79c0
SK
7532018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
754
755 PR fortran/78571
756 * data.c (create_character_initializer): Return early if type is
757 incompatible with CHARACTER.
758
84f486e7
TK
7592018-06-09 Thomas Koenig <tkoenig@gcc.gnu.org>
760
761 PR fortran/85631
762 Backport from trunk.
763 * trans.h (gfc_ss): Add field no_bounds_check.
764 * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
765 ss->no_bounds_check is set, do not use runtime checks.
766 * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
767 for reallocatable lhs.
768
638fab73
SK
7692018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
770
771 PR fortran/86045
772 Backport from trunk.
773 * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
774 'P' is zero and issue an error if it is.
775
83b578b1
TK
7762018-06-07 Thomas Koenig <tkoenig@gcc.gnu.org>
777
778 PR fortran/85641
779 Backport from trunk.
780 * frontend-passes.c (is_fe_temp): Add prototype.
781 (realloc_string_callback): Early return for frontend-generated
782 temporary.
783
463f60d0
SK
7842018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
785
786 PR fortran/85981
787 * resolve.c (resolve_allocate_deallocate): Check errmsg is default
788 character kind.
789
ad0fbf0d
SK
7902018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
791
792 PR fortran/85786
793 * trans-intrinsic.c (gfc_conv_associated): Add arg1se to the block.
794
43de19a6
SK
7952018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
796
797 PR fortran/85895
798 Backport from trunk
799 * resolve.c (resolve_sync): Resolve expression before checking for
800 an error.
801
16d584b3
SK
8022018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
803
804 PR fortran/85780
805 Backport from trunk
806 * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
807
6505ea02
SK
8082018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
809
810 PR fortran/85779
811 Backport from trunk
812 * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
813
d7a19075
SK
8142018-05-25 Steven G. Kargl <kargl@gcc.gnu.org>
815
816 PR fortran/85543
817 Backport from trunk
818 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
819 pointer dereference.
820
9d7cd37c
PT
8212018-05-20 Paul Thomas <pault@gcc.gnu.org>
822
823 PR fortran/80657
824 Backport from trunk
825 * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
826 test for self refs to the function result in the character len
827 expression. If a self reference is found, emit an error and
828 return true.
829 (resolve_fntype): Use the function symbol in the calls to the
830 above.
831
9b2b4766
PT
8322018-05-20 Paul Thomas <pault@gcc.gnu.org>
833
834 PR fortran/49636
835 Backport from trunk
836 * trans-array.c (gfc_get_array_span): Renamed from
837 'get_array_span'.
838 (gfc_conv_expr_descriptor): Change references to above.
839 * trans-array.h : Add prototype for 'gfc_get_array_span'.
840 * trans-stmt.c (trans_associate_var): If the associate name is
841 a subref array pointer, use gfc_get_array_span for the span.
842
3ddfcb23
PT
8432018-05-20 Paul Thomas <pault@gcc.gnu.org>
844
845 PR fortran/82275
846 Backport from trunk
847 * match.c (gfc_match_type_spec): Go through the array ref and
848 decrement 'rank' for every dimension that is an element.
849
65e3cafd
PT
8502018-05-19 Paul Thomas <pault@gcc.gnu.org>
851
852 PR fortran/82923
853 PR fortran/66694
854 PR fortran/82617
855 Backport from trunk
856 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
857 charlen backend_decl of the rhs expr to ss->info->string_length
858 so that the value in the current scope is used.
859
491f0d87
PT
8602018-05-13 Paul Thomas <pault@gcc.gnu.org>
861
862 PR fortran/85742
863 * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
864 of 'size'. If the element type is a pointer use the size of the
865 TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
866 case, set the size to zero.
867
02e4b9e1
SK
8682018-05-12 Steven G. Kargl <kargl@gcc.gnu.org>
869
870 PR fortran/85542
871 Backport from trunk
872 * expr.c (check_inquiry): Avoid NULL pointer dereference.
491f0d87 873
e41047ce
SK
8742018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
875
876 PR fortran/70870
877 Backport from trunk
878 * data.c (gfc_assign_data_value): Check that a data object does
879 not also have default initialization.
880
3eee1299
SK
8812018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
882
883 PR fortran/85521
884 Backport from trunk
885 * array.c (gfc_resolve_character_array_constructor): Substrings
886 with upper bound smaller than lower bound are zero length strings.
887
c46d6cbb
SK
8882018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
889
890 PR fortran/85687
891 Backport from trunk
892 * check.c (gfc_check_rank): Check that the argument is a data object.
893
408be5fc
PT
8942018-05-11 Paul Thomas <pault@gcc.gnu.org>
895
896 PR fortran/68846
897 PR fortran/70864
898 Backport from trunk
899 * resolve.c (get_temp_from_expr): The temporary must not have
900 dummy or intent attributes.
901
238b4836
AV
9022018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
903
904 PR fortran/85507
905 Backport from trunk.
906 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
907 introduced by r259385.
908 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
909 same variables in coarray assignments.
910
730af511
GA
9112018-05-02 Release Manager
912
913 * GCC 8.1.0 released.
914
58da192e
SK
9152018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
916
917 PR fortran/85520
918 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
919
2368eaf9
AV
9202018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
921
922 PR fortran/81773
923 PR fortran/83606
924 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
925 during dependency computation. They define no data dependency.
926 * trans-array.c (conv_array_index_offset): The stride can not be set
927 here, prevent fail.
928 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
929 for caf_get's result and copying to the array with vectorial
930 indexing.
931
acd1559a
TK
9322018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
933
934 PR fortran/85387
935 * frontend-passes.c (traverse_io_block): Check for start, end or
936 stride being defined by an outer implied DO loop.
937
bc436e10
TK
9382018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
939
940 PR fortran/83064
941 PR testsuite/85346
942 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
943 for annotation and remove dependence on -ftree-parallelize-loops.
944
24f80aa4
JJ
9452018-04-10 Jakub Jelinek <jakub@redhat.com>
946
947 PR fortran/85313
948 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
949 (resolve_oacc_nested_loops): Likewise. Formatting fix.
950
f0caea48
TK
9512018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
952
953 PR fortran/83064
954 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
955 parallell processing of DO CONCURRENT -ftree-parallelize-loops
956 is set.
957
06e8d82e
TK
9582018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
959
960 PR fortran/51260
961 * resolve.c (resolve_variable): Simplify cases where access to a
962 parameter array results in a single constant.
963
078c5aff
TK
9642018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
965
966 PR fortran/85102
967 * decl.c (variable_decl): If upper or lower bounds simplify
968 to a constant, use that.
969
0ada0dc0
PT
9702018-03-30 Paul Thomas <pault@gcc.gnu.org>
971
972 PR fortran/84931
973 * simplify.c (gfc_convert_constant): Handle case of array
974 constructors within an array that has no iterator and improve
975 the conciseness of this section of code.
976
cd6094bf
TK
9772017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
978
979 PR fortran/85111
980 * array.c (gfc_resolve_character_array_constructor): Early
981 exit for zero-size arrays.
982 * simplify.c (simplify_transformation_to_array): Exit early
983 if the result size is zero.
984 (simplify_minmaxloc_to_array): Likewise.
985
9b0588e9
MM
9862018-03-28 Mikael Morin <mikael@gcc.gnu.org>
987
988 PR fortran/69497
989 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
990 from the root.
0ada0dc0 991 (gfc_free_namespace): Restore assert (revert r258839).
9b0588e9 992
7ee4f6f3
JJ
9932018-03-28 Jakub Jelinek <jakub@redhat.com>
994
995 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
996 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
997 (IOPARM_dt_dec_ext): ... this.
998 * trans-io.c (build_dt): Adjust for default_exp renaming to
999 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
1000 * io.c (match_io): Likewise.
1001
ef22816c
TK
10022018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1003
1004 PR fortran/85084
1005 * frontend-passes.c (gfc_run_passes): Do not run front-end
1006 optimizations if a previous error occurred.
1007
13a7688f
TK
10082018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1009 Harald Anlauf <anlauf@gmx.de>
1010
1011 PR fortran/85083
1012 * primary.c (gfc_convert_to_structure_constructor): Check
1013 conformance of argument types in structure constructor.
1014
a48718a2
TK
10152018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1016
1017 PR fortran/66709
1018 * io.c: Include constructor.h.
1019 (resolve_tag_format): For a constant character array, concatenate
1020 into a single character expression.
1021
a2b471e4
SJ
10222018-03-25 Seth Johnson <johnsonsr@ornl.gov>
1023 Dominique d'Humieres <dominiq@gcc.gnu.org>
1024
1025 PR fortran/84924
1026 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
1027 scalar derived type with -std=f2003 and -std=f2008.
1028
8954606d
JD
10292018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1030 Dominique d'Humieres <dominiq@gcc.gnu.org>
1031
12056b7c 1032 PR fortran/69497
8954606d
JD
1033 * symbol.c (gfc_free_namespace): Delete the assert and only if
1034 refs count is equals zero, free the namespace. Otherwise,
1035 something is halfway and other errors will resound.
1036
335d0338
TK
10372018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1038
1039 PR fortran/70068
1040 * expr.c (find_substring_ref): Change types of start, end
1041 and length variables to gfc_charlen_t. Set length to zero
1042 for empty substring.
1043
ba77f7ba
SK
10442018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
1045
1046 PR fortran/42651
1047 * decl.c (check_function_name): Improved error message
1048 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
1049
b74fa126
SK
10502018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
1051
1052 PR fortran/84922
1053 * decl.c (get_proc_name): If the MODULE prefix appears in interface
1054 body, then it must appear on the contained subroutine or function.
1055 While here, fix nearby mis-indented code.
1056
482768bd
TK
10572018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1058 Harald Anlauf <anlauf@gmx.de>
1059
1060 PR fortran/84957
1061 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
1062
983d49dd
JB
10632018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
1064
1065 PR fortran/84615
1066 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
1067 gfc_charlen_type_node when calling procedure.
1068
f11600c9
SK
10692018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
1070
1071 PR fortran/85001
1072 * interface.c (symbol_rank): Remove bogus null pointer check that
983d49dd 1073 crept in when translating a ternary operator into an if-else
f11600c9
SK
1074 constructor.
1075
949d0060
TK
10762018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1077
1078 PR fortran/84931
1079 * simplify.c (gfc_convert_constant): Correctly handle iterators
1080 for type conversion.
1081
96c8b253
SK
10822018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1083
1084 PR fortran/77414
1085 * decl.c (get_proc_name): Check for a subroutine re-defined in
1086 the contain portion of a subroutine. Change language of existing
1087 error message to better describe the issue. While here fix whitespace
1088 issues.
1089
81ea7c11
SK
10902018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1091
1092 PR fortran/65453
1093 * decl.c (get_proc_name): Catch clash between a procedure statement
1094 and a contained subprogram
1095
299ab1b2
SK
10962018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
1097
1098 PR fortran/69395
1099 * decl.c (merge_array_spec): Correct the error condition.
1100
64300da7
SK
11012018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1102
1103 PR fortran/78741
1104 * decl.c (get_proc_name): Check for clash of entry name with
1105 subroutine name.
1106
93d1ab50
SK
11072018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1108
1109 PR fortran/69395
1110 * decl.c (merge_array_spec): Limit the merging to maximum allowed
1111 dimensions, and issue error message if limit is exceeded.
1112
17164de4
SK
11132018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
1114
1115 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
1116 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
1117 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
1118 * intrinsic.texi: Update documentation.
1119 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
1120 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
1121 gfor_fndecl_kill and gfor_fndecl_kill_sub
1122 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
1123 functions.
1124 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
1125 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
1126 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
1127
26219cee
PT
11282018-03-11 Paul Thomas <pault@gcc.gnu.org>
1129
1130 PR fortran/84546
1131 * trans-array.c (structure_alloc_comps): Make sure that the
1132 vptr is copied and that the unlimited polymorphic _len is used
1133 to compute the size to be allocated.
1134 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
1135 unlimited polymorphic _len for the offset to the element.
1136 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
1137 * trans.h : Add the boolean 'unlimited' to the prototype.
1813c97a
SK
1138
11392018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
1140
1141 PR fortran/83939
1142 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
1143
fbe1f017
SK
11442018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
1145
1146 * check.c (gfc_check_kill): Check pid and sig are scalar.
1147 (gfc_check_kill_sub): Restrict kind to 4 and 8.
1148 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
1149 keywords for KILL. Remove redundant *back="back" in favor of the
1150 original *bck="back".
1151 (add_subroutines): Sort keyword list. Add pid and sig keywords
1152 for KILL.
1153 * intrinsic.texi: Fix documentation to consistently use pid and sig.
1154 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
1155 correct function.
1156 (gfc_resolve_rename_sub): Add comment.
1157
11582018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
6f76317a
TK
1159
1160 PR fortran/66128
1161 * simplify.c (simplify_transformation): Return default result for
1162 empty array argument.
1163 (gfc_simplify_all): Remove special-case handling for zerosize.
1164 (gfc_simplify_any): Likewise.
1165 (gfc_simplify_count): Likewise.
1166 (gfc_simplify_iall): Likewise.
1167 (gfc_simplify_iany): Likewise.
1168 (gfc_simplify_iparity): Likewise.
1169 (gfc_simplify_minval): Likewise.
1170 (gfc_simplify_maxval): Likewise.
1171 (gfc_simplify_norm2): Likewise.
1172 (gfc_simplify_product): Likewise.
1173 (gfc_simplify_sum): Likewise.
1174
7d2fb01c
SK
11752018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
1176
1177 PR fortran/84734
1178 * arith.c (check_result, eval_intrinsic): If result overflows, pass
1179 the expression up the chain instead of a NULL pointer.
1180
00df7c36
SK
11812018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
1182
1183 PR fortran/64124
1184 PR fortran/70409
1185 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
1186
5867bb9a
TK
11872017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1188
1189 PR fortran/84697
1190 PR fortran/66128
1191 * expr.c (simplify_parameter_variable): If p is a size zero array
1192 and not an ARRAY_EXPR insert an empty array constructor and
1193 return.
1194 * gfortran.h: Add prototype for gfc_is_size_zero_array.
1195 * simplify.c (is_size_zero_array): Make non-static and rename into
1196 (gfc_is_size_zero_array): Check for parameter arrays of zero
1197 size by comparing shape and absence of constructor.
1198 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
1199 is_size_zero_array.
1200 (gfc_simplify_count): Likewise.
1201 (gfc_simplify_iall): Likewise.
1202 (gfc_simplify_iany): Likewise.
1203 (gfc_simplify_iparity): Likewise.
1204 (gfc_simplify_minval): Likewise.
1205 (gfc_simplify_maxval): Likewise.
1206 (gfc_simplify_product): Likewise.
1207 (gfc_simplify_sum): Likewise.
1208
284ee475
SK
12092018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
1210
1211 PR fortran/56667
1212 * primary.c (match_sym_complex_part): Give the matcher for an implied
1213 do-loop a chance to run.
1214
ac80378f
HA
12152018-03-03 Harald Anlauf <anlauf@gmx.de>
1216
1217 PR fortran/71085
1218 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
1219 dereference NULL pointer.
1220
94e6b5e5
SK
12212018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
1222
1223 PR fortran/66128
1224 * simplify.c (is_size_zero_array): New function to check for size
1225 zero array.
26219cee 1226 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
94e6b5e5
SK
1227 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1228 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
1229 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
1230 requirements from F2018.
1231
a900a060
SK
12322018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
1233
1234 PR fortran/51434
1235 * simplify.c (gfc_simplify_transfer): Resolve mold.
1236
c8bd326c
PT
12372018-03-03 Paul Thomas <pault@gcc.gnu.org>
1238
1239 PR fortran/80965
1240 * resolve.c (build_loc_call): Change symtree name from 'loc' to
1241 '_loc'.
1242
71a93e81
PT
12432018-03-01 Paul Thomas <pault@gcc.gnu.org>
1244
1245 PR fortran/84219
1246 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
1247 components are caf tokens.
1248 (gfc_target_interpret_expr): Treat BT_VOID expressions as
1249 integers.
1250
b120c8b2
PT
12512018-03-01 Paul Thomas <pault@gcc.gnu.org>
1252
1253 PR fortran/84538
1254 * class.c (class_array_ref_detected): Remove the condition that
1255 there be no reference after the array reference.
1256 (find_intrinsic_vtab): Remove excess whitespace.
1257 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
1258 as 'base and call build_class_array_ref earlier.
1259
b14a13fa
PT
12602018-02-28 Paul Thomas <pault@gcc.gnu.org>
1261
1262 PR fortran/83901
1263 * trans-stmt.c (trans_associate_var): Make sure that the se
1264 expression is a pointer type before converting it to the symbol
1265 backend_decl type.
1266
09ef33c1
SK
12672018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
1268
1269 PR fortran/83633
1270 * decl.c (variable_decl): Check that an explicit-shape-array with
1271 nonconstant bounds is allowed.
1272
8fba26f4
PT
12732018-02-25 Paul Thomas <pault@gcc.gnu.org>
1274
1275 PR fortran/84523
1276 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
1277 has a pre block, add it to the expression pre block.
1278
6ef1366a
TK
12792018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1280
1281 PR fortran/78238
1282 * gfortran.h (gfc_integer_4_kind): Define.
1283 * resolve.c (resolve_select_type): Make sure that the
1284 kind of c->high is gfc_integer_4_kind.
1285
c034c38f
SK
12862018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
1287
1288 PR fortran/30792
1289 * decl.c (gfc_match_data): Check for invalid substring in
1290 data-implied-do
1291
161ac473
SK
12922018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1293
1294 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
1295
a26f63a8
SK
12962018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1297
1298 PR fortran/84511
1299 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
1300
3453b6aa
SK
13012018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1302
1303 PR fortran/84346
1304 * interface.c (compare_actual_formal): Issue error if keyword is
1305 used in a statement function.
1306
55ebc31f
JD
13072018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1308
1309 PR fortran/84506
1310 * trans-io.c (set_parameter_value_inquire): Adjust range check of
1311 negative unit values for kind=8 units to the kind=4 negative limit.
1312
1996c75e
PT
13132018-02-23 Paul Thomas <pault@gcc.gnu.org>
1314
1315 PR fortran/83149
1316 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
1317 accessing its components.
1318
6869c12d
PT
13192018-02-23 Paul Thomas <pault@gcc.gnu.org>
1320
1321 PR fortran/83149
1322 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
1323 before accessing its components.
1324
c287dea0
PT
13252018-02-23 Paul Thomas <pault@gcc.gnu.org>
1326
1327 PR fortran/83148
1328 * trans-const.c : Clean up some whitespace issues.
1329 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
1330 derived type has a kind value of zero, set it to the default
1331 integer kind.
1332
dffb1e22
JB
13332018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
1334
1335 PR fortran/84519
1336 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
1337 argument to stop and error stop decls.
1338 * trans-stmt.c (gfc_trans_stop): Add false value to argument
1339 lists.
1340
6cc22cf4
JB
13412018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
1342
1343 PR 78534
1344 PR 84509
1345 * trans-decl.c (gfc_build_builtin_function_decls): Pass
1346 gfc_int8_type node to pause_numeric, size_type_node to
1347 pause_string.
1348 * trans-stmt.c (gfc_trans_pause): Likewise.
1349
3f5fabc0
JB
13502018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
1351
1352 * gfortran.texi: Update Coarray API description.
1353 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
1354 character lengths, int for exit codes.
1355 (generate_coarray_sym_init): Use size_t for character length.
1356 * trans-intrinsic.c (conv_co_collective): Likewise.
1357 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
1358 (gfc_trans_event_post_wait): Likewise.
1359 (gfc_trans_sync): Likewise.
1360 (gfc_trans_stop): Use size_t for character lengths, int for exit
1361 codes.
1362
04946c6b
TK
13632018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
1364
1365 PR fortran/48890
1366 PR fortran/83823
1367 * primary.c (gfc_convert_to_structure_constructor):
1368 For a constant string constructor, make sure the length
1369 is correct.
1370
5c60dbc1
PT
13712018-02-19 Paul Thomas <pault@gcc.gnu.org>
1372
1373 PR fortran/83344
1374 PR fortran/83975
1375 * resolve.c (resolve_assoc_var): Rearrange the logic for the
1376 determination of the character length of associate names. If
1377 the associate name is missing a length expression or the length
1378 expression is not a constant and the target is not a variable,
1379 make the associate name allocatable and deferred length.
1380 * trans-decl.c (gfc_get_symbol_decl): Null the character length
1381 backend_decl for deferred length associate names that are not
1382 variables. Set 'length' to gfc_index_zero_node for character
1383 associate names, whose character length is a PARM_DECL.
1384
d48fc34a
TK
13852018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1386
1387 PR fortran/35339
1388 * frontend-passes.c (traverse_io_block): Remove workaround for
1389 PR 80945.
1390
87e8aa3b
AV
13912018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1392
1393 * gfortran.texi: Document additional src/dst_type. Fix some typos.
1394 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
1395 argument of _caf_*_by_ref () with * e { get, send, sendget }.
1396 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
1397 data referenced when generating a call to caf_get_by_ref ().
1398 (conv_caf_send): Same but for caf_send_by_ref () and
1399 caf_sendget_by_ref ().
1400
26eacfe8
JD
14012018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1402
1403 PR fortran/84389
1404 * io.c (check_format): Allow FMT_COLON.
1405
d5ace305
PT
14062018-02-18 Paul Thomas <pault@gcc.gnu.org>
1407
1408 PR fortran/80945
1409 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
1410 the typenode in the case of deferred length characters.
1411
aab20638
TK
14122018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1413
1414 PR fortran/84270
1415 * frontend-passes (scalarized_expr): If the expression
1416 is an assumed size array, leave in the last reference
1417 and pass AR_SECTION instead of AR_FULL to gfc_resolve
1418 in order to avoid an error.
1419
a8399af8
PT
14202018-02-17 Paul Thomas <pault@gcc.gnu.org>
1421
1422 PR fortran/84115
1423 * resolve.c (resolve_assoc_var): If a non-constant target expr.
1424 has no string length expression, make the associate variable
1425 into a deferred length, allocatable symbol.
1426 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
1427 the symbol.
1428 * trans-stmt.c (trans_associate_var): Null and free scalar
1429 associate names that are allocatable. After assignment, remove
1430 the allocatable attribute to prevent reallocation.
1431
83d9be55
JJ
14322018-02-16 Jakub Jelinek <jakub@redhat.com>
1433
1434 PR fortran/84418
1435 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
1436 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
1437
14382018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
71a21b9e
DH
1439
1440 PR fortran/84354
1441 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
1442
f3ad8745
JW
14432018-02-15 Janus Weil <janus@gcc.gnu.org>
1444
1445 PR fortran/84409
1446 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
1447 length.
1448
ee3bb1b7
JW
14492018-02-14 Janus Weil <janus@gcc.gnu.org>
1450
1451 PR fortran/84385
1452 * match.c (gfc_match_select_type): Fix check for selector in
1453 SELECT TYPE statement.
1454
4155fafc
JW
14552018-02-13 Janus Weil <janus@gcc.gnu.org>
1456
1457 PR fortran/84313
1458 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
1459
7b47686d
AM
14602018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
1461 Janne Blomqvist <jb@gcc.gnu.org>
1462
1463 * module.c (dump_module): Use lbasename to ensure that module
1464 files are reproducible.
1465
24abcc44
JW
14662018-02-12 Janus Weil <janus@gcc.gnu.org>
1467
1468 PR fortran/84273
1469 * resolve.c (resolve_component): Fix checks of passed argument in
1470 procedure-pointer components.
1471
6a793a8d
FXC
14722018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1473
1474 PR fortran/35299
1475 * resolve.c (resolve_formal_arglist): Update error message.
1476
61fad608
AV
14772018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
1478
1479 * gfortran.texi: Fix typos in documentation of caf_register ().
1480 * trans-array.c (structure_alloc_comps): Only register a component of
1481 a derived typed corray, not of an ultimate component coarray.
1482
f3883269
SK
14832018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
1484
1485 PR fortran/54223
1486 PR fortran/84276
1487 * interface.c (compare_actual_formal): Add in_statement_function
1488 bool parameter. Skip check of INTENT attribute for statement
1489 functions. Arguments to a statement function cannot be optional,
1490 issue error for missing argument.
1491 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
1492 in_statement_function.
1493
e519d2e8
PT
14942018-02-11 Paul Thomas <pault@gcc.gnu.org>
1495
1496 PR fortran/84074
1497 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
1498 flag. If the is a vector subscript or the expression is not a
1499 variable, make the descriptor one-based.
1500
950ab3f1
PT
15012018-02-10 Paul Thomas <pault@gcc.gnu.org>
1502
1503 PR fortran/84141
1504 PR fortran/84155
1505 * trans-array.c (gfc_array_init_size): Revert the change made
1506 in revision 257356 setting the dtype.
1507 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
1508 Call gfc_get_dtype_rank_type every time.
1509
1510 PR fortran/56691
1511 * trans-array.c (gfc_conv_expr_descriptor): If the source array
1512 is a descriptor type, use its offset, removing the condition
1513 that is be a class expression.
1514
b35a0ccd
SK
15152018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1516
1517 PR fortran/82994
1518 * match.c (gfc_match_deallocate): Check for NULL pointer.
1519
82e259b8
TK
15202018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1521
1522 PR fortran/68560
1523 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
1524 (gfc_conv_intrinsic_function): Call it.
1525
52b16cb3
SK
15262018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1527
1528 PR fortran/82049
1529 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
1530 try to resolve it. While here return early if possible.
1531
26f822c2
PT
15322018-02-04 Paul Thomas <pault@gcc.gnu.org>
1533
1534 PR fortran/84115
1535 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
1536 'length' if the symbol charlen backend_decl is an indirect ref.
1537
2c536ce7
PT
15382018-02-03 Paul Thomas <pault@gcc.gnu.org>
1539
1540 PR fortran/84141
1541 PR fortran/84155
1542 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
1543 use gfc_get_dtype_rank_type.
1544
ae976c33
JB
15452018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
1546
1547 PR 83975
1548 PR 83344
1549 * resolve.c (resolve_assoc_var): Generate an error if
1550 target length unknown.
1551
eae4d8fb
JB
15522018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
1553
1554 PR fortran/83705
1555 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
1556 to runtime, print a warning message.
1557
c9243c04
JJ
15582018-01-31 Jakub Jelinek <jakub@redhat.com>
1559
1560 PR fortran/84116
1561 * openmp.c (gfc_match_omp_clauses): If all the linear
1562 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
1563 nor set *head = NULL. Formatting fixes.
1564
1af73491
PT
15652018-01-31 Paul Thomas <pault@gcc.gnu.org>
1566
1567 PR fortran/84088
1568 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
1569 an address expression passed to an assumed rank dummy, convert
1570 to an indirect reference.
1571
125a677d
TK
15722018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1573
1574 * dump-parse-tree.c (write_proc): Use sym_name (which may
1575 be sym->binding_label) instead of sym->name.
1576
949b40a4
JB
15772018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
1578
1579 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
1580 of int for slen.
1581
9f3dcd14
JB
15822018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
1583
1584 PR fortran/78534
1585 * trans-expr.c (fill_with_spaces): Use memset instead of
1586 generating loop.
1587 (gfc_trans_string_copy): Improve opportunity to use builtins with
1588 constant lengths.
1589
f2adfb89
JJ
15902018-01-30 Jakub Jelinek <jakub@redhat.com>
1591
1592 PR debug/84131
1593 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
1594 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
1595
125a677d 15962018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
8fb2cc6b
TK
1597
1598 PR fortran/84134
1599 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
1600 zero, return false.
1601
dca9e8be
TK
16022018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1603
1604 PR fortran/84133
1605 * frontend-passes (matmul_to_var_expr): Return early if
1606 in association list.
1607 (inline_matmul_assign): Likewise.
1608
3be34c0b
TK
16092017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1610
1611 PR fortran/84073
1612 * resolve.c (resolve_component): Ensure BIND(C) character
1613 components have length one.
1614 (resolve_symbol): Likewise for variables.
1615
aeb8c028
JJ
16162018-01-27 Jakub Jelinek <jakub@redhat.com>
1617
1618 PR fortran/84065
1619 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
1620 lengths.
1621
f8862a1b 16222018-01-26 Damian Rouson <damian@sourceryinstitute.org>
aeb8c028
JJ
1623 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1624 Soren Rasmussen <s.c.rasmussen@gmail.com>
f8862a1b
DR
1625
1626 Partial support for Fortran 2018 teams features.
1627
1628 * array.c (gfc_match_array_ref): add team attribute in coarray
1629 transfers.
1630 * check.c (gfc_check_get_team, gfc_check_team_number): add new
1631 functions for get_team and team_number.
1632 * dump-parse-tree.c (show_code_node): add new statements: form team,
1633 change team, end team, and sync team.
1634 * expr.c (gfc_find_team_co): add new function.
1635 * gfortran.h: add new statements.
1636 * intrinsic.c (add_functions): add get_team and team_number functions.
1637 * intrinsic.h: add get_team and team_number prototypes for check,
1638 simplify, and resolve.
1639 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
1640 functions.
1641 * iso-fortran-env.def: add the team_type derived type.
1642 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
1643 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
1644 add change team, end team, form team, sync team match and functions.
1645 * match.h: add new prototypes for change team, end team, form team,
1646 and sync team.
1647 * parse.c (decode_statement): add cases for change team, end team,
1648 form team, and sync team.
1649 * resolve.c: add cases for exec form team, change team, end team, and
1650 sync team.
1651 * simplify.c (gfc_simplify_get_team): add new function for get team.
1652 * st.c (gfc_free_statement): add cases exec for change team, end team,
1653 form team, sync team.
1654 * trans-decl.c (gfor_fndecl_caf_form_team)
1655 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
1656 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
1657 (gfor_fndecl_caf_team_number): add functions and definitions.
1658 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
1659 new function and team_type argument support.
1660 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
1661 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
1662 * trans-stmt.h: add new prototypes.
1663 * trans-types.c (gfc_get_derived_type): check condition for team_type.
1664 * trans.c (trans_code): new exec cases for form team, change team, end
1665 team, and sync team.
1666 * trans.h: add new prototypes.
1667
deece1aa
SK
16682018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
1669
1670 PR fortran/83998
1671 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
1672 or .false. The summation does the correct type conversion.
1673 (gfc_simplify_dot_product): Special case zero-sized arrays.
1674
7fb43006
PT
16752018-25-01 Paul Thomas <pault@gcc.gnu.org>
1676
1677 PR fortran/37577
1678 * array.c (gfc_match_array_ref): If standard earlier than F2008
1679 it is an error if the reference dimension is greater than 7.
1680 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
1681 dtype masks and shifts accordingly.
1682 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
1683 type node to check the field.
1684 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
1685 (duplicate_allocatable_coarray): Access the rank field of the
1686 dtype descriptor rather than the dtype itself.
1687 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
1688 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
1689 (ie. a character).
1690 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
1691 get_scalar_to_descriptor_type if the actual expression is a
1692 constant.
1693 (gfc_trans_structure_assign): Assign the rank directly to the
1694 dtype rank field.
1695 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
1696 to default integer kind.
1697 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
1698 'elem_len' field of the dtype.
1699 * trans-io.c (gfc_build_io_library_fndecls): Replace
1700 gfc_int4_type_node with dtype_type_node where necessary.
1701 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
1702 scalars.
1703 * trans-types.c : Provide 'get_dtype_type_node' to acces the
1704 dtype_type_node and, if necessary, build it.
1705 The maximum size of an array element is now determined by the
1706 maximum value of size_t.
1707 Update the description of the array descriptor, including the
1708 type def for the dtype_type.
1709 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
1710 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
1711 (gfc_get_array_descriptor_base): Change the type of the dtype
1712 field to dtype_type_node.
1713 (gfc_get_array_descr_info): Get the offset to the rank field of
1714 the dtype.
1715 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
1716 * trans.h : Define the indices of the dtype fields.
1717
f59986b2
PT
17182018-23-01 Paul Thomas <pault@gcc.gnu.org>
1719
1720 PR fortran/83866
1721 * decl.c (gfc_match_derived_decl): If eos not matched, recover
1722 and emit error about garbage after declaration.
1723
84ee745e
PT
17242018-23-01 Paul Thomas <pault@gcc.gnu.org>
1725
1726 PR fortran/83898
1727 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
1728 for characters.
1729
6b271a2e
JB
17302018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
1731
1732 PR 78534
1733 PR 83704
1734 * arith.c (gfc_arith_concat): Use size_t for string length.
1735 (gfc_compare_string): Likewise.
1736 (gfc_compare_with_Cstring): Likewise.
1737 * array.c (gfc_resolve_character_array_constructor): Use
1738 HOST_WIDE_INT, gfc_mpz_get_hwi.
1739 * check.c (gfc_check_fe_runtime_error): Use size_t.
1740 * data.c (create_character_initializer): Use HOST_WIDE_INT,
1741 gfc_extract_hwi.
1742 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
1743 (add_init_expr_to_sym): Use HOST_WIDE_INT.
1744 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
1745 gfc_extract_hwi.
1746 (gfc_apply_init): Likewise.
1747 * match.h (gfc_set_constant_character_len): Update prototype.
1748 * primary.c (match_string_constant): Use size_t.
1749 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
1750 gfc_mpz_get_hwi.
1751 * simplify.c (init_result_expr): Likewise.
1752 (gfc_simplify_len_trim): Use size_t.
1753 * target-memory.c (gfc_encode_character): Use size_t.
1754 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
1755 (interpret_array): Use size_t.
1756 (gfc_interpret_character): Likewise.
1757 * target-memory.h (gfc_encode_character): Update prototype.
1758 (gfc_interpret_character): Likewise.
1759 (gfc_target_interpret_expr): Likewise.
1760 * trans-const.c (gfc_build_string_const): Use size_t for length
1761 argument.
1762 (gfc_build_wide_string_const): Likewise.
1763 * trans-const.h (gfc_build_string_const): Likewise.
1764 (gfc_build_wide_string_const): Likewise.
1765
f5240750
SK
17662018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
1767
1768 PR fortran/83900
1769 * simplify.c (gfc_simplify_matmul): Set return type correctly.
1770
f18fee82
SK
17712018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
1772
1773 PR fortran/83900
1774 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
1775
fcf79237
HA
17762018-01-17 Harald Anlauf <anlauf@gmx.de>
1777
1778 PR fortran/83864
1779 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
1780
c004a341
HA
17812018-01-17 Harald Anlauf <anlauf@gmx.de>
1782
1783 PR fortran/83874
1784 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
1785
75a3c61a
LK
17862018-01-15 Louis Krupp <louis.krupp@zoho.com>
1787
1788 PR fortran/82257
1789 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
1790 from symbol marked unlimited polymorphic.
1791 * resolve.c (resolve_structure_cons): Likewise.
1792 * misc.c (gfc_typename): Don't dereference derived->components
1793 if it's NULL.
1794
64b1806b
TK
17952018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1796
1797 PR fortran/54613
1798 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
1799 (gfc_logical_4_kind): New macro
1800 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
1801 (gfc_simplify_maxloc): Likewise.
1802 (gfc_resolve_maxloc): Likewise.
1803 (gfc_resolve_minloc): Likewise.
1804 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
1805 argument; also raise error if it is used (for now). Add it
1806 if it isn't present.
1807 * intrinsic.c (add_sym_4ml): Rename to
1808 (add_sym_5ml), adjust for extra argument.
1809 (add_functions): Add "back" constant. Adjust maxloc and minloc
1810 for back argument.
1811 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
1812 not of gfc_logical_4_kind, convert.
1813 (gfc_resolve_minloc): Likewise.
1814 * simplify.c (gfc_simplify_minloc): Add back argument.
1815 (gfc_simplify_maxloc): Likewise.
1816 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
1817 argument to %VAL to ensure passing by value.
1818 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
1819 also for library calls.
1820
f208c5cc
JD
18212018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1822
1823 PR fortran/82007
1824 * resolve.c (resolve_transfer): Delete code looking for 'DT'
1825 format specifiers in format strings. Set formatted to true if a
1826 format string or format label is present.
1827 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
1828 whitespace.
64b1806b 1829
83d9be55 18302018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
39f309ac
TK
1831
1832 PR fortran/83744
1833 * dump-parse-tree.c (get_c_type_name): Remove extra line.
1834 Change for loop to use declaration in for loop. Handle BT_LOGICAL
1835 and BT_CHARACTER.
1836 (write_decl): Add where argument. Fix indentation. Replace
1837 assert with error message. Add typename to warning
1838 in comment.
1839 (write_type): Adjust locus to call of write_decl.
1840 (write_variable): Likewise.
1841 (write_proc): Likewise. Replace assert with error message.
1842
567a6e1c
PT
18432018-01-13 Paul Thomas <pault@gcc.gnu.org>
1844
1845 PR fortran/52162
1846 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
1847 the rhs expression is neither an elemental nor a conversion
1848 function.
1849
1850 PR fortran/83622
1851 * trans-array.c (is_pointer_array): Remove unconditional return
1852 of false for -fopenmp.
1853
83d9be55 18542018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
700b62cc
TK
1855 <emsr@gcc.gnu.org>
1856
1857 PR fortran/83803
1858 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
1859 for functions.
1860
bdd82c9b
SK
18612018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1862
1863 PR fortran/82367
1864 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
1865
266404a8
SK
18662018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1867
1868 PR fortran/83093
1869 * resolve.c (resolve_charlen): Check the type of cl->length
1870 after resolution.
1871
85c2c761
JB
18722018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
1873
e10e60cb
JB
1874 PR fortran/83740
1875 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
1876
18772018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
1878
1879 PR fortran/83740
85c2c761
JB
1880 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
1881 LHS type when assigning.
1882
d4319ef8
SK
18832018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
1884
1885 PR fortran/83742
1886 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
1887
8799df67
SK
18882018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
1889
1890 * match.c (gfc_match_allocate): Check for NULL pointer.
1891
a4f759de
SK
18922018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
1893
1894 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
1895
0b627b58
PT
18962018-01-08 Paul Thomas <pault@gcc.gnu.org>
1897
1898 PR fortran/83611
1899 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
1900 an initializer, convert the kind parameters and add to the
1901 component if the instance.
1902 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
1903 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
1904 for parameterized arrays. Clean up typos in comments. Convert
1905 parameterized array initializers and copy into the array.
1906 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
1907 parameterized types.
1908 *trans-stmt.c (trans_associate_var): Deallocate associate vars
1909 as necessary, when they are PDT function results for example.
1910
1911 PR fortran/83731
1912 * trans-array.c (structure_alloc_comps): Only compare len parms
1913 when they are declared explicitly.
1914
ee2d3987
JB
19152018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
1916
1917 PR fortran/50892
1918 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
1919 lhs type.
1920
f622221a
JB
19212018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
1922
1923 PR fortran/78534
1924 PR fortran/66310
1925 * array.c (got_charlen): Use gfc_charlen_int_kind.
1926 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
1927 hardcoded kind.
1928 (find_intrinsic_vtab): Likewise.
1929 * decl.c (match_char_length): Use gfc_charlen_int_kind.
1930 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
1931 (gfc_match_implicit): Use gfc_charlen_int_kind.
1932 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
1933 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
1934 * expr.c (gfc_get_character_expr): Length parameter of type
1935 gfc_charlen_t.
1936 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
1937 (gfc_extract_hwi): New function.
1938 (simplify_const_ref): Make string_len of type gfc_charlen_t.
1939 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
1940 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
1941 * gfortran.h (gfc_mpz_get_hwi): New prototype.
1942 (gfc_mpz_set_hwi): Likewise.
1943 (gfc_charlen_t): New typedef.
1944 (gfc_expr): Use gfc_charlen_t for character lengths.
1945 (gfc_size_kind): New extern variable.
1946 (gfc_extract_hwi): New prototype.
1947 (gfc_get_character_expr): Use gfc_charlen_t for character length.
1948 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
1949 * gfortran.texi: Update description of hidden string length argument.
1950 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
1951 (gfc_resolve_char_achar): Likewise.
1952 (gfc_resolve_repeat): Pass string length directly without
1953 temporary, use gfc_charlen_int_kind.
1954 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
1955 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
1956 * misc.c (gfc_mpz_get_hwi): New function.
1957 (gfc_mpz_set_hwi): New function.
1958 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
1959 (parse_integer): Don't complain about large integers.
1960 (write_atom): Use HOST_WIDE_INT for integers.
1961 (mio_integer): Handle integer type mismatch.
1962 (mio_hwi): New function.
1963 (mio_intrinsic_op): Use HOST_WIDE_INT.
1964 (mio_array_ref): Likewise.
1965 (mio_expr): Likewise.
1966 * primary.c (match_substring): Use gfc_charlen_int_kind.
1967 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
1968 (resolve_character_operator): Likewise.
1969 (resolve_assoc_var): Likewise.
1970 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
1971 (resolve_charlen): Use mpz_sgn to determine sign.
1972 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
1973 instead of long.
1974 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
1975 * target-memory.c (size_character): Length argument of type
1976 gfc_charlen_t.
1977 (gfc_encode_character): Likewise.
1978 (gfc_interpret_character): Use gfc_charlen_t.
1979 * target-memory.h (gfc_encode_character): Modify prototype.
1980 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
1981 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
1982 (trans_array_constructor): Use existing type.
1983 (get_array_charlen): Likewise.
1984 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
1985 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
1986 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
1987 (add_argument_checking): Likewise.
1988 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
1989 gfc_charlen_type_node.
1990 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
1991 4, fold_convert to correct type.
1992 (gfc_conv_class_to_class): Build const of type size_type_node for
1993 size.
1994 (gfc_copy_class_to_class): Likewise.
1995 (gfc_conv_string_length): Use same type in expression.
1996 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
1997 (gfc_conv_string_tmp): Make sure len is of the right type.
1998 (gfc_conv_concat_op): Use same type in expression.
1999 (gfc_conv_procedure_call): Likewise.
2000 (fill_with_spaces): Comment out memset() block due to spurious
2001 -Wstringop-overflow warnings.
2002 (gfc_trans_string_copy): Use gfc_charlen_type_node.
2003 (alloc_scalar_allocatable_for_subcomponent_assignment):
2004 fold_convert to right type.
2005 (gfc_trans_subcomponent_assign): Likewise.
2006 (trans_class_vptr_len_assignment): Build const of correct type.
2007 (gfc_trans_pointer_assignment): Likewise.
2008 (alloc_scalar_allocatable_for_assignment): fold_convert to right
2009 type in expr.
2010 (trans_class_assignment): Build const of correct type.
2011 * trans-intrinsic.c (gfc_conv_associated): Likewise.
2012 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
2013 * trans-io.c (gfc_build_io_library_fndecls): Use
2014 gfc_charlen_type_node for character lengths.
2015 (set_string): Convert to right type in assignment.
2016 * trans-stmt.c (gfc_trans_label_assign): Build const of
2017 gfc_charlen_type_node.
2018 (trans_associate_var): Likewise.
2019 (gfc_trans_character_select): Likewise.
2020 (gfc_trans_allocate): Likewise, don't typecast strlen result.
2021 (gfc_trans_deallocate): Don't typecast strlen result.
2022 * trans-types.c (gfc_size_kind): New variable.
2023 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
2024 from size_type_node.
2025 * trans-types.h: Fix comment.
2026
fbd35ba1
TK
20272018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2028
2029 PR fortran/83683
2030 PR fortran/45689
2031 * check.c (gfc_check_eoshift): Check for string length and
2032 for conformance of boundary.
2033 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
2034 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
2035 * simplify.c (gfc_simplify_eoshift): New function.
2036
5c0caeb3
RS
20372018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2038 Alan Hayward <alan.hayward@arm.com>
2039 David Sherwood <david.sherwood@arm.com>
2040
2041 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
2042
928686b1
RS
20432018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2044 Alan Hayward <alan.hayward@arm.com>
2045 David Sherwood <david.sherwood@arm.com>
2046
2047 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
2048
8987beac
TK
20492018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
2050
2051 PR fortran/83664
2052 * check.c (gfc_check_eoshift): Error for missing boundary if array
2053 is not one of the standard types.
2054
65e6aea3
JJ
20552018-01-03 Jakub Jelinek <jakub@redhat.com>
2056
85ec4feb
JJ
2057 Update copyright years.
2058
65e6aea3
JJ
2059 * gfortranspec.c (lang_specific_driver): Update copyright notice
2060 dates.
2061 * gfc-internals.texi: Bump @copying's copyright year.
2062 * gfortran.texi: Ditto.
2063 * intrinsic.texi: Ditto.
2064 * invoke.texi: Ditto.
2065
a1d6c052
TK
20662017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2067
2068 PR fortran/45689
2069 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
2070 gfc_simplify_minloc to maxloc and minloc, respectively.
2071 * intrinsic.h: Add prototypes for gfc_simplify_minloc
2072 and gfc_simplify_maxloc.
2073 * simplify.c (min_max_chose): Adjust prototype. Modify function
2074 to have a return value which indicates if the extremum was found.
2075 (is_constant_array_expr): Fix typo in comment.
2076 (simplify_minmaxloc_to_scalar): New function.
2077 (simplify_minmaxloc_nodim): New function.
2078 (new_array): New function.
2079 (simplify_minmaxloc_to_array): New function.
2080 (gfc_simplify_minmaxloc): New function.
2081 (simplify_minloc): New function.
2082 (simplify_maxloc): New function.
2083
a9ec0cfc
TK
20842018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2085
2086 PR fortran/45689
2087 PR fortran/83650
2088 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
2089 range of arguments.
2090
f549bfb3
PT
20912018-01-01 Paul Thomas <pault@gcc.gnu.org>
2092
2093 PR fortran/83076
2094 * resolve.c (resolve_fl_derived0): Add caf_token fields for
2095 allocatable and pointer scalars, when -fcoarray selected.
2096 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
2097 field as well as the backend_decl.
2098 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
2099 derived types that are not vtypes. Components with caf_token
2100 attribute are pvoid types. For a component requiring it, find
2101 the caf_token field and have the component token field point to
2102 its backend_decl.
2103
2104 PR fortran/83319
2105 *trans-types.c (gfc_get_array_descriptor_base): Add the token
2106 field to the descriptor even when codimen not set.
21fa2a29 2107\f
65e6aea3 2108Copyright (C) 2018 Free Software Foundation, Inc.
ad41bd84
JM
2109
2110Copying and distribution of this file, with or without modification,
2111are permitted in any medium without royalty provided the copyright
2112notice and this notice are preserved.
This page took 3.538513 seconds and 5 git commands to generate.