]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
tree-core.h: Include symtab.h.
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
2
3 * convert.c: Adjust includes.
4 * cpp.c: Likewise.
5 * decl.c: Likewise.
6 * f95-lang.c: Likewise.
7 * iresolve.c: Likewise.
8 * match.c: Likewise.
9 * module.c: Likewise.
10 * options.c: Likewise.
11 * target-memory.c: Likewise.
12 * trans-array.c: Likewise.
13 * trans-common.c: Likewise.
14 * trans-const.c: Likewise.
15 * trans-decl.c: Likewise.
16 * trans-expr.c: Likewise.
17 * trans-intrinsic.c: Likewise.
18 * trans-io.c: Likewise.
19 * trans-openmp.c: Likewise.
20 * trans-stmt.c: Likewise.
21 * trans-types.c: Likewise.
22 * trans.c: Likewise.
23
24 2015-07-07 Andre Vehreschild <vehre@gmx.de>
25
26 PR fortran/66578
27 * trans-array.c (gfc_conv_expr_descriptor): Ensure array descriptor
28 is one-based for non-full array refs. Correct the offset when a
29 rank_remap occurs.
30
31 2015-07-06 Steven G. Kargl <kargl@gcc.gnu.org>
32
33 * io.c (check_char_variable): New function.
34 (match_open_element, match_close_element, match_file_element,
35 match_dt_element, match_inquire_element, match_wait_element): Use it.
36
37 2015-07-06 Andre Vehreschild <vehre@gmx.de>
38
39 PR fortran/58586
40 * resolve.c (resolve_symbol): Non-private functions in modules
41 with allocatable or pointer components are marked referenced
42 now. Furthermore is the default init especially for those
43 components now done in gfc_conf_procedure_call preventing
44 duplicate code.
45 * trans-decl.c (gfc_generate_function_code): Generate a fake
46 result decl for functions returning an object with allocatable
47 components and initialize them.
48 * trans-expr.c (gfc_conv_procedure_call): For value typed trees
49 use the tree without indirect ref. And for non-decl trees
50 add a temporary variable to prevent evaluating the tree
51 multiple times (prevent multiple function evaluations).
52 * trans.h: Made gfc_trans_structure_assign () protoype
53 available, which is now needed by trans-decl.c:gfc_generate_
54 function_code(), too.
55
56 2015-07-04 Steven G. Kargl <kargl@gcc.gnu.org>
57
58 PR fortran/66725
59 * io.c (is_char_type): New function to test for BT_CHARACTER
60 (gfc_match_open, gfc_match_close, match_dt_element): Use it.
61
62 2015-07-02 David Edelsohn <dje.gcc@gmail.com>
63
64 * trans-common.c: Include <map> after system.h.
65
66 2015-07-02 Paul Thomas <pault@gcc.gnu.org>
67
68 PR fortran/52846
69 * decl.c (get_proc_name): Make a partially populated interface
70 symbol to carry the characteristics of a module procedure and
71 its result.
72 (variable_decl): Declarations of dummies or results in the
73 abreviated form of module procedure is an error.
74 (gfc_match_import): IMPORT is not permitted in the interface
75 declaration of module procedures.
76 (match_attr_spec): Submodule variables have implicit save
77 attribute for F2008 onwards.
78 (gfc_match_prefix): Add 'module' as the a prefix and set the
79 module_procedure attribute.
80 (gfc_match_formal_arglist): For a module procedure keep the
81 interface formal_arglist from the interface, match new the
82 formal arguments and then compare the number and names of each.
83 (gfc_match_procedure): Add case COMP_SUBMODULE.
84 (gfc_match_function_decl, gfc_match_subroutine_decl): Set the
85 module_procedure attribute.
86 (gfc_match_entry, gfc_match_end): Add case COMP_SUBMODULE. If
87 attr abr_modproc_decl is set, switch the message accordingly
88 for subroutines and functions.
89 (gfc_match_submod_proc): New function to match the abbreviated
90 style of submodule declaration.
91 * gfortran.h : Add ST_SUBMODULE and ST_END_SUBMODULE. Add the
92 attribute bits 'used_in_submodule' and 'module_procedure'. Add
93 the bit field 'abr_modproc_decl' to gfc_symbol. Add prototypes
94 for 'gfc_copy_dummy_sym', 'gfc_check_dummy_characteristics' and
95 'gfc_check_result_characteristics'.
96 * interface.c : Add the prefix 'gfc_' to the names of functions
97 'check_dummy(result)_characteristics' and all their references.
98 * match.h : Add prototype for 'gfc_match_submod_proc' and
99 'gfc_match_submodule'.
100 (check_sym_interfaces): A module procedure is not an error in
101 a module procedure statment in a generic interface.
102 * module.c (gfc_match_submodule): New function. Add handling
103 for the 'module_procedure' attribute bit.
104 (gfc_use_module): Make sure that a submodule cannot use itself.
105 * parse.c (decode_statement): Set attr has_'import_set' for
106 the interface declaration of module procedures. Handle a match
107 occurring in 'gfc_match_submod_proc' and a match for
108 'submodule'.
109 (gfc_enclosing_unit): Include the state COMP_SUBMODULE.
110 (gfc_ascii_statement): Add END SUBMODULE.
111 (accept_statement): Add ST_SUBMODULE.
112 (parse_spec): Disallow statement functions in a submodule
113 specification part.
114 (parse_contained): Add ST_END_SUBMODULE and COMP_SUBMODULE
115 twice each.
116 (get_modproc_result): Copy the result symbol of the interface.
117 (parse_progunit): Call it.
118 (set_syms_host_assoc): Make symbols from the ancestor module
119 and submodules use associated, as required by the standard and
120 set all private components public. Module procedures 'external'
121 attribute bit is reset and the 'used_in_submodule' bit is set.
122 (parse_module): If this is a submodule, use the ancestor module
123 and submodules. Traverse the namespace, calling
124 'set_syms_host_assoc'. Add ST_END_SUBMODULE and COMP_SUBMODULE.
125 * parse.h : Add COMP_SUBMODULE.
126 * primary.c (match_variable): Add COMP_SUBMODULE.
127 * resolve.c (compare_fsyms): New function to compare the dummy
128 characteristics of a module procedure with its interface.
129 (resolve_fl_procedure): Compare the procedure, result and dummy
130 characteristics of a module_procedure with its interface, using
131 'compare_fsyms' for the dummy arguments.
132 * symbol.c (gfc_add_procedure): Suppress the check for existing
133 procedures in the case of a module procedure.
134 (gfc_add_explicit_interface): Skip checks that must fail for
135 module procedures.
136 (gfc_add_type): Allow a new type to be added to module
137 procedures, their results or their dummy arguments.
138 (gfc_copy_dummy_sym): New function to generate new dummy args
139 and copy the characteristics from the interface.
140 * trans-decl.c (gfc_sym_mangled_function_id): Module procedures
141 must always have their names mangled as if they are symbols
142 coming from a declaration in a module.
143 (gfc_get_symbol_decl): Add 'used_in_submodule' to the assert.
144 (gfc_finish_var_decl): Symbols with the 'used_in_submodule' bit
145 set are set DECL_EXTERNAL as if they were use associated.
146
147 2015-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
148
149 PR fortran/56520
150 * match.c (gfc_match_name): Special case unary minus and plus.
151
152 2015-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
153
154 PR fortran/66545
155 * primary.c (match_sym_complex_part): Do not dereference NULL pointer.
156
157 2015-07-01 Thomas Koenig <tkoenig@gcc.gnu.org>
158
159 * arith.c (gfc_arith_divide): With -Winteger-division,
160 warn about contant integer division if there is a non-zero
161 remainder.
162 * invoke.texi: Document -Winteger-division.
163 * lang.opt: Add -Winteger-division.
164
165 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
166
167 * f95-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
168 * trans-decl.c: Likewise.
169
170 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
171
172 * trans-decl.c (module_hasher): Likewise.
173 * trans.h (module_decl_hasher): Likewise.
174
175 2015-06-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
176
177 PR fortran/66528
178 * error.c (gfc_warning_check): Restore the default output_buffer
179 before calling diagnostic_action_after_output.
180 (gfc_error_check): Likewise.
181 (gfc_diagnostics_init): Add comment.
182
183 2015-06-23 Andre Vehreschild <vehre@gmx.de>
184
185 PR fortran/64674
186 * parse.c (parse_associate): Figure the rank and as of a
187 class array in an associate early.
188 * primary.c (gfc_match_varspec): Prevent setting the
189 dimension attribute on the sym for classes.
190 * resolve.c (resolve_variable): Correct the component
191 ref's type for associated variables. Add a full array ref
192 when class array's are associated.
193 (resolve_assoc_var): Correct the type of the symbol,
194 when in the associate the expression's rank becomes scalar.
195 * trans-expr.c (gfc_conv_variable): Indirect ref needed for
196 allocatable associated objects.
197
198 2015-06-19 Mikael Morin <mikael@gcc.gnu.org>
199
200 PR fortran/66549
201 * resolve.c (resolve_global_procedure): Don't save and restore
202 OpenMP state around the call to gfc_resolve.
203 (gfc_resolve): Save OpenMP state on entry and restore it on return.
204
205 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
206
207 * convert.c: Do not include input.h, line-map.h or is-a.h.
208 * cpp.c: Likewise.
209 * decl.c: Likewise.
210 * f95-lang.c: Likewise.
211 * gfortran.h: Likewise.
212 * iresolve.c: Likewise.
213 * match.c: Likewise.
214 * module.c: Likewise.
215 * options.c: Likewise.
216 * target-memory.c: Likewise.
217 * trans-array.c: Likewise.
218 * trans-common.c: Likewise.
219 * trans-const.c: Likewise.
220 * trans-decl.c: Likewise.
221 * trans-expr.c: Likewise.
222 * trans-intrinsic.c: Likewise.
223 * trans-io.c: Likewise.
224 * trans-openmp.c: Likewise.
225 * trans-stmt.c: Likewise.
226 * trans-types.c: Likewise.
227 * trans.c: Likewise.
228
229 2015-06-15 Andre Vehreschild <vehre@gmx.de>
230
231 PR fortran/44672
232 PR fortran/45440
233 PR fortran/57307
234 * gfortran.h: Extend gfc_code.ext.alloc to carry a
235 flag indicating that the array specification has to be
236 taken from expr3.
237 * resolve.c (resolve_allocate_expr): Add F2008 notify
238 and flag indicating source driven array spec.
239 (resolve_allocate_deallocate): Check for source driven
240 array spec, when array to allocate has no explicit
241 array spec.
242 * trans-array.c (gfc_array_init_size): Get lower and
243 upper bound from a tree array descriptor, except when
244 the source expression is an array-constructor which is
245 fixed to be one-based.
246 (retrieve_last_ref): Extracted from gfc_array_allocate().
247 (gfc_array_allocate): Enable allocate(array, source=
248 array_expression) as specified by F2008:C633.
249 (gfc_conv_expr_descriptor): Add class tree expression
250 into the saved descriptor for class arrays.
251 * trans-array.h: Add temporary array descriptor to
252 gfc_array_allocate ().
253 * trans-expr.c (gfc_conv_procedure_call): Special handling
254 for _copy() routine translation, that comes without an
255 interface. Third and fourth argument are now passed by value.
256 * trans-stmt.c (gfc_trans_allocate): Get expr3 array
257 descriptor for temporary arrays to allow allocate(array,
258 source = array_expression) for array without array
259 specification.
260
261 2015-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
262
263 * intrinsic.texi: Change \leq to < in descrition of imaginary
264 part in argument to log.
265
266 2015-06-11 Paul Thomas <pault@gcc.gnu.org>
267
268 PR fortran/66079
269 * trans-expr.c (gfc_conv_procedure_call): Allocatable scalar
270 function results must be freed and nullified after use. Create
271 a temporary to hold the result to prevent duplicate calls.
272 * trans-stmt.c (gfc_trans_allocate): Rename temporary variable
273 as 'source'. Deallocate allocatable components of non-variable
274 'source's.
275
276 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
277
278 * f95-lang.c (gfc_create_decls): Register the main translation unit
279 through the new debug hook.
280
281 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
282
283 * convert.c : Adjust include files.
284 * cpp.c : Likewise.
285 * decl.c : Likewise.
286 * f95-lang.c : Likewise.
287 * gfortran.h : Likewise.
288 * iresolve.c : Likewise.
289 * match.c : Likewise.
290 * module.c : Likewise.
291 * openmp.c : Likewise.
292 * options.c : Likewise.
293 * target-memory.c : Likewise.
294 * trans-array.c : Likewise.
295 * trans-common.c : Likewise.
296 * trans-const.c : Likewise.
297 * trans-decl.c : Likewise.
298 * trans-expr.c : Likewise.
299 * trans-intrinsic.c : Likewise.
300 * trans-io.c : Likewise.
301 * trans-openmp.c : Likewise.
302 * trans-stmt.c : Likewise.
303 * trans-types.c : Likewise.
304 * trans.c : Likewise.
305
306 2015-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
307
308 PR fortran/66245
309 * match.c (gfc_match_type_is, gfc_match_class_is): Check if the
310 return type spec or derived type spec is validate.
311
312 2015-06-06 Thomas Koenig <tkoenig@netcologne.de>
313
314 PR fortran/47659
315 * arith.c (eval_intrinsic_op): Set warn flag for
316 gfc_type_convert_binary if -Wconversion or -Wconversion-extra
317 are set.
318 (wprecision_real_real): New function.
319 (wprecision_int_real): New function.
320 (gfc_int2int): If -fno-range-check and -Wconversion are specified
321 and it is a narrowing conversion, warn.
322 (gfc_int2real): If there is a change in value for the conversion,
323 warn.
324 (gfc_int2complex): Likewise.
325 (gfc_real2int): If there is a fractional part to the real number,
326 warn with -Wconversion, otherwise warn with -Wconversion-extra.
327 (gfc_real2real): Emit warning if the constant was changed by
328 conversion with either -Wconversion or -Wconversion-extra. With
329 -Wconversion-extra, warn if no warning was issued earlier.
330 (gfc_real2complex): Likewise.
331 (gfc_complex2int): For -Wconversion or -Wconversion-extra, if
332 there was an imaginary part, warn; otherwise, warn for change in
333 value. Warn with -Wconversion-extra if no other warning was
334 issued.
335 (gfc_complex2real): For -Wconversion or -Wconversion-extra, if
336 there was an imaginary part, warn; otherwise, warn for change in
337 value. Warn with -Wconversion-extra if no other warning was
338 issued.
339 (gfc_complex2complex): For -Wconversion, warn if the value of
340 either the real or the imaginary part was changed. Warn for
341 -Wconversion-extra if no prior warning was issued.
342 * expr.c (gfc_check_assign): Remove check for change in value.
343 * primary.c (match_real_constant): For -Wconversion-extra, check
344 against a number in which the last non-zero digit has been
345 replaced with a zero. If the number compares equal, warn.
346 * intrinsic.c (gfc_convert_type_warn): Do not warn about constant
347 conversions.
348
349 2015-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
350
351 PR fortran/66347
352 * resolve.c (apply_default_init_local): Do not dereference a NULL
353 pointer.
354
355 2015-06-05 Thomas Koenig <tkoenig@gcc.gnu.org>
356
357 PR fortran/66385
358 * frontend-passes.c (combine_array_constructor): Return early if
359 inside a FORALL loop.
360
361 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
362
363 * f95-lang.c (gfc_write_global_declarations): Remove.
364 (LANG_HOOKS_WRITE_GLOBALS): Remove.
365 (gfc_write_global_declarations): Move code from here to...
366 (gfc_be_parse_file): ...here.
367 Call global_decl_processing.
368 * trans-decl.c (gfc_emit_parameter_debug_info): Rename global_decl
369 to early_global_decl.
370
371 2015-06-05 Russell Whitesides <russelldub@gmail.com>
372 Steven G. Kargl <kargl@gcc.gnu.org>
373
374 PR fortran/40958
375 PR fortran/60780
376 PR fortran/66377
377 * module.c (load_equiv): Add check for loading duplicate EQUIVALENCEs
378 from different modules. Eliminate the pruning of unused
379 equivalence-objects
380
381 2015-06-04 Thomas Koenig <tkoenig@netcologne.de>
382
383 PR fortran/58749
384 * iresolve.c (gfc_resolve_adjustl): If string has a charlen,
385 copy it to the function.
386 (gfc_resolve_adjustr): Likewise.
387
388 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
389
390 * convert.c: Adjust includes for restructured coretypes.h.
391 * cpp.c: Likewise.
392 * decl.c: Likewise.
393 * f95-lang.c: Likewise.
394 * iresolve.c: Likewise.
395 * match.c: Likewise.
396 * module.c: Likewise.
397 * options.c: Likewise.
398 * target-memory.c: Likewise.
399 * trans-array.c: Likewise.
400 * trans-common.c: Likewise.
401 * trans-const.c: Likewise.
402 * trans-decl.c: Likewise.
403 * trans-expr.c: Likewise.
404 * trans-intrinsic.c: Likewise.
405 * trans-io.c: Likewise.
406 * trans-openmp.c: Likewise.
407 * trans-stmt.c: Likewise.
408 * trans-types.c: Likewise.
409 * trans.c: Likewise.
410
411 2015-06-02 Steven G. Kargl <kargl@gcc.gnu.org>
412
413 PR fortran/66380
414 * simplify.c (gfc_simplify_reshape): Convert assert into returning
415 NULL, which triggers an error condition.
416
417 2015-05-27 Andre Vehreschild <vehre@gmx.de>
418
419 PR fortran/65548
420 * trans-stmt.c (gfc_trans_allocate): Add missing location
421 information for e3rhs.
422
423 2015-05-26 Paul Thomas <pault@gcc.gnu.org>
424
425 PR fortran/66082
426 * trans-array.c (gfc_conv_array_parameter): Ensure that all
427 non-variable arrays with allocatable components have the
428 components deallocated after the procedure call.
429
430 2015-05-24 Mikael Morin <mikael@gcc.gnu.org>
431
432 PR fortran/66257
433 * resolve.c (resolve_actual_arglist): Don't throw an error
434 if the argument with procedure pointer component is not a variable.
435
436 2015-05-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
437
438 PR fortran/44054
439 * gfortran.h (struct gfc_error_buf): Rename as
440 gfc_error_buffer. Move closer to push, pop and free
441 methods. Reimplement using an output_buffer.
442 * error.c (errors, warnings, warning_buffer, cur_error_buffer):
443 Delete everywhere in this file.
444 (error_char): Delete all contents.
445 (gfc_increment_error_count): Delete.
446 (gfc_error_now): Update comment. Set error_buffer.flag.
447 (gfc_warning_check): Do not handle warning_buffer.
448 (gfc_error_1): Delete.
449 (gfc_error_now_1): Delete.
450 (gfc_error_check): Simplify.
451 (gfc_move_error_buffer_from_to): Renamed from
452 gfc_move_output_buffer_from_to.
453 (gfc_push_error): Handle only gfc_error_buffer.
454 (gfc_pop_error): Likewise.
455 (gfc_free_error): Likewise.
456 (gfc_get_errors): Remove warnings and errors.
457 (gfc_diagnostics_init): Use static error_buffer.
458 (gfc_error_1,gfc_error_now_1): Delete declarations.
459 * symbol.c, decl.c, trans-common.c, data.c, expr.c, expr.c,
460 frontend-passes.c, resolve.c, match.c, parse.c: Replace
461 gfc_error_1 with gfc_error and gfc_error_now_1 with gfc_error_1
462 everywhere.
463 * f95-lang.c (gfc_be_parse_file): Do not update errorcount and
464 warningcount here.
465 * primary.c (match_complex_constant): Replace gfc_error_buf and
466 output_buffer with gfc_error_buffer.
467
468 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
469
470 * Make-lang.in (check_gfortran_parallelize): Update comment.
471
472 2015-05-21 Thomas Koenig <tkoenig@gcc.gnu.org>
473
474 PR fortran/66176
475 * frontend-passes.c (check_conjg_variable): New function.
476 (inline_matmul_assign): Use it to keep track of conjugated
477 variables.
478
479 2015-05-20 Andre Vehreschild <vehre@gmx.de>
480
481 PR fortran/65548
482 * trans-stmt.c (gfc_trans_allocate): Always retrieve the
483 descriptor or a reference to a source= expression for
484 arrays and non-arrays, respectively. Use a temporary
485 symbol and gfc_trans_assignment for all source=
486 assignments to allocated objects besides for class and
487 derived types.
488
489 2015-05-19 Jakub Jelinek <jakub@redhat.com>
490
491 PR middle-end/66199
492 * trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for
493 combined constructs.
494 (gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL
495 BIND_EXPR_BLOCK.
496
497 2015-05-19 David Malcolm <dmalcolm@redhat.com>
498
499 * cpp.c (maybe_print_line): Strengthen local "map" from
500 const line_map * to const line_map_ordinary *.
501 (cb_file_change): Likewise for param "map" and local "from".
502 (cb_line_change): Likewise for local "map".
503
504 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
505
506 * interface.c (compare_actual_formal): Use std::swap instead of
507 explicit swaps.
508 * trans-array.c (gfc_trans_scalarized_loop_end): Likewise.
509 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Likewise.
510
511 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
512
513 PR fortran/66106
514 * interface.c(gfc_match_end_interface): Enforce F2008 C1202 (R1201).
515 * match.c(gfc_op2string): Return 'none' for INTRINSIC_NONE.
516
517 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
518
519 PR fortran/66057
520 * decl.c(gfc_match_generic): Detected a malformed GENERIC statement.
521
522 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
523
524 PR fortran/66043
525 * gfortran.dg/storage_size_6.f90: New tests.
526
527 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
528
529 PR fortran/66043
530 * gfortran.dg/storage_size_6.f90: New tests.
531
532 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
533
534 PR fortran/66044
535 * decl.c(gfc_match_entry): Change a gfc_internal_error() into
536 a gfc_error()
537
538 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
539
540 PR fortran/66043
541 * gfortran.dg/storage_size_6.f90: New tests.
542
543 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
544
545 PR fortran/66040
546 * parse.c(verify_st_order): Replace a gfc_internal_error with your
547 generic gfc_error.
548
549 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
550
551 PR fortran/66039
552 * io.c (match_filepos): Check for incomplete/mangled REWIND, FLUSH,
553 BACKSPACE, and ENDFILE statements
554
555 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
556
557 PR fortran/64925
558 * symbol.c(check_conflict): Check for a conflict between a dummy
559 argument and an internal procedure name.
560
561 2015-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
562
563 PR fortran/65903
564 * io.c (format_lex): Change to NONSTRING when checking for
565 possible doubled quote.
566 * scanner.c (gfc_next_char_literal): Revert change from 64506
567 and add a check for quotes and return.
568
569 2015-05-16 Thomas Koenig <tkoenig@gcc.gnu.org>
570
571 PR fortran/66113
572 * expr.c (is_parent_of_current_ns): New function.
573 (check_restricted): Use it.
574
575 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
576
577 PR fortran/44054
578
579 Replace all calls to gfc_notify_std_1 with gfc_notify_std and
580 gfc_warning_1 with gfc_warning.
581 * decl.c (gfc_verify_c_interop_param): Here.
582 * resolve.c (resolve_branch): Here.
583 (resolve_fl_derived): Here.
584 * dependency.c (gfc_check_argument_var_dependency):
585 * scanner.c (preprocessor_line): Use gfc_warning_now_at. Fix line
586 counter and locations before and after warning.
587 * gfortran.h (gfc_warning_1, gfc_warning_now_1, gfc_notify_std_1):
588 Delete.
589 (gfc_warning_now_at): Declare.
590 * error.c (gfc_warning_1): Delete.
591 (gfc_notify_std_1): Delete.
592 (gfc_warning_now_1): Delete.
593 (gfc_format_decoder): Handle two locations.
594 (gfc_diagnostic_build_prefix): Rename as
595 gfc_diagnostic_build_kind_prefix.
596 (gfc_diagnostic_build_locus_prefix): Take an expanded_location
597 instead of diagnostic_info.
598 (gfc_diagnostic_build_locus_prefix): Add overload that takes two
599 expanded_location.
600 (gfc_diagnostic_starter): Handle two locations.
601 (gfc_warning_now_at): New.
602 (gfc_diagnostics_init): Initialize caret_chars array.
603 (gfc_diagnostics_finish): Reset caret_chars array to default.
604
605 2015-05-16 Mikael Morin <mikael@gcc.gnu.org>
606 Paul Thomas <pault@gcc.gnu.org>
607
608 PR fortran/65792
609 * trans-expr.c (gfc_trans_subcomponent_assign): Always assign
610 the expression component to the destination. In addition, if
611 the component has allocatable components, copy them and
612 deallocate those of the expression, if it is not a variable.
613 The expression is fixed if not a variable to prevent multiple
614 evaluations.
615
616 2015-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
617
618 PR fortran/66111
619 * frontend-passes.c (has_dimen_vector_ref): New function.
620 (inline_matmul_assign): Use it to return early in case
621 of unhandled vector subscripts.
622
623 2015-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
624
625 PR fortran/66041
626 PR fortran/37131
627 * gfortran.h (gfc_array_spec): Add field resolved.
628 * array.c (gfc_resolve_array_spec): Resolve array spec
629 only once.
630
631 2015-05-11 Mikael Morin <mikael@gcc.gnu.org>
632
633 PR fortran/66100
634 * simplify.c (simplify_bound): Fix assert to accept subobject arrays.
635
636 2015-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
637
638 PR fortran/66041
639 * frontend-passes.c (scalarized_expr): Set correct dimension and
640 shape for the expression to be passed to lbound. Remove trailing
641 references after array refrence.
642 (inline_matmul_assign): Remove gfc_copy_expr from calls
643 to scalarized_expr().
644
645 2015-05-10 Mikael Morin <mikael@gcc.gnu.org>
646
647 * simplify.c (simplify_bound_dim): Don't check for emptyness
648 in the case of cobound simplification. Factor lower/upper
649 bound differenciation before the actual simplification.
650 (simplify_bound): Remove assumed shape specific simplification.
651 Don't give up early for the lbound of an assumed shape.
652
653 2015-05-09 Mikael Morin <mikael@gcc.gnu.org>
654
655 PR fortran/65894
656 * trans-array.h (gfc_scalar_elemental_arg_saved_as_reference):
657 New prototype.
658 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
659 New function.
660 (gfc_add_loop_ss_code): Use gfc_scalar_elemental_arg_saved_as_reference
661 as conditional.
662 (gfc_walk_elemental_function_args): Set the dummy_arg field.
663 * trans.h (gfc_ss_info): New subfield dummy_arg.
664 * trans-expr.c (gfc_conv_procedure_call): Revert the change
665 of revision 222361.
666 (gfc_conv_expr): Use gfc_scalar_elemental_arg_saved_as_reference
667 as conditional.
668
669 2015-05-08 Mikael Morin <mikael@gcc.gnu.org>
670
671 * trans-array.c (gfc_walk_elemental_function_args):
672 Don't skip the advance to the next dummy argument when skipping
673 absent optional args.
674
675 2015-05-05 David Malcolm <dmalcolm@redhat.com>
676
677 * expr.c (check_inquiry): Fix indentation so that it reflects the
678 block structure.
679 * interface.c (compare_parameter): Likewise.
680 * parse.c (parse_oacc_structured_block): Likewise.
681 * target-memory.c (expr_to_char): Likewise.
682 * trans-types.c (gfc_init_kinds): Likewise.
683
684 2015-05-02 Steven G. Kargl <kargl@gcc.gnu.org>
685
686 PR fortran/65976
687 * invoke.texi: Remove 'no-' in '-fno-fixed-form'
688
689 2015-05-01 Mikael Morin <mikael@gcc.gnu.org>
690
691 * simplify.c (simplify_bound_dim): Tighten the check for array fullness
692 by also checking for absence of subreference.
693 (simplify_bound): Don't skip simplification if the array
694 has subreferences.
695 (simplify_cobound): Same.
696
697 2015-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
698
699 PR fortran/37131
700 * simplify.c (simplify_bound): Get constant lower bounds of one
701 from array spec for assumed and explicit shape shape arrays if
702 the lower bounds are indeed one.
703
704 2015-04-30 David Malcolm <dmalcolm@redhat.com>
705
706 * options.c (gfc_init_options): Remove spurious second
707 semicolon.
708 * trans-stmt.c (gfc_trans_allocate): Likewise.
709
710 2015-04-28 Andre Vehreschild <vehre@gmx.de>
711
712 * interface.c (gfc_compare_types): Check for unlimited
713 polymorphism flag in the correct position indepent of the _data
714 component being present or not. This prevents a segfault, when
715 the _data component is not present.
716 * symbol.c (gfc_type_compatible): Same.
717
718 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
719
720 * Make-lang.in (fortran.mostlyclean): Remove gfortran and
721 gfortran-cross.
722
723 2015-04-27 Andre Vehreschild <vehre@gmx.de>
724
725 PR fortran/59678
726 PR fortran/65841
727 * trans-array.c (duplicate_allocatable): Fixed deep copy of
728 allocatable components, which are liable for copy only, when
729 they are allocated.
730 (gfc_duplicate_allocatable): Add deep-copy code into if
731 component allocated block. Needed interface change for that.
732 (gfc_copy_allocatable_data): Supplying NULL_TREE for code to
733 add into if-block for checking whether a component was
734 allocated.
735 (gfc_duplicate_allocatable_nocopy): Likewise.
736 (structure_alloc_comps): Likewise.
737 * trans-array.h: Likewise.
738 * trans-expr.c (gfc_trans_alloc_subarray_assign): Likewise.
739 * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
740
741 2015-04-23 Andre Vehreschild <vehre@gmx.de>
742
743 PR fortran/60322
744 * expr.c (gfc_lval_expr_from_sym): Code to select the regular
745 or class array added.
746 * gfortran.h: Add IS_CLASS_ARRAY macro.
747 * trans-array.c (gfc_add_loop_ss_code): Treat class objects
748 to be referenced always.
749 (build_class_array_ref): Adapt retrieval of array descriptor.
750 (build_array_ref): Likewise.
751 (gfc_conv_array_ref): Hand the vptr or the descriptor to
752 build_array_ref depending whether the sym is class or not.
753 (gfc_trans_array_cobounds): Select correct gfc_array_spec for
754 regular and class arrays.
755 (gfc_trans_array_bounds): Likewise.
756 (gfc_trans_dummy_array_bias): Likewise.
757 (gfc_get_dataptr_offset): Correcting call of build_array_ref.
758 (gfc_conv_expr_descriptor): Set the array's offset to -1 when
759 lbound in inner most dim is 1 and symbol non-pointer/assoc.
760 * trans-decl.c (gfc_build_qualified_array): Select correct
761 gfc_array_spec for regular and class arrays.
762 (gfc_build_dummy_array_decl): Likewise.
763 (gfc_get_symbol_decl): Get a dummy array for class arrays.
764 (gfc_trans_deferred_vars): Tell conv_expr that the descriptor
765 is desired.
766 * trans-expr.c (gfc_class_vptr_get): Get the class descriptor
767 from the correct location for class arrays.
768 (gfc_class_len_get): Likewise.
769 (gfc_conv_intrinsic_to_class): Add handling of _len component.
770 (gfc_conv_class_to_class): Prevent access to unset array data
771 when the array is an optional argument. Add handling of _len
772 component.
773 (gfc_copy_class_to_class): Check that _def_init is non-NULL
774 when used in _vptr->copy()
775 (gfc_trans_class_init_assign): Ensure that the rank of
776 _def_init is zero.
777 (gfc_conv_component_ref): Get the _vptr along with _data refs.
778 (gfc_conv_variable): Make sure the temp array descriptor is
779 returned for class arrays, too, and that class arrays are
780 dereferenced correctly.
781 (gfc_conv_procedure_call): For polymorphic type initialization
782 the initializer has to be a pointer to _def_init stored in a
783 dummy variable, which then needs to be used by value.
784 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Use the
785 temporary array descriptor for class arrays, too.
786 (gfc_conv_intrinsic_storage_size): Likewise.
787 (gfc_conv_intrinsic_loc): Add ref to _data for BT_CLASS
788 expressions.
789 * trans-stmt.c (trans_associate_var): Use a temporary array for
790 the associate variable of class arrays, too, making the array
791 one-based (lbound == 1).
792 * trans-types.c (gfc_is_nodesc_array): Use the correct
793 array data.
794 * trans.c (gfc_build_array_ref): Use the dummy array descriptor
795 when present.
796 * trans.h: Add class_vptr to gfc_se for storing a class ref's
797 vptr.
798
799 2015-04-22 Steven G. Kargl <kargl@gcc.gnu.org>
800
801 PR fortran/65429
802 * decl.c (add_init_expr_to_sym): Set the length type parameter.
803
804 2015-04-10 Tobias Burnus <burnus@net-b.de>
805
806 * trans-stmt.c (gfc_trans_lock_unlock): Implement -fcoarray=lib
807 version; reject not-yet-implemented variants.
808 * trans-types.c (gfc_get_derived_type): For lock_type with
809 -fcoarray=lib, use a void pointer as type.
810 * trans.c (gfc_allocate_using_lib, gfc_allocate_allocatable):
811 Handle lock_type with -fcoarray=lib.
812
813 2015-04-10 Mikael Morin <mikael@gcc.gnu.org>
814
815 PR fortran/56674
816 PR fortran/58813
817 PR fortran/59016
818 PR fortran/59024
819 * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
820 former to the latter and make it non-static. Update callers.
821 * gfortran.h (gfc_save_symbol_data): New prototype.
822 * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
823 before modifying symbols 'sym' and 'dt_sym'.
824
825 2013-04-09 Paul Thomas <pault@gcc.gnu.org>
826
827 PR fortran/56852
828 * primary.c (gfc_variable_attr): Avoid ICE on AR_UNKNOWN if any
829 of the index variables are untyped and errors are present.
830
831 2015-04-07 Andre Vehreschild <vehre@gmx.de>
832
833 PR fortran/65548
834 * trans-stmt.c (gfc_trans_allocate): For intrinsic functions
835 use conv_expr_descriptor() instead of conv_expr_reference().
836
837 2015-03-30 Jakub Jelinek <jakub@redhat.com>
838
839 PR fortran/65597
840 * trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
841 linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
842 For implcitly added !simple OMP_CLAUSE_LINEAR set it too. Use step 1
843 instead of the original step on the new iterator - count.
844
845 2015-03-25 Mikael Morin <mikael@gcc.gnu.org>
846
847 PR fortran/64952
848 PR fortran/65532
849 * gfortran.h (struct gfc_namespace): New field 'types_resolved'.
850 * resolve.c (resolve_types): Return early if field 'types_resolved'
851 is set. Set 'types_resolved' at the end.
852
853 2015-03-24 Andre Vehreschild <vehre@gmx.de>
854
855 PR fortran/55901
856 * trans-expr.c (gfc_conv_structure): Fixed indendation.
857 Using integer_zero_node now instead of explicitly
858 constructing a integer constant zero node.
859 (gfc_conv_derived_to_class): Add handling of _len component,
860 i.e., when the rhs has a string_length then assign that to
861 class' _len, else assign 0.
862 (gfc_conv_intrinsic_to_class): Likewise.
863
864 2015-03-24 Andre Vehreschild <vehre@gmx.de>
865
866 PR fortran/64787
867 PR fortran/57456
868 PR fortran/63230
869 * class.c (gfc_add_component_ref): Free no longer needed
870 ref-chains to prevent memory loss.
871 (find_intrinsic_vtab): For deferred length char arrays or
872 unlimited polymorphic objects, store the size in bytes of one
873 character in the size component of the vtab.
874 * gfortran.h: Added gfc_add_len_component () define.
875 * trans-array.c (gfc_trans_create_temp_array): Switched to new
876 function name for getting a class' vtab's field.
877 (build_class_array_ref): Likewise.
878 (gfc_array_init_size): Using the size information from allocate
879 more consequently now, i.e., the typespec of the entity to
880 allocate is no longer needed. This is to address the last open
881 comment in PR fortran/57456.
882 (gfc_array_allocate): Likewise.
883 (structure_alloc_comps): gfc_copy_class_to_class () needs to
884 know whether the class is unlimited polymorphic.
885 * trans-array.h: Changed interface of gfc_array_allocate () to
886 reflect the no longer needed typespec.
887 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): New.
888 (gfc_reset_len): New.
889 (gfc_get_class_array_ref): Switch to new function name for
890 getting a class' vtab's field.
891 (gfc_copy_class_to_class): Added flag to know whether the class
892 to copy is unlimited polymorphic. Adding _len dependent code
893 then, which calls ->vptr->copy () with four arguments adding
894 the length information ->vptr->copy(from, to, from_len, to_cap).
895 (gfc_conv_procedure_call): Switch to new function name for
896 getting a class' vtab's field.
897 (alloc_scalar_allocatable_for_assignment): Use the string_length
898 as computed by gfc_conv_expr and not the statically backend_decl
899 which may be incorrect when ref-ing.
900 (gfc_trans_assignment_1): Use the string_length variable and
901 not the rse.string_length. The former has been computed more
902 generally.
903 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Switch to new
904 function name for getting a class' vtab's field.
905 (gfc_conv_intrinsic_storage_size): Likewise.
906 (gfc_conv_intrinsic_transfer): Likewise.
907 * trans-stmt.c (gfc_trans_allocate): Restructured to evaluate
908 source=expr3 only once before the loop over the objects to
909 allocate, when the objects are not arrays. Doing correct _len
910 initialization and calling of vptr->copy () fixing PR 64787.
911 (gfc_trans_deallocate): Reseting _len to 0, preventing future
912 errors.
913 * trans.c (gfc_build_array_ref): Switch to new function name
914 for getting a class' vtab's field.
915 (gfc_add_comp_finalizer_call): Likewise.
916 * trans.h: Define the prototypes for the gfc_class_vtab_*_get ()
917 and gfc_vptr_*_get () functions.
918 Added gfc_find_and_cut_at_last_class_ref () and
919 gfc_reset_len () routine prototype. Added flag to
920 gfc_copy_class_to_class () prototype to signal an unlimited
921 polymorphic entity to copy.
922
923 2015-03-24 Iain Sandoe <iain@codesourcery.com>
924 Tobias Burnus <burnus@net-b.de>
925
926 * gfortran.texi (_gfortran_caf_sync_memory): Improve wording.
927
928 2015-03-23 Paul Thomas <pault@gcc.gnu.org>
929 Mikael Morin <mikael@gcc.gnu.org>
930
931 PR fortran/64952
932 * gfortran.h (struct symbol_attribute) : New field
933 'array_outer_dependency'.
934 * trans.h (struct gfc_ss_info): New field 'array_outer_dependency'.
935 * module.c (enum ab_attribute): New value AB_ARRAY_OUTER_DEPENDENCY.
936 (attr_bits): Append same value to initializer.
937 (mio_symbol_attribute): Handle 'array_outer_dependency' attr
938 in module read and write.
939 * resolve.c (update_current_proc_outer_array_dependency): New function.
940 (resolve_function, resolve_call): Add code to update current procedure's
941 'array_outer_dependency' attribute.
942 (resolve_variable): Mark current procedure with attribute
943 array_outer_dependency if the variable is an array coming from outside
944 the current namespace.
945 (resolve_fl_procedure): Mark a procedure without body with attribute
946 'array_outer_dependency'.
947 * trans-array.c (gfc_conv_resolve_dependencies): If any ss is
948 marked as 'array_outer_dependency' generate a temporary.
949 (gfc_walk_function_expr): If the function may reference external arrays,
950 mark the head gfc_ss with flag 'array_outer_dependency'.
951
952 2015-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
953
954 PR libgfortran/59513
955 * gfortran.texi (Read/Write after EOF marker): New information.
956
957 2015-03-21 H.J. Lu <hongjiu.lu@intel.com>
958
959 * gfortran.texi (_gfortran_caf_sync_memory): Put @{xxx} in one
960 line.
961
962 2015-03-21 Tobias Burnus <burnus@net-b.de>
963
964 * gfortran.texi (_gfortran_caf_sync_all, _gfortran_caf_sync_images,
965 _gfortran_caf_sync_memory, _gfortran_caf_error_stop,
966 _gfortran_caf_error_stop_str, _gfortran_caf_atomic_define,
967 _gfortran_caf_atomic_ref, _gfortran_caf_atomic_cas,
968 _gfortran_caf_atomic_op): New sections.
969
970 2015-03-21 Tobias Burnus <burnus@net-b.de>
971
972 * trans-expr.c (gfc_get_tree_for_caf_expr): Reject unimplemented
973 coindexed coarray accesses.
974
975 2015-03-17 Paul Thomas <pault@gcc.gnu.org>
976
977 PR fortran/59198
978 * trans-types.c (gfc_get_derived_type): If an abstract derived
979 type with procedure pointer components has no other type of
980 component, return the backend_decl. Otherwise build the
981 components if any of the non-procedure pointer components have
982 no backend_decl.
983
984 2015-03-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
985
986 PR fortran/64432
987 *trans-intrinisic.c (conv_intrinsic_system_clock): Check the
988 smallest kind passed in user arguments and hardcode tesults for
989 KIND=1 or KIND=2 to indicate no clock available.
990
991 2015-03-16 Andre Vehreschild <vehre@gmx.de>
992
993 * resolve.c: Prevent segfault on illegal input.
994
995 2015-03-14 Mikael Morin <mikael@gcc.gnu.org>
996
997 PR fortran/61138
998 * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
999 field before reusing LSE.
1000
1001 2015-03-11 Janne Blomqvist <jb@gcc.gnu.org>
1002
1003 PR libfortran/65200
1004 * gfortran.texi: Document behavior when opening files without
1005 explicit ACTION= specifier.
1006
1007 2015-03-10 Paul Thomas <pault@gcc.gnu.org>
1008
1009 PR fortran/65024
1010 * trans-expr.c (gfc_conv_component_ref): If the component
1011 backend declaration is missing and the derived type symbol is
1012 available in the reference, call gfc_build_derived_type.
1013
1014 2015-03-10 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1015 Tobias Burnus <burnus@net-b.de>
1016
1017 * trans.h (caf_sync_memory): New function decl tree.
1018 * trans-decl.c (gfc_build_builtin_function_decls): Define it.
1019 (create_main_function): Don't call sync_synchronize and leave
1020 it to the CAF library.
1021 * trans-stmt.c (gfc_trans_stop): Ditto.
1022 (gfc_trans_sync): Ditto; add call library call for sync memory.
1023
1024 2015-03-08 Mikael Morin <mikael@gcc.gnu.org>
1025
1026 PR fortran/60898
1027 * resolve.c (resolve_symbol): Check that the symbol found by
1028 name lookup really is the current symbol being resolved.
1029
1030 2015-03-02 Tobias Burnus <burnus@net-b.de>
1031
1032 * check.c (gfc_check_atomic): Properly check for coarrayness
1033 and for being coindexed.
1034
1035 2015-02-26 Martin Liska <mliska@suse.cz>
1036
1037 * resolve.c: Rename enum 'comparison' to 'compare_result' as
1038 solution for -Wodr issue.
1039
1040 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1041
1042 PR libgomp/64625
1043 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1044 Remove macros.
1045 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1046 * types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1047 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1048 Remove function types.
1049 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR)
1050 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1051 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1052 New function types.
1053
1054 2015-02-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1055
1056 PR fortran/64980
1057 PR fortran/61960
1058 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
1059 for component references to class objects.
1060 (gfc_conv_procedure_call): Compare the class by name.
1061
1062 2015-02-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1063
1064 PR fortran/64506
1065 * scanner.c (gfc_next_char_literal): For free form source,
1066 check for '!' and if found, clear the comment and go back
1067 and get the next character. For fixed form source, skip the
1068 rest of the line.
1069
1070 2015-02-12 Paul Thomas <pault@gcc.gnu.org>
1071
1072 PR fortran/64932
1073 * trans-stmt.c (gfc_trans_deallocate): If a component array
1074 expression is not a descriptor type and it is a derived type
1075 that has allocatable components and is not finalizable, then
1076 deallocate the allocatable components.
1077
1078 2015-02-08 Mikael Morin <mikael@gcc.gnu.org>
1079
1080 PR fortran/63744
1081 * module.c (check_for_ambiguous): Change argument type
1082 from gfc_symbol to gfc_symtree. Check local (symtree) name
1083 instead of original (symbol) name.
1084 (read_module): Update caller.
1085
1086 2015-02-06 Paul Thomas <pault@gcc.gnu.org>
1087
1088 PR fortran/63205
1089 * gfortran.h: Add 'must finalize' field to gfc_expr and
1090 prototypes for gfc_is_alloc_class_scalar_function and for
1091 gfc_is_alloc_class_array_function.
1092 * expr.c (gfc_is_alloc_class_scalar_function,
1093 gfc_is_alloc_class_array_function): New functions.
1094 * trans-array.c (gfc_add_loop_ss_code): Do not move the
1095 expression for allocatable class scalar functions outside the
1096 loop.
1097 (conv_array_index_offset): Cope with deltas being NULL_TREE.
1098 (build_class_array_ref): Do not return with allocatable class
1099 array functions. Add code to pick out the returned class array.
1100 Dereference if necessary and return if not a class object.
1101 (gfc_conv_scalarized_array_ref): Cope with offsets being NULL.
1102 (gfc_walk_function_expr): Return an array ss for the result of
1103 an allocatable class array function.
1104 * trans-expr.c (gfc_conv_subref_array_arg): Remove the assert
1105 that the argument should be a variable. If an allocatable class
1106 array function, set the offset to zero and skip the write-out
1107 loop in this case.
1108 (gfc_conv_procedure_call): Add allocatable class array function
1109 to the assert. Call gfc_conv_subref_array_arg for allocatable
1110 class array function arguments with derived type formal arg..
1111 Add the code for handling allocatable class functions, including
1112 finalization calls to prevent memory leaks.
1113 (arrayfunc_assign_needs_temporary): Return if an allocatable
1114 class array function.
1115 (gfc_trans_assignment_1): Set must_finalize to rhs expression
1116 for allocatable class functions. Set scalar_to_array as needed
1117 for scalar class allocatable functions assigned to an array.
1118 Nullify the allocatable components corresponding the the lhs
1119 derived type so that the finalization does not free them.
1120
1121 2015-01-29 Andre Vehreschild <vehre@gmx.de>
1122 Janus Weil <janus@gcc.gnu.org>
1123
1124 PR fortran/60289
1125 Initial patch by Janus Weil
1126 * resolve.c (resolve_allocate_expr): Add check for comp. only
1127 when target is not unlimited polymorphic.
1128 * trans-stmt.c (gfc_trans_allocate): Assign correct value to
1129 _len component of unlimited polymorphic entities.
1130
1131 2015-02-05 Tobias Burnus <burnus@net-b.de>
1132
1133 PR fortran/64943
1134 * resolve.c (resolve_transfer): Also check structure
1135 constructors.
1136
1137 2015-02-05 Paul Thomas <pault@gcc.gnu.org>
1138
1139 PR fortran/64757
1140 * resolve.c (resolve_structure_cons): Obtain the rank of class
1141 components.
1142 * trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
1143 assignment to allocatable class array components.
1144 (alloc_scalar_allocatable_for_subcomponent_assignment): If comp
1145 is a class component, allocate to the _data field.
1146 (gfc_trans_subcomponent_assign): If a class component with a
1147 derived type expression set the _vptr field and for array
1148 components, call gfc_trans_alloc_subarray_assign. For scalars,
1149 the assignment is performed here.
1150
1151 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1152
1153 * options.c: Include langhooks.h.
1154 (gfc_post_options): Change lang_hooks.name based on
1155 selected -std= mode.
1156
1157 2015-02-03 Steven G. Kargl <kargl@gcc.gnu.org>
1158
1159 * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
1160
1161 2015-01-30 Andre Vehreschild <vehre@gmx.de>
1162
1163 * trans-decl.c (gfc_get_symbol_decl): Removed duplicate code.
1164 * trans-expr.c (gfc_conv_intrinsic_to_class): Fixed indentation.
1165 Fixed datatype of charlen to be a 32-bit int.
1166
1167 2015-02-01 Joseph Myers <joseph@codesourcery.com>
1168
1169 * error.c (gfc_warning (const char *, ...), gfc_warning_now (const
1170 char *, ...)): Remove functions.
1171 * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
1172 (const char *, ...)): Remove declarations.
1173 * arith.c, check.c, data.c, decl.c, frontend-passes.c,
1174 interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
1175 options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
1176 trans-common.c, trans-const.c, trans-stmt.c: All callers of
1177 gfc_warning and gfc_warning_now changed to pass 0 or option number
1178 as first argument.
1179
1180 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1181
1182 * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All
1183 callers of fatal_error changed to pass input_location as first
1184 argument.
1185
1186 2015-01-28 Tobias Burnus <burnus@net-b.de>
1187
1188 * intrinsic.texi (CO_BROADCAST): Correct argument description.
1189
1190 2015-01-27 Tobias Burnus <burnus@net-b.de>
1191
1192 PR fortran/63861
1193 * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses):
1194 Fix handling for scalar coarrays.
1195 * trans-types.c (gfc_get_element_type): Add comment.
1196
1197 2015-01-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1198
1199 PR fortran/64771
1200 * interface.c: Remove <algorithm>.
1201 (check_dummy_characteristics): Use MAX instead of std::max.
1202
1203 2015-01-26 Paul Thomas <pault@gcc.gnu.org>
1204
1205 PR fortran/62044
1206 * resolve.c (resolve_allocate_expr): If the default initializer
1207 is NULL, keep the original MOLD expression so that the correct
1208 typespec is available.
1209
1210 2015-01-26 Tobias Burnus <burnus@net-b.de>
1211
1212 PR fortran/64771
1213 * interface.c (check_dummy_characteristics): Fix coarray handling.
1214
1215 2015-01-26 Tobias Burnus <burnus@net-b.de>
1216
1217 * io.c (gfc_match_inquire): Replace "-1" by a defined constant.
1218
1219 2015-01-26 Janus Weil <janus@gcc.gnu.org>
1220
1221 PR fortran/64230
1222 * class.c (finalize_component): New argument 'sub_ns'. Insert code to
1223 check if 'expr' is associated.
1224 (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
1225 'ptr2'. Pass 'sub_ns' to finalize_component.
1226
1227 2015-01-25 Mikael Morin <mikael@gcc.gnu.org>
1228
1229 PR fortran/62044
1230 * decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
1231 * module.c (MOD_VERSION): Bump.
1232 (write_module): Don't write list of extensions.
1233 (read_module): Don't jump over list of extensions;
1234 don't load list of extensions.
1235 (load_derived_extensions, write_dt_extensions,
1236 write_derived_extensions): Remove.
1237
1238 2015-01-24 Tobias Burnus <burnus@net-b.de>
1239
1240 * parse.c (gfc_parse_file): Fix two-location gfc_error call.
1241
1242 2015-01-23 Martin Liska <mliska@suse.cz>
1243
1244 * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
1245 false positive during profiledbootstrap by initializing them.
1246 * matchexp.c (match_mult_operand): Likewise.
1247 * module.c (write_atom): Likewise.
1248 (read_module): Likewise.
1249
1250 2015-01-23 Tom de Vries <tom@codesourcery.com>
1251
1252 PR libgomp/64672
1253 * lang.opt (fopenacc): Mark as LTO option.
1254
1255 2015-01-23 Tom de Vries <tom@codesourcery.com>
1256
1257 PR libgomp/64707
1258 * lang.opt (fopenmp): Mark as LTO option.
1259
1260 2015-01-23 Andre Vehreschild <vehre@gmx.de>
1261
1262 * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
1263 * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
1264
1265 2015-01-23 Jakub Jelinek <jakub@redhat.com>
1266
1267 * gfc-diagnostic.def (DK_ICE_NOBT): New kind.
1268
1269 2015-01-23 Janus Weil <janus@gcc.gnu.org>
1270
1271 PR fortran/60922
1272 * class.c (finalize_component): Apply the check for 'fini_coarray' only
1273 to coarray components.
1274
1275 2015-01-23 Tobias Burnus <burnus@net-b.de>
1276
1277 PR fortran/64726
1278 * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
1279 loop generation.
1280
1281 2015-01-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1282
1283 PR fortran/61933
1284 * libgfortran.h:
1285 * trans-io.c (set_parameter_value): Delete use of has_iostat.
1286 Redefine to not generate any runtime error check calls.
1287 (set_parameter_value_chk): Rename of the former
1288 set_parameter_value with the runtime error checks and fix
1289 whitespace. (set_parameter_value_inquire): New function that
1290 builds a runtime conditional block to set the INQUIRE
1291 common parameter block unit number to -2 when unit numbers
1292 exceed positive KIND=4 limits. (gfc_trans_open): Whitespace.
1293 For unit, use the renamed set_parameter_value_chk.
1294 (gfc_trans_close): Likewise use renamed function.
1295 (build_filepos): Whitespace and use renamed function.
1296 (gfc_trans_inquire): Whitespace and for unit use
1297 set_parameter_value and set_parameter_value_inquire.
1298 (gfc_trans_wait): Remove p->iostat from call to
1299 set_parameter_value. Use new set_parameter_value_chk for unit.
1300 (build_dt): Use the new set_parameter_value without p->iostat
1301 and fix whitespace. Use set_parameter_value_chk for unit.
1302
1303 2015-01-21 Thomas Koenig <tkoenig@netcologne.de>
1304
1305 PR fortran/57023
1306 * dependency.c (callback_dummy_intent_not_int): New function.
1307 (dummy_intent_not_in): New function.
1308 (gfc_full_array_ref_p): Use dummy_intent_not_in.
1309
1310 2015-01-18 Andre Vehreschild <vehre@gmx.de>
1311 Janus Weil <janus@gcc.gnu.org>
1312
1313 PR fortran/60255
1314 * class.c (gfc_get_len_component): New.
1315 (gfc_build_class_symbol): Add _len component to unlimited
1316 polymorphic entities.
1317 (find_intrinsic_vtab): Removed emitting of error message.
1318 * gfortran.h: Added prototype for gfc_get_len_component.
1319 * simplify.c (gfc_simplify_len): Use _len component where
1320 available.
1321 * trans-expr.c (gfc_class_len_get): New.
1322 (gfc_conv_intrinsic_to_class): Add handling for deferred
1323 character arrays.
1324 (gfc_conv_structure): Treat _len component correctly.
1325 (gfc_conv_expr): Prevent bind_c handling when not required.
1326 (gfc_trans_pointer_assignment): Propagate _len component.
1327 * trans-stmt.c (class_has_len_component): New.
1328 (trans_associate_var): _len component treatment for associate
1329 context.
1330 (gfc_trans_allocate): Same as for trans_associate_var()
1331 * trans.h: Added prototype for gfc_class_len_get.
1332
1333 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
1334
1335 PR fortran/57959
1336 * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
1337 for allocatable components, where the source is a variable.
1338
1339 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
1340
1341 PR fortran/55901
1342 * primary.c (gfc_match_varspec): Exclude dangling associate-
1343 names with dimension 0 from being counted as arrays.
1344 * resolve.c (resolve_assoc_var): Sub-strings are permissible
1345 for associate-names, so exclude characters from the test for
1346 misuse as arrays.
1347 * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
1348 the hidden string length variable of their associated target.
1349 Signal this by setting 'length' to a constant, if the decl for
1350 the string length is a variable.
1351
1352 2015-01-17 Paul Thomas <pault@gcc.gnu.org>
1353
1354 PR fortran/64578
1355 * trans-expr.c (gfc_trans_pointer_assignment): Make sure that
1356 before reinitializing rse, to add the rse.pre to block before
1357 creating 'ptrtemp'.
1358 * trans-intrinsic.c (gfc_conv_associated): Deal with the class
1359 data being a descriptor.
1360
1361 2015-01-17 Andre Vehreschild <vehre@gmx.de>
1362
1363 PR fortran/60357
1364 * primary.c (build_actual_constructor): Prevent warning.
1365 * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
1366 assignment): New function encapsulates treatment of allocatable
1367 components.
1368 (gfc_trans_subcomponent_assign): Needed to distinguish between
1369 regular assignment and initilization.
1370 (gfc_trans_structure_assign): Same.
1371 (gfc_conv_structure): Same.
1372
1373 PR fortran/61275
1374 * gfortran.h: deferred_parameter is not needed, because
1375 it artificial does the trick completely.
1376 * primary.c (build_actual_constructor): Same.
1377 (gfc_convert_to_structure_constructor): Same.
1378 * resolve.c (resolve_fl_derived0): Same.
1379 * trans-expr.c (gfc_conv_component_ref): Prevent treating
1380 allocatable deferred length char arrays here.
1381 (gfc_trans_subcomponent_assign): Same as above.
1382 * trans-types.c (gfc_sym_type): This is done in
1383 gfc_get_derived_type already.
1384
1385 2015-01-17 Andre Vehreschild <vehre@gmx.de>
1386
1387 PR fortran/60334
1388 * trans-decl.c (gfc_get_symbol_decl):Use a ref on the string
1389 length when the symbol is declared to be a result.
1390 * trans-expr.c (gfc_conv_procedure_call): Strip deref on the
1391 string length when functions are nested and the string length
1392 is a reference already.
1393
1394 2015-01-16 Janus Weil <janus@gcc.gnu.org>
1395
1396 PR fortran/45290
1397 * decl.c (match_pointer_init): Error out if resolution of init expr
1398 failed.
1399
1400 2015-01-15 Tobias Burnus <burnus@net-b.de>
1401
1402 * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
1403 resolve_oacc_deviceptr_clause, resolve_omp_clauses,
1404 gfc_resolve_oacc_declare): Replace '%s' by %qs.
1405
1406 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1407 Cesar Philippidis <cesar@codesourcery.com>
1408 James Norris <jnorris@codesourcery.com>
1409 Ilmir Usmanov <i.usmanov@samsung.com>
1410 Tobias Burnus <burnus@net-b.de>
1411
1412 * lang.opt (fopenacc): New option.
1413 * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
1414 * dump-parse-tree.c (show_omp_node): Split part of it into...
1415 (show_omp_clauses): ... this new function.
1416 (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
1417 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
1418 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1419 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1420 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1421 (show_namespace): Update for OpenACC.
1422 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
1423 (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
1424 (DEF_GOACC_BUILTIN_COMPILER): New macros.
1425 * types.def (BT_FN_VOID_INT_INT_VAR)
1426 (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1427 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1428 New function types.
1429 * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
1430 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
1431 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
1432 ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
1433 ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
1434 ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
1435 ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
1436 ST_OACC_ROUTINE.
1437 (struct gfc_expr_list): New data type.
1438 (gfc_get_expr_list): New macro.
1439 (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
1440 OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
1441 OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
1442 (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
1443 (OMP_LIST_CACHE): New enumerators.
1444 (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
1445 vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
1446 wait_list, tile_list, async, gang, worker, vector, seq,
1447 independent, wait, par_auto, gang_static, and loc members.
1448 (struct gfc_namespace): Add oacc_declare_clauses member.
1449 (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
1450 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
1451 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1452 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1453 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1454 (gfc_free_expr_list, gfc_resolve_oacc_directive)
1455 (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
1456 (gfc_resolve_oacc_blocks): New prototypes.
1457 * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
1458 EXEC_OACC_PARALLEL_LOOP.
1459 * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
1460 (gfc_match_oacc_update, gfc_match_oacc_declare)
1461 (gfc_match_oacc_loop, gfc_match_oacc_host_data)
1462 (gfc_match_oacc_data, gfc_match_oacc_kernels)
1463 (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
1464 (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
1465 (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
1466 prototypes.
1467 * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
1468 (gfc_free_omp_clauses): Update for members added to struct
1469 gfc_omp_clauses.
1470 (gfc_match_omp_clauses): Change mask paramter to uint64_t. Add
1471 openacc parameter.
1472 (resolve_omp_clauses): Add openacc parameter. Update for OpenACC.
1473 (struct fortran_omp_context): Add is_openmp member.
1474 (gfc_resolve_omp_parallel_blocks): Initialize it.
1475 (gfc_resolve_do_iterator): Update for OpenACC.
1476 (gfc_resolve_omp_directive): Call
1477 resolve_omp_directive_inside_oacc_region.
1478 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
1479 (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
1480 (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
1481 (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
1482 (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
1483 (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
1484 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
1485 (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
1486 (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
1487 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
1488 (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
1489 (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
1490 (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
1491 (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
1492 (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
1493 (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
1494 (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
1495 (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
1496 (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
1497 (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
1498 (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
1499 (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
1500 (gfc_match_omp_clauses): Handle those.
1501 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
1502 (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
1503 (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
1504 (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
1505 (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
1506 (OACC_WAIT_CLAUSES): New macros.
1507 (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
1508 (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
1509 (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
1510 (gfc_match_oacc_kernels, gfc_match_oacc_data)
1511 (gfc_match_oacc_host_data, gfc_match_oacc_loop)
1512 (gfc_match_oacc_declare, gfc_match_oacc_update)
1513 (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
1514 (gfc_match_oacc_wait, gfc_match_oacc_cache)
1515 (gfc_match_oacc_routine, oacc_is_loop)
1516 (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
1517 (check_symbol_not_pointer, check_array_not_assumed)
1518 (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
1519 (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
1520 (omp_code_to_statement, oacc_code_to_statement)
1521 (resolve_oacc_directive_inside_omp_region)
1522 (resolve_omp_directive_inside_oacc_region)
1523 (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
1524 (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
1525 (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
1526 (gfc_resolve_oacc_directive): New functions.
1527 * parse.c (next_free): Update for OpenACC. Move some code into...
1528 (verify_token_free): ... this new function.
1529 (next_fixed): Update for OpenACC. Move some code into...
1530 (verify_token_fixed): ... this new function.
1531 (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
1532 ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
1533 (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
1534 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
1535 ST_OACC_KERNELS_LOOP.
1536 (case_decl): Add ST_OACC_ROUTINE.
1537 (push_state, parse_critical_block, parse_progunit): Update for
1538 OpenACC.
1539 (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
1540 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
1541 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
1542 ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
1543 ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
1544 ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
1545 ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
1546 ST_OACC_ROUTINE.
1547 (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
1548 (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
1549 ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
1550 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
1551 (decode_oacc_directive, parse_oacc_structured_block)
1552 (parse_oacc_loop, is_oacc): New functions.
1553 * parse.h (struct gfc_state_data): Add oacc_declare_clauses
1554 member.
1555 (is_oacc): New prototype.
1556 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
1557 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
1558 EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
1559 EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
1560 EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
1561 EXEC_OACC_EXIT_DATA.
1562 (resolve_codes): Call gfc_resolve_oacc_declare.
1563 * scanner.c (openacc_flag, openacc_locus): New variables.
1564 (skip_free_comments): Update for OpenACC. Move some code into...
1565 (skip_omp_attribute): ... this new function.
1566 (skip_oacc_attribute): New function.
1567 (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
1568 * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
1569 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
1570 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
1571 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
1572 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
1573 * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
1574 * trans-openmp.c: Include "gomp-constants.h".
1575 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
1576 instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND.
1577 (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
1578 OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
1579 OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
1580 OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
1581 OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
1582 independent, wait_list, num_gangs_expr, num_workers_expr,
1583 vector_length_expr, vector, vector_expr, worker, worker_expr,
1584 gang, gang_expr members.
1585 (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
1586 (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
1587 (gfc_trans_oacc_executable_directive)
1588 (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
1589 (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
1590 * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
1591 * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
1592 New prototypes.
1593 * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
1594 EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
1595 EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
1596 EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
1597 EXEC_OACC_EXIT_DATA.
1598 * gfortran.texi: Update for OpenACC.
1599 * intrinsic.texi: Likewise.
1600 * invoke.texi: Likewise.
1601
1602 2015-01-15 Janus Weil <janus@gcc.gnu.org>
1603
1604 PR fortran/58023
1605 * resolve.c (resolve_fl_derived0): Continue resolving next component
1606 after error.
1607
1608 2015-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1609
1610 PR fortran/61933
1611 * io.c (gfc_match_inquire): Generate error if unit number in
1612 inquire statement is a constant -1. All other values allowed.
1613 * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
1614 (create_dummy_iostat): Delete function no longer used.
1615
1616 2015-01-13 Jakub Jelinek <jakub@redhat.com>
1617
1618 PR fortran/64528
1619 * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
1620 on dummy args with VALUE attribute.
1621
1622 2015-01-11 Janus Weil <janus@gcc.gnu.org>
1623
1624 PR fortran/63733
1625 * interface.c (gfc_extend_expr): Look for type-bound operators before
1626 non-typebound ones.
1627
1628 2015-01-11 Janus Weil <janus@gcc.gnu.org>
1629
1630 PR fortran/58023
1631 * resolve.c (resolve_fl_derived0): Set error flag if problems with the
1632 interface of a procedure-pointer component were detected.
1633
1634 2015-01-11 Janus Weil <janus@gcc.gnu.org>
1635
1636 PR fortran/64508
1637 * interface.c (compare_parameter): Interface check for
1638 procedure-pointer component as actual argument.
1639
1640 2015-01-10 Thomas Schwinge <thomas@codesourcery.com>
1641
1642 * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
1643 Runtime Library" to "GNU Offloading and Multi Processing Runtime
1644 Library".
1645 * intrinsic.texi: Likewise.
1646
1647 2015-01-10 Tobias Burnus <burnus@net-b.de>
1648
1649 PR fortran/64522
1650 * invoke.texi (Wline-truncation): Document new behaviour.
1651 * lang.opt (Wline-truncation): Add Init(-1).
1652 * options.c (gfc_post_options): If -Wline-truncation is unset,
1653 enable it for free-form source files; for the latter, also use
1654 -Werror=line-truncation, unless -Wno-error has been specified.
1655
1656 2015-01-09 Michael Collison <michael.collison@linaro.org>
1657
1658 * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1659 input.h, alias.h, symtab.h, options.h, fold-const.h,
1660 wide-int.h, and inchash.h due to flattening of tree.h.
1661 * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1662 input.h, alias.h, symtab.h, fold-const.h,
1663 wide-int.h, and inchash.h due to flattening of tree.h.
1664 * decl.c: Ditto.
1665 * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1666 input.h, alias.h, symtab.h, options.h, fold-const.h,
1667 wide-int.h, and inchash.h due to flattening of tree.h.
1668 * iresolve.c: Ditto.
1669 * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1670 input.h, alias.h, symtab.h, fold-const.h,
1671 wide-int.h, and inchash.h due to flattening of tree.h.
1672 * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1673 input.h, alias.h, symtab.h, options.h, fold-const.h,
1674 wide-int.h, and inchash.h due to flattening of tree.h.
1675 * options.c: Ditto.
1676 * target-memory.c: Include hash-set.h, vec.h,
1677 double-int.h, input.h, alias.h, symtab.h, fold-const.h,
1678 wide-int.h, and inchash.h due to flattening of tree.h.
1679 * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1680 input.h, alias.h, symtab.h, options.h, fold-const.h,
1681 wide-int.h, and inchash.h due to flattening of tree.h.
1682 * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1683 input.h, alias.h, symtab.h, options.h, fold-const.h,
1684 wide-int.h, and inchash.h due to flattening of tree.h.
1685 * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1686 input.h, alias.h, symtab.h, fold-const.h,
1687 wide-int.h, and inchash.h due to flattening of tree.h.
1688 * trans-const.c: Ditto.
1689 * trans-decl.c: Ditto.
1690 * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1691 input.h, alias.h, symtab.h, options.h, fold-const.h,
1692 wide-int.h, and inchash.h due to flattening of tree.h.
1693 * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1694 input.h, alias.h, symtab.h, fold-const.h,
1695 wide-int.h, inchash.h and real.h due to flattening of tree.h.
1696 * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1697 input.h, alias.h, symtab.h, options.h, fold-const.h,
1698 wide-int.h, and inchash.h due to flattening of tree.h.
1699 * trans-openmp.c: Ditto.
1700 * trans-stmt.c: Ditto.
1701 * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
1702 input.h, alias.h, symtab.h, fold-const.h,
1703 wide-int.h, inchash.h and real.h due to flattening of tree.h.
1704
1705 2015-01-08 Tobias Burnus <burnus@net-b.de>
1706
1707 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
1708 for module coarrays with -fcoarray=lib.
1709 (get_proc_pointer_decl): As module variable, make only public
1710 when not marked as private.
1711
1712 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1713
1714 PR fortran/47674
1715 * dependency.h: Actually commit changes.
1716
1717 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1718
1719 PR fortran/47674
1720 * dependency.c: Update copyright years.
1721 (gfc_discard_nops): Add prototype.
1722 * dependency.c (discard_nops): Rename to gfc_discard_nops,
1723 make non-static.
1724 (gfc_discard_nops): Use gfc_discard_nops.
1725 (gfc_dep_difference): Likewise.
1726 * frontend-passes.c Update copyright years.
1727 (realloc_strings): New function. Add prototype.
1728 (gfc_run_passes): Call realloc_strings.
1729 (realloc_string_callback): New function.
1730 (create_var): Add prototype. Handle case of a
1731 scalar character variable.
1732 (optimize_trim): Do not handle allocatable variables.
1733
1734 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1735
1736 Update copyright years.
1737
1738 * gfortranspec.c (lang_specific_driver): Update copyright notice
1739 dates.
1740 * gfc-internals.texi: Bump @copying's copyright year.
1741 * gfortran.texi: Ditto.
1742 * intrinsic.texi: Ditto.
1743 * invoke.texi: Ditto.
1744
1745 2015-01-02 Janus Weil <janus@gcc.gnu.org>
1746
1747 PR fortran/57562
1748 * expr.c (find_component_ref): Deal with extended types.
1749
1750 2015-01-02 Tobias Burnus <burnus@net-b.de>
1751
1752 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
1753 for module coarrays with -fcoarray=lib.
1754
1755 2015-01-02 Janus Weil <janus@gcc.gnu.org>
1756
1757 PR fortran/60507
1758 * interface.c (is_procptr_result): New function to check if an
1759 expression is a procedure-pointer result.
1760 (compare_actual_formal): Use it.
1761 ^L
1762 Copyright (C) 2015 Free Software Foundation, Inc.
1763
1764 Copying and distribution of this file, with or without modification,
1765 are permitted in any medium without royalty provided the copyright
1766 notice and this notice are preserved.