]> gcc.gnu.org Git - gcc.git/blame - gcc/fortran/ChangeLog
re PR fortran/85521 (ICE in gfc_resolve_character_array_constructor, at fortran/array...
[gcc.git] / gcc / fortran / ChangeLog
CommitLineData
3eee1299
SK
12018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
2
3 PR fortran/85521
4 Backport from trunk
5 * array.c (gfc_resolve_character_array_constructor): Substrings
6 with upper bound smaller than lower bound are zero length strings.
7
c46d6cbb
SK
82018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
9
10 PR fortran/85687
11 Backport from trunk
12 * check.c (gfc_check_rank): Check that the argument is a data object.
13
408be5fc
PT
142018-05-11 Paul Thomas <pault@gcc.gnu.org>
15
16 PR fortran/68846
17 PR fortran/70864
18 Backport from trunk
19 * resolve.c (get_temp_from_expr): The temporary must not have
20 dummy or intent attributes.
21
238b4836
AV
222018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
23
24 PR fortran/85507
25 Backport from trunk.
26 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
27 introduced by r259385.
28 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
29 same variables in coarray assignments.
30
730af511
GA
312018-05-02 Release Manager
32
33 * GCC 8.1.0 released.
34
58da192e
SK
352018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
36
37 PR fortran/85520
38 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
39
2368eaf9
AV
402018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
41
42 PR fortran/81773
43 PR fortran/83606
44 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
45 during dependency computation. They define no data dependency.
46 * trans-array.c (conv_array_index_offset): The stride can not be set
47 here, prevent fail.
48 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
49 for caf_get's result and copying to the array with vectorial
50 indexing.
51
acd1559a
TK
522018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
53
54 PR fortran/85387
55 * frontend-passes.c (traverse_io_block): Check for start, end or
56 stride being defined by an outer implied DO loop.
57
bc436e10
TK
582018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
59
60 PR fortran/83064
61 PR testsuite/85346
62 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
63 for annotation and remove dependence on -ftree-parallelize-loops.
64
24f80aa4
JJ
652018-04-10 Jakub Jelinek <jakub@redhat.com>
66
67 PR fortran/85313
68 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
69 (resolve_oacc_nested_loops): Likewise. Formatting fix.
70
f0caea48
TK
712018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
72
73 PR fortran/83064
74 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
75 parallell processing of DO CONCURRENT -ftree-parallelize-loops
76 is set.
77
06e8d82e
TK
782018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
79
80 PR fortran/51260
81 * resolve.c (resolve_variable): Simplify cases where access to a
82 parameter array results in a single constant.
83
078c5aff
TK
842018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
85
86 PR fortran/85102
87 * decl.c (variable_decl): If upper or lower bounds simplify
88 to a constant, use that.
89
0ada0dc0
PT
902018-03-30 Paul Thomas <pault@gcc.gnu.org>
91
92 PR fortran/84931
93 * simplify.c (gfc_convert_constant): Handle case of array
94 constructors within an array that has no iterator and improve
95 the conciseness of this section of code.
96
cd6094bf
TK
972017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
98
99 PR fortran/85111
100 * array.c (gfc_resolve_character_array_constructor): Early
101 exit for zero-size arrays.
102 * simplify.c (simplify_transformation_to_array): Exit early
103 if the result size is zero.
104 (simplify_minmaxloc_to_array): Likewise.
105
9b0588e9
MM
1062018-03-28 Mikael Morin <mikael@gcc.gnu.org>
107
108 PR fortran/69497
109 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
110 from the root.
0ada0dc0 111 (gfc_free_namespace): Restore assert (revert r258839).
9b0588e9 112
7ee4f6f3
JJ
1132018-03-28 Jakub Jelinek <jakub@redhat.com>
114
115 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
116 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
117 (IOPARM_dt_dec_ext): ... this.
118 * trans-io.c (build_dt): Adjust for default_exp renaming to
119 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
120 * io.c (match_io): Likewise.
121
ef22816c
TK
1222018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
123
124 PR fortran/85084
125 * frontend-passes.c (gfc_run_passes): Do not run front-end
126 optimizations if a previous error occurred.
127
13a7688f
TK
1282018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
129 Harald Anlauf <anlauf@gmx.de>
130
131 PR fortran/85083
132 * primary.c (gfc_convert_to_structure_constructor): Check
133 conformance of argument types in structure constructor.
134
a48718a2
TK
1352018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
136
137 PR fortran/66709
138 * io.c: Include constructor.h.
139 (resolve_tag_format): For a constant character array, concatenate
140 into a single character expression.
141
a2b471e4
SJ
1422018-03-25 Seth Johnson <johnsonsr@ornl.gov>
143 Dominique d'Humieres <dominiq@gcc.gnu.org>
144
145 PR fortran/84924
146 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
147 scalar derived type with -std=f2003 and -std=f2008.
148
8954606d
JD
1492018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
150 Dominique d'Humieres <dominiq@gcc.gnu.org>
151
12056b7c 152 PR fortran/69497
8954606d
JD
153 * symbol.c (gfc_free_namespace): Delete the assert and only if
154 refs count is equals zero, free the namespace. Otherwise,
155 something is halfway and other errors will resound.
156
335d0338
TK
1572018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
158
159 PR fortran/70068
160 * expr.c (find_substring_ref): Change types of start, end
161 and length variables to gfc_charlen_t. Set length to zero
162 for empty substring.
163
ba77f7ba
SK
1642018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
165
166 PR fortran/42651
167 * decl.c (check_function_name): Improved error message
168 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
169
b74fa126
SK
1702018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
171
172 PR fortran/84922
173 * decl.c (get_proc_name): If the MODULE prefix appears in interface
174 body, then it must appear on the contained subroutine or function.
175 While here, fix nearby mis-indented code.
176
482768bd
TK
1772018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
178 Harald Anlauf <anlauf@gmx.de>
179
180 PR fortran/84957
181 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
182
983d49dd
JB
1832018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
184
185 PR fortran/84615
186 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
187 gfc_charlen_type_node when calling procedure.
188
f11600c9
SK
1892018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
190
191 PR fortran/85001
192 * interface.c (symbol_rank): Remove bogus null pointer check that
983d49dd 193 crept in when translating a ternary operator into an if-else
f11600c9
SK
194 constructor.
195
949d0060
TK
1962018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
197
198 PR fortran/84931
199 * simplify.c (gfc_convert_constant): Correctly handle iterators
200 for type conversion.
201
96c8b253
SK
2022018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
203
204 PR fortran/77414
205 * decl.c (get_proc_name): Check for a subroutine re-defined in
206 the contain portion of a subroutine. Change language of existing
207 error message to better describe the issue. While here fix whitespace
208 issues.
209
81ea7c11
SK
2102018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
211
212 PR fortran/65453
213 * decl.c (get_proc_name): Catch clash between a procedure statement
214 and a contained subprogram
215
299ab1b2
SK
2162018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
217
218 PR fortran/69395
219 * decl.c (merge_array_spec): Correct the error condition.
220
64300da7
SK
2212018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
222
223 PR fortran/78741
224 * decl.c (get_proc_name): Check for clash of entry name with
225 subroutine name.
226
93d1ab50
SK
2272018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
228
229 PR fortran/69395
230 * decl.c (merge_array_spec): Limit the merging to maximum allowed
231 dimensions, and issue error message if limit is exceeded.
232
17164de4
SK
2332018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
234
235 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
236 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
237 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
238 * intrinsic.texi: Update documentation.
239 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
240 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
241 gfor_fndecl_kill and gfor_fndecl_kill_sub
242 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
243 functions.
244 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
245 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
246 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
247
26219cee
PT
2482018-03-11 Paul Thomas <pault@gcc.gnu.org>
249
250 PR fortran/84546
251 * trans-array.c (structure_alloc_comps): Make sure that the
252 vptr is copied and that the unlimited polymorphic _len is used
253 to compute the size to be allocated.
254 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
255 unlimited polymorphic _len for the offset to the element.
256 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
257 * trans.h : Add the boolean 'unlimited' to the prototype.
1813c97a
SK
258
2592018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
260
261 PR fortran/83939
262 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
263
fbe1f017
SK
2642018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
265
266 * check.c (gfc_check_kill): Check pid and sig are scalar.
267 (gfc_check_kill_sub): Restrict kind to 4 and 8.
268 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
269 keywords for KILL. Remove redundant *back="back" in favor of the
270 original *bck="back".
271 (add_subroutines): Sort keyword list. Add pid and sig keywords
272 for KILL.
273 * intrinsic.texi: Fix documentation to consistently use pid and sig.
274 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
275 correct function.
276 (gfc_resolve_rename_sub): Add comment.
277
2782018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
6f76317a
TK
279
280 PR fortran/66128
281 * simplify.c (simplify_transformation): Return default result for
282 empty array argument.
283 (gfc_simplify_all): Remove special-case handling for zerosize.
284 (gfc_simplify_any): Likewise.
285 (gfc_simplify_count): Likewise.
286 (gfc_simplify_iall): Likewise.
287 (gfc_simplify_iany): Likewise.
288 (gfc_simplify_iparity): Likewise.
289 (gfc_simplify_minval): Likewise.
290 (gfc_simplify_maxval): Likewise.
291 (gfc_simplify_norm2): Likewise.
292 (gfc_simplify_product): Likewise.
293 (gfc_simplify_sum): Likewise.
294
7d2fb01c
SK
2952018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
296
297 PR fortran/84734
298 * arith.c (check_result, eval_intrinsic): If result overflows, pass
299 the expression up the chain instead of a NULL pointer.
300
00df7c36
SK
3012018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
302
303 PR fortran/64124
304 PR fortran/70409
305 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
306
5867bb9a
TK
3072017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
308
309 PR fortran/84697
310 PR fortran/66128
311 * expr.c (simplify_parameter_variable): If p is a size zero array
312 and not an ARRAY_EXPR insert an empty array constructor and
313 return.
314 * gfortran.h: Add prototype for gfc_is_size_zero_array.
315 * simplify.c (is_size_zero_array): Make non-static and rename into
316 (gfc_is_size_zero_array): Check for parameter arrays of zero
317 size by comparing shape and absence of constructor.
318 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
319 is_size_zero_array.
320 (gfc_simplify_count): Likewise.
321 (gfc_simplify_iall): Likewise.
322 (gfc_simplify_iany): Likewise.
323 (gfc_simplify_iparity): Likewise.
324 (gfc_simplify_minval): Likewise.
325 (gfc_simplify_maxval): Likewise.
326 (gfc_simplify_product): Likewise.
327 (gfc_simplify_sum): Likewise.
328
284ee475
SK
3292018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
330
331 PR fortran/56667
332 * primary.c (match_sym_complex_part): Give the matcher for an implied
333 do-loop a chance to run.
334
ac80378f
HA
3352018-03-03 Harald Anlauf <anlauf@gmx.de>
336
337 PR fortran/71085
338 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
339 dereference NULL pointer.
340
94e6b5e5
SK
3412018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
342
343 PR fortran/66128
344 * simplify.c (is_size_zero_array): New function to check for size
345 zero array.
26219cee 346 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
94e6b5e5
SK
347 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
348 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
349 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
350 requirements from F2018.
351
a900a060
SK
3522018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
353
354 PR fortran/51434
355 * simplify.c (gfc_simplify_transfer): Resolve mold.
356
c8bd326c
PT
3572018-03-03 Paul Thomas <pault@gcc.gnu.org>
358
359 PR fortran/80965
360 * resolve.c (build_loc_call): Change symtree name from 'loc' to
361 '_loc'.
362
71a93e81
PT
3632018-03-01 Paul Thomas <pault@gcc.gnu.org>
364
365 PR fortran/84219
366 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
367 components are caf tokens.
368 (gfc_target_interpret_expr): Treat BT_VOID expressions as
369 integers.
370
b120c8b2
PT
3712018-03-01 Paul Thomas <pault@gcc.gnu.org>
372
373 PR fortran/84538
374 * class.c (class_array_ref_detected): Remove the condition that
375 there be no reference after the array reference.
376 (find_intrinsic_vtab): Remove excess whitespace.
377 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
378 as 'base and call build_class_array_ref earlier.
379
b14a13fa
PT
3802018-02-28 Paul Thomas <pault@gcc.gnu.org>
381
382 PR fortran/83901
383 * trans-stmt.c (trans_associate_var): Make sure that the se
384 expression is a pointer type before converting it to the symbol
385 backend_decl type.
386
09ef33c1
SK
3872018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
388
389 PR fortran/83633
390 * decl.c (variable_decl): Check that an explicit-shape-array with
391 nonconstant bounds is allowed.
392
8fba26f4
PT
3932018-02-25 Paul Thomas <pault@gcc.gnu.org>
394
395 PR fortran/84523
396 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
397 has a pre block, add it to the expression pre block.
398
6ef1366a
TK
3992018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
400
401 PR fortran/78238
402 * gfortran.h (gfc_integer_4_kind): Define.
403 * resolve.c (resolve_select_type): Make sure that the
404 kind of c->high is gfc_integer_4_kind.
405
c034c38f
SK
4062018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
407
408 PR fortran/30792
409 * decl.c (gfc_match_data): Check for invalid substring in
410 data-implied-do
411
161ac473
SK
4122018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
413
414 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
415
a26f63a8
SK
4162018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
417
418 PR fortran/84511
419 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
420
3453b6aa
SK
4212018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
422
423 PR fortran/84346
424 * interface.c (compare_actual_formal): Issue error if keyword is
425 used in a statement function.
426
55ebc31f
JD
4272018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
428
429 PR fortran/84506
430 * trans-io.c (set_parameter_value_inquire): Adjust range check of
431 negative unit values for kind=8 units to the kind=4 negative limit.
432
1996c75e
PT
4332018-02-23 Paul Thomas <pault@gcc.gnu.org>
434
435 PR fortran/83149
436 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
437 accessing its components.
438
6869c12d
PT
4392018-02-23 Paul Thomas <pault@gcc.gnu.org>
440
441 PR fortran/83149
442 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
443 before accessing its components.
444
c287dea0
PT
4452018-02-23 Paul Thomas <pault@gcc.gnu.org>
446
447 PR fortran/83148
448 * trans-const.c : Clean up some whitespace issues.
449 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
450 derived type has a kind value of zero, set it to the default
451 integer kind.
452
dffb1e22
JB
4532018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
454
455 PR fortran/84519
456 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
457 argument to stop and error stop decls.
458 * trans-stmt.c (gfc_trans_stop): Add false value to argument
459 lists.
460
6cc22cf4
JB
4612018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
462
463 PR 78534
464 PR 84509
465 * trans-decl.c (gfc_build_builtin_function_decls): Pass
466 gfc_int8_type node to pause_numeric, size_type_node to
467 pause_string.
468 * trans-stmt.c (gfc_trans_pause): Likewise.
469
3f5fabc0
JB
4702018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
471
472 * gfortran.texi: Update Coarray API description.
473 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
474 character lengths, int for exit codes.
475 (generate_coarray_sym_init): Use size_t for character length.
476 * trans-intrinsic.c (conv_co_collective): Likewise.
477 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
478 (gfc_trans_event_post_wait): Likewise.
479 (gfc_trans_sync): Likewise.
480 (gfc_trans_stop): Use size_t for character lengths, int for exit
481 codes.
482
04946c6b
TK
4832018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
484
485 PR fortran/48890
486 PR fortran/83823
487 * primary.c (gfc_convert_to_structure_constructor):
488 For a constant string constructor, make sure the length
489 is correct.
490
5c60dbc1
PT
4912018-02-19 Paul Thomas <pault@gcc.gnu.org>
492
493 PR fortran/83344
494 PR fortran/83975
495 * resolve.c (resolve_assoc_var): Rearrange the logic for the
496 determination of the character length of associate names. If
497 the associate name is missing a length expression or the length
498 expression is not a constant and the target is not a variable,
499 make the associate name allocatable and deferred length.
500 * trans-decl.c (gfc_get_symbol_decl): Null the character length
501 backend_decl for deferred length associate names that are not
502 variables. Set 'length' to gfc_index_zero_node for character
503 associate names, whose character length is a PARM_DECL.
504
d48fc34a
TK
5052018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
506
507 PR fortran/35339
508 * frontend-passes.c (traverse_io_block): Remove workaround for
509 PR 80945.
510
87e8aa3b
AV
5112018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
512
513 * gfortran.texi: Document additional src/dst_type. Fix some typos.
514 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
515 argument of _caf_*_by_ref () with * e { get, send, sendget }.
516 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
517 data referenced when generating a call to caf_get_by_ref ().
518 (conv_caf_send): Same but for caf_send_by_ref () and
519 caf_sendget_by_ref ().
520
26eacfe8
JD
5212018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
522
523 PR fortran/84389
524 * io.c (check_format): Allow FMT_COLON.
525
d5ace305
PT
5262018-02-18 Paul Thomas <pault@gcc.gnu.org>
527
528 PR fortran/80945
529 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
530 the typenode in the case of deferred length characters.
531
aab20638
TK
5322018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
533
534 PR fortran/84270
535 * frontend-passes (scalarized_expr): If the expression
536 is an assumed size array, leave in the last reference
537 and pass AR_SECTION instead of AR_FULL to gfc_resolve
538 in order to avoid an error.
539
a8399af8
PT
5402018-02-17 Paul Thomas <pault@gcc.gnu.org>
541
542 PR fortran/84115
543 * resolve.c (resolve_assoc_var): If a non-constant target expr.
544 has no string length expression, make the associate variable
545 into a deferred length, allocatable symbol.
546 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
547 the symbol.
548 * trans-stmt.c (trans_associate_var): Null and free scalar
549 associate names that are allocatable. After assignment, remove
550 the allocatable attribute to prevent reallocation.
551
83d9be55
JJ
5522018-02-16 Jakub Jelinek <jakub@redhat.com>
553
554 PR fortran/84418
555 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
556 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
557
5582018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
71a21b9e
DH
559
560 PR fortran/84354
561 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
562
f3ad8745
JW
5632018-02-15 Janus Weil <janus@gcc.gnu.org>
564
565 PR fortran/84409
566 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
567 length.
568
ee3bb1b7
JW
5692018-02-14 Janus Weil <janus@gcc.gnu.org>
570
571 PR fortran/84385
572 * match.c (gfc_match_select_type): Fix check for selector in
573 SELECT TYPE statement.
574
4155fafc
JW
5752018-02-13 Janus Weil <janus@gcc.gnu.org>
576
577 PR fortran/84313
578 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
579
7b47686d
AM
5802018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
581 Janne Blomqvist <jb@gcc.gnu.org>
582
583 * module.c (dump_module): Use lbasename to ensure that module
584 files are reproducible.
585
24abcc44
JW
5862018-02-12 Janus Weil <janus@gcc.gnu.org>
587
588 PR fortran/84273
589 * resolve.c (resolve_component): Fix checks of passed argument in
590 procedure-pointer components.
591
6a793a8d
FXC
5922018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
593
594 PR fortran/35299
595 * resolve.c (resolve_formal_arglist): Update error message.
596
61fad608
AV
5972018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
598
599 * gfortran.texi: Fix typos in documentation of caf_register ().
600 * trans-array.c (structure_alloc_comps): Only register a component of
601 a derived typed corray, not of an ultimate component coarray.
602
f3883269
SK
6032018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
604
605 PR fortran/54223
606 PR fortran/84276
607 * interface.c (compare_actual_formal): Add in_statement_function
608 bool parameter. Skip check of INTENT attribute for statement
609 functions. Arguments to a statement function cannot be optional,
610 issue error for missing argument.
611 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
612 in_statement_function.
613
e519d2e8
PT
6142018-02-11 Paul Thomas <pault@gcc.gnu.org>
615
616 PR fortran/84074
617 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
618 flag. If the is a vector subscript or the expression is not a
619 variable, make the descriptor one-based.
620
950ab3f1
PT
6212018-02-10 Paul Thomas <pault@gcc.gnu.org>
622
623 PR fortran/84141
624 PR fortran/84155
625 * trans-array.c (gfc_array_init_size): Revert the change made
626 in revision 257356 setting the dtype.
627 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
628 Call gfc_get_dtype_rank_type every time.
629
630 PR fortran/56691
631 * trans-array.c (gfc_conv_expr_descriptor): If the source array
632 is a descriptor type, use its offset, removing the condition
633 that is be a class expression.
634
b35a0ccd
SK
6352018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
636
637 PR fortran/82994
638 * match.c (gfc_match_deallocate): Check for NULL pointer.
639
82e259b8
TK
6402018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
641
642 PR fortran/68560
643 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
644 (gfc_conv_intrinsic_function): Call it.
645
52b16cb3
SK
6462018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
647
648 PR fortran/82049
649 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
650 try to resolve it. While here return early if possible.
651
26f822c2
PT
6522018-02-04 Paul Thomas <pault@gcc.gnu.org>
653
654 PR fortran/84115
655 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
656 'length' if the symbol charlen backend_decl is an indirect ref.
657
2c536ce7
PT
6582018-02-03 Paul Thomas <pault@gcc.gnu.org>
659
660 PR fortran/84141
661 PR fortran/84155
662 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
663 use gfc_get_dtype_rank_type.
664
ae976c33
JB
6652018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
666
667 PR 83975
668 PR 83344
669 * resolve.c (resolve_assoc_var): Generate an error if
670 target length unknown.
671
eae4d8fb
JB
6722018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
673
674 PR fortran/83705
675 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
676 to runtime, print a warning message.
677
c9243c04
JJ
6782018-01-31 Jakub Jelinek <jakub@redhat.com>
679
680 PR fortran/84116
681 * openmp.c (gfc_match_omp_clauses): If all the linear
682 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
683 nor set *head = NULL. Formatting fixes.
684
1af73491
PT
6852018-01-31 Paul Thomas <pault@gcc.gnu.org>
686
687 PR fortran/84088
688 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
689 an address expression passed to an assumed rank dummy, convert
690 to an indirect reference.
691
125a677d
TK
6922018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
693
694 * dump-parse-tree.c (write_proc): Use sym_name (which may
695 be sym->binding_label) instead of sym->name.
696
949b40a4
JB
6972018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
698
699 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
700 of int for slen.
701
9f3dcd14
JB
7022018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
703
704 PR fortran/78534
705 * trans-expr.c (fill_with_spaces): Use memset instead of
706 generating loop.
707 (gfc_trans_string_copy): Improve opportunity to use builtins with
708 constant lengths.
709
f2adfb89
JJ
7102018-01-30 Jakub Jelinek <jakub@redhat.com>
711
712 PR debug/84131
713 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
714 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
715
125a677d 7162018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
8fb2cc6b
TK
717
718 PR fortran/84134
719 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
720 zero, return false.
721
dca9e8be
TK
7222018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
723
724 PR fortran/84133
725 * frontend-passes (matmul_to_var_expr): Return early if
726 in association list.
727 (inline_matmul_assign): Likewise.
728
3be34c0b
TK
7292017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
730
731 PR fortran/84073
732 * resolve.c (resolve_component): Ensure BIND(C) character
733 components have length one.
734 (resolve_symbol): Likewise for variables.
735
aeb8c028
JJ
7362018-01-27 Jakub Jelinek <jakub@redhat.com>
737
738 PR fortran/84065
739 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
740 lengths.
741
f8862a1b 7422018-01-26 Damian Rouson <damian@sourceryinstitute.org>
aeb8c028
JJ
743 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
744 Soren Rasmussen <s.c.rasmussen@gmail.com>
f8862a1b
DR
745
746 Partial support for Fortran 2018 teams features.
747
748 * array.c (gfc_match_array_ref): add team attribute in coarray
749 transfers.
750 * check.c (gfc_check_get_team, gfc_check_team_number): add new
751 functions for get_team and team_number.
752 * dump-parse-tree.c (show_code_node): add new statements: form team,
753 change team, end team, and sync team.
754 * expr.c (gfc_find_team_co): add new function.
755 * gfortran.h: add new statements.
756 * intrinsic.c (add_functions): add get_team and team_number functions.
757 * intrinsic.h: add get_team and team_number prototypes for check,
758 simplify, and resolve.
759 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
760 functions.
761 * iso-fortran-env.def: add the team_type derived type.
762 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
763 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
764 add change team, end team, form team, sync team match and functions.
765 * match.h: add new prototypes for change team, end team, form team,
766 and sync team.
767 * parse.c (decode_statement): add cases for change team, end team,
768 form team, and sync team.
769 * resolve.c: add cases for exec form team, change team, end team, and
770 sync team.
771 * simplify.c (gfc_simplify_get_team): add new function for get team.
772 * st.c (gfc_free_statement): add cases exec for change team, end team,
773 form team, sync team.
774 * trans-decl.c (gfor_fndecl_caf_form_team)
775 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
776 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
777 (gfor_fndecl_caf_team_number): add functions and definitions.
778 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
779 new function and team_type argument support.
780 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
781 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
782 * trans-stmt.h: add new prototypes.
783 * trans-types.c (gfc_get_derived_type): check condition for team_type.
784 * trans.c (trans_code): new exec cases for form team, change team, end
785 team, and sync team.
786 * trans.h: add new prototypes.
787
deece1aa
SK
7882018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
789
790 PR fortran/83998
791 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
792 or .false. The summation does the correct type conversion.
793 (gfc_simplify_dot_product): Special case zero-sized arrays.
794
7fb43006
PT
7952018-25-01 Paul Thomas <pault@gcc.gnu.org>
796
797 PR fortran/37577
798 * array.c (gfc_match_array_ref): If standard earlier than F2008
799 it is an error if the reference dimension is greater than 7.
800 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
801 dtype masks and shifts accordingly.
802 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
803 type node to check the field.
804 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
805 (duplicate_allocatable_coarray): Access the rank field of the
806 dtype descriptor rather than the dtype itself.
807 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
808 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
809 (ie. a character).
810 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
811 get_scalar_to_descriptor_type if the actual expression is a
812 constant.
813 (gfc_trans_structure_assign): Assign the rank directly to the
814 dtype rank field.
815 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
816 to default integer kind.
817 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
818 'elem_len' field of the dtype.
819 * trans-io.c (gfc_build_io_library_fndecls): Replace
820 gfc_int4_type_node with dtype_type_node where necessary.
821 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
822 scalars.
823 * trans-types.c : Provide 'get_dtype_type_node' to acces the
824 dtype_type_node and, if necessary, build it.
825 The maximum size of an array element is now determined by the
826 maximum value of size_t.
827 Update the description of the array descriptor, including the
828 type def for the dtype_type.
829 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
830 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
831 (gfc_get_array_descriptor_base): Change the type of the dtype
832 field to dtype_type_node.
833 (gfc_get_array_descr_info): Get the offset to the rank field of
834 the dtype.
835 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
836 * trans.h : Define the indices of the dtype fields.
837
f59986b2
PT
8382018-23-01 Paul Thomas <pault@gcc.gnu.org>
839
840 PR fortran/83866
841 * decl.c (gfc_match_derived_decl): If eos not matched, recover
842 and emit error about garbage after declaration.
843
84ee745e
PT
8442018-23-01 Paul Thomas <pault@gcc.gnu.org>
845
846 PR fortran/83898
847 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
848 for characters.
849
6b271a2e
JB
8502018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
851
852 PR 78534
853 PR 83704
854 * arith.c (gfc_arith_concat): Use size_t for string length.
855 (gfc_compare_string): Likewise.
856 (gfc_compare_with_Cstring): Likewise.
857 * array.c (gfc_resolve_character_array_constructor): Use
858 HOST_WIDE_INT, gfc_mpz_get_hwi.
859 * check.c (gfc_check_fe_runtime_error): Use size_t.
860 * data.c (create_character_initializer): Use HOST_WIDE_INT,
861 gfc_extract_hwi.
862 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
863 (add_init_expr_to_sym): Use HOST_WIDE_INT.
864 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
865 gfc_extract_hwi.
866 (gfc_apply_init): Likewise.
867 * match.h (gfc_set_constant_character_len): Update prototype.
868 * primary.c (match_string_constant): Use size_t.
869 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
870 gfc_mpz_get_hwi.
871 * simplify.c (init_result_expr): Likewise.
872 (gfc_simplify_len_trim): Use size_t.
873 * target-memory.c (gfc_encode_character): Use size_t.
874 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
875 (interpret_array): Use size_t.
876 (gfc_interpret_character): Likewise.
877 * target-memory.h (gfc_encode_character): Update prototype.
878 (gfc_interpret_character): Likewise.
879 (gfc_target_interpret_expr): Likewise.
880 * trans-const.c (gfc_build_string_const): Use size_t for length
881 argument.
882 (gfc_build_wide_string_const): Likewise.
883 * trans-const.h (gfc_build_string_const): Likewise.
884 (gfc_build_wide_string_const): Likewise.
885
f5240750
SK
8862018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
887
888 PR fortran/83900
889 * simplify.c (gfc_simplify_matmul): Set return type correctly.
890
f18fee82
SK
8912018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
892
893 PR fortran/83900
894 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
895
fcf79237
HA
8962018-01-17 Harald Anlauf <anlauf@gmx.de>
897
898 PR fortran/83864
899 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
900
c004a341
HA
9012018-01-17 Harald Anlauf <anlauf@gmx.de>
902
903 PR fortran/83874
904 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
905
75a3c61a
LK
9062018-01-15 Louis Krupp <louis.krupp@zoho.com>
907
908 PR fortran/82257
909 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
910 from symbol marked unlimited polymorphic.
911 * resolve.c (resolve_structure_cons): Likewise.
912 * misc.c (gfc_typename): Don't dereference derived->components
913 if it's NULL.
914
64b1806b
TK
9152018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
916
917 PR fortran/54613
918 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
919 (gfc_logical_4_kind): New macro
920 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
921 (gfc_simplify_maxloc): Likewise.
922 (gfc_resolve_maxloc): Likewise.
923 (gfc_resolve_minloc): Likewise.
924 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
925 argument; also raise error if it is used (for now). Add it
926 if it isn't present.
927 * intrinsic.c (add_sym_4ml): Rename to
928 (add_sym_5ml), adjust for extra argument.
929 (add_functions): Add "back" constant. Adjust maxloc and minloc
930 for back argument.
931 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
932 not of gfc_logical_4_kind, convert.
933 (gfc_resolve_minloc): Likewise.
934 * simplify.c (gfc_simplify_minloc): Add back argument.
935 (gfc_simplify_maxloc): Likewise.
936 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
937 argument to %VAL to ensure passing by value.
938 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
939 also for library calls.
940
f208c5cc
JD
9412018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
942
943 PR fortran/82007
944 * resolve.c (resolve_transfer): Delete code looking for 'DT'
945 format specifiers in format strings. Set formatted to true if a
946 format string or format label is present.
947 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
948 whitespace.
64b1806b 949
83d9be55 9502018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
39f309ac
TK
951
952 PR fortran/83744
953 * dump-parse-tree.c (get_c_type_name): Remove extra line.
954 Change for loop to use declaration in for loop. Handle BT_LOGICAL
955 and BT_CHARACTER.
956 (write_decl): Add where argument. Fix indentation. Replace
957 assert with error message. Add typename to warning
958 in comment.
959 (write_type): Adjust locus to call of write_decl.
960 (write_variable): Likewise.
961 (write_proc): Likewise. Replace assert with error message.
962
567a6e1c
PT
9632018-01-13 Paul Thomas <pault@gcc.gnu.org>
964
965 PR fortran/52162
966 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
967 the rhs expression is neither an elemental nor a conversion
968 function.
969
970 PR fortran/83622
971 * trans-array.c (is_pointer_array): Remove unconditional return
972 of false for -fopenmp.
973
83d9be55 9742018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
700b62cc
TK
975 <emsr@gcc.gnu.org>
976
977 PR fortran/83803
978 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
979 for functions.
980
bdd82c9b
SK
9812018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
982
983 PR fortran/82367
984 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
985
266404a8
SK
9862018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
987
988 PR fortran/83093
989 * resolve.c (resolve_charlen): Check the type of cl->length
990 after resolution.
991
85c2c761
JB
9922018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
993
e10e60cb
JB
994 PR fortran/83740
995 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
996
9972018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
998
999 PR fortran/83740
85c2c761
JB
1000 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
1001 LHS type when assigning.
1002
d4319ef8
SK
10032018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
1004
1005 PR fortran/83742
1006 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
1007
8799df67
SK
10082018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
1009
1010 * match.c (gfc_match_allocate): Check for NULL pointer.
1011
a4f759de
SK
10122018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
1013
1014 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
1015
0b627b58
PT
10162018-01-08 Paul Thomas <pault@gcc.gnu.org>
1017
1018 PR fortran/83611
1019 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
1020 an initializer, convert the kind parameters and add to the
1021 component if the instance.
1022 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
1023 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
1024 for parameterized arrays. Clean up typos in comments. Convert
1025 parameterized array initializers and copy into the array.
1026 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
1027 parameterized types.
1028 *trans-stmt.c (trans_associate_var): Deallocate associate vars
1029 as necessary, when they are PDT function results for example.
1030
1031 PR fortran/83731
1032 * trans-array.c (structure_alloc_comps): Only compare len parms
1033 when they are declared explicitly.
1034
ee2d3987
JB
10352018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
1036
1037 PR fortran/50892
1038 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
1039 lhs type.
1040
f622221a
JB
10412018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
1042
1043 PR fortran/78534
1044 PR fortran/66310
1045 * array.c (got_charlen): Use gfc_charlen_int_kind.
1046 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
1047 hardcoded kind.
1048 (find_intrinsic_vtab): Likewise.
1049 * decl.c (match_char_length): Use gfc_charlen_int_kind.
1050 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
1051 (gfc_match_implicit): Use gfc_charlen_int_kind.
1052 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
1053 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
1054 * expr.c (gfc_get_character_expr): Length parameter of type
1055 gfc_charlen_t.
1056 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
1057 (gfc_extract_hwi): New function.
1058 (simplify_const_ref): Make string_len of type gfc_charlen_t.
1059 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
1060 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
1061 * gfortran.h (gfc_mpz_get_hwi): New prototype.
1062 (gfc_mpz_set_hwi): Likewise.
1063 (gfc_charlen_t): New typedef.
1064 (gfc_expr): Use gfc_charlen_t for character lengths.
1065 (gfc_size_kind): New extern variable.
1066 (gfc_extract_hwi): New prototype.
1067 (gfc_get_character_expr): Use gfc_charlen_t for character length.
1068 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
1069 * gfortran.texi: Update description of hidden string length argument.
1070 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
1071 (gfc_resolve_char_achar): Likewise.
1072 (gfc_resolve_repeat): Pass string length directly without
1073 temporary, use gfc_charlen_int_kind.
1074 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
1075 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
1076 * misc.c (gfc_mpz_get_hwi): New function.
1077 (gfc_mpz_set_hwi): New function.
1078 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
1079 (parse_integer): Don't complain about large integers.
1080 (write_atom): Use HOST_WIDE_INT for integers.
1081 (mio_integer): Handle integer type mismatch.
1082 (mio_hwi): New function.
1083 (mio_intrinsic_op): Use HOST_WIDE_INT.
1084 (mio_array_ref): Likewise.
1085 (mio_expr): Likewise.
1086 * primary.c (match_substring): Use gfc_charlen_int_kind.
1087 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
1088 (resolve_character_operator): Likewise.
1089 (resolve_assoc_var): Likewise.
1090 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
1091 (resolve_charlen): Use mpz_sgn to determine sign.
1092 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
1093 instead of long.
1094 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
1095 * target-memory.c (size_character): Length argument of type
1096 gfc_charlen_t.
1097 (gfc_encode_character): Likewise.
1098 (gfc_interpret_character): Use gfc_charlen_t.
1099 * target-memory.h (gfc_encode_character): Modify prototype.
1100 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
1101 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
1102 (trans_array_constructor): Use existing type.
1103 (get_array_charlen): Likewise.
1104 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
1105 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
1106 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
1107 (add_argument_checking): Likewise.
1108 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
1109 gfc_charlen_type_node.
1110 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
1111 4, fold_convert to correct type.
1112 (gfc_conv_class_to_class): Build const of type size_type_node for
1113 size.
1114 (gfc_copy_class_to_class): Likewise.
1115 (gfc_conv_string_length): Use same type in expression.
1116 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
1117 (gfc_conv_string_tmp): Make sure len is of the right type.
1118 (gfc_conv_concat_op): Use same type in expression.
1119 (gfc_conv_procedure_call): Likewise.
1120 (fill_with_spaces): Comment out memset() block due to spurious
1121 -Wstringop-overflow warnings.
1122 (gfc_trans_string_copy): Use gfc_charlen_type_node.
1123 (alloc_scalar_allocatable_for_subcomponent_assignment):
1124 fold_convert to right type.
1125 (gfc_trans_subcomponent_assign): Likewise.
1126 (trans_class_vptr_len_assignment): Build const of correct type.
1127 (gfc_trans_pointer_assignment): Likewise.
1128 (alloc_scalar_allocatable_for_assignment): fold_convert to right
1129 type in expr.
1130 (trans_class_assignment): Build const of correct type.
1131 * trans-intrinsic.c (gfc_conv_associated): Likewise.
1132 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
1133 * trans-io.c (gfc_build_io_library_fndecls): Use
1134 gfc_charlen_type_node for character lengths.
1135 (set_string): Convert to right type in assignment.
1136 * trans-stmt.c (gfc_trans_label_assign): Build const of
1137 gfc_charlen_type_node.
1138 (trans_associate_var): Likewise.
1139 (gfc_trans_character_select): Likewise.
1140 (gfc_trans_allocate): Likewise, don't typecast strlen result.
1141 (gfc_trans_deallocate): Don't typecast strlen result.
1142 * trans-types.c (gfc_size_kind): New variable.
1143 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
1144 from size_type_node.
1145 * trans-types.h: Fix comment.
1146
fbd35ba1
TK
11472018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
1148
1149 PR fortran/83683
1150 PR fortran/45689
1151 * check.c (gfc_check_eoshift): Check for string length and
1152 for conformance of boundary.
1153 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
1154 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
1155 * simplify.c (gfc_simplify_eoshift): New function.
1156
5c0caeb3
RS
11572018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1158 Alan Hayward <alan.hayward@arm.com>
1159 David Sherwood <david.sherwood@arm.com>
1160
1161 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
1162
928686b1
RS
11632018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1164 Alan Hayward <alan.hayward@arm.com>
1165 David Sherwood <david.sherwood@arm.com>
1166
1167 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
1168
8987beac
TK
11692018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
1170
1171 PR fortran/83664
1172 * check.c (gfc_check_eoshift): Error for missing boundary if array
1173 is not one of the standard types.
1174
65e6aea3
JJ
11752018-01-03 Jakub Jelinek <jakub@redhat.com>
1176
85ec4feb
JJ
1177 Update copyright years.
1178
65e6aea3
JJ
1179 * gfortranspec.c (lang_specific_driver): Update copyright notice
1180 dates.
1181 * gfc-internals.texi: Bump @copying's copyright year.
1182 * gfortran.texi: Ditto.
1183 * intrinsic.texi: Ditto.
1184 * invoke.texi: Ditto.
1185
a1d6c052
TK
11862017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1187
1188 PR fortran/45689
1189 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
1190 gfc_simplify_minloc to maxloc and minloc, respectively.
1191 * intrinsic.h: Add prototypes for gfc_simplify_minloc
1192 and gfc_simplify_maxloc.
1193 * simplify.c (min_max_chose): Adjust prototype. Modify function
1194 to have a return value which indicates if the extremum was found.
1195 (is_constant_array_expr): Fix typo in comment.
1196 (simplify_minmaxloc_to_scalar): New function.
1197 (simplify_minmaxloc_nodim): New function.
1198 (new_array): New function.
1199 (simplify_minmaxloc_to_array): New function.
1200 (gfc_simplify_minmaxloc): New function.
1201 (simplify_minloc): New function.
1202 (simplify_maxloc): New function.
1203
a9ec0cfc
TK
12042018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1205
1206 PR fortran/45689
1207 PR fortran/83650
1208 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
1209 range of arguments.
1210
f549bfb3
PT
12112018-01-01 Paul Thomas <pault@gcc.gnu.org>
1212
1213 PR fortran/83076
1214 * resolve.c (resolve_fl_derived0): Add caf_token fields for
1215 allocatable and pointer scalars, when -fcoarray selected.
1216 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
1217 field as well as the backend_decl.
1218 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
1219 derived types that are not vtypes. Components with caf_token
1220 attribute are pvoid types. For a component requiring it, find
1221 the caf_token field and have the component token field point to
1222 its backend_decl.
1223
1224 PR fortran/83319
1225 *trans-types.c (gfc_get_array_descriptor_base): Add the token
1226 field to the descriptor even when codimen not set.
21fa2a29 1227\f
65e6aea3 1228Copyright (C) 2018 Free Software Foundation, Inc.
ad41bd84
JM
1229
1230Copying and distribution of this file, with or without modification,
1231are permitted in any medium without royalty provided the copyright
1232notice and this notice are preserved.
This page took 3.230686 seconds and 5 git commands to generate.