re PR fortran/48820 (TR 29113: Implement parts needed for MPI 3)
[gcc.git] / gcc / fortran / ChangeLog
1 2012-03-03 Tobias Burnus <burnus@net-b.de>
2
3 PR fortran/48820
4 * decl.c (gfc_match_decl_type_spec): Support type(*).
5 (gfc_verify_c_interop): Allow type(*).
6 * dump-parse-tree.c (show_typespec): Handle type(*).
7 * expr.c (gfc_copy_expr): Ditto.
8 * interface.c (compare_type_rank, compare_parameter,
9 compare_actual_formal, gfc_procedure_use): Ditto.
10 * libgfortran.h (bt): Add BT_ASSUMED.
11 * misc.c (gfc_basic_typename, gfc_typename): Handle type(*).
12 * module.c (bt_types): Ditto.
13 * resolve.c (assumed_type_expr_allowed): New static variable.
14 (resolve_actual_arglist, resolve_variable, resolve_symbol):
15 Handle type(*).
16 * trans-expr.c (gfc_conv_procedure_call): Ditto.
17 * trans-types.c (gfc_typenode_for_spec, gfc_get_dtype): Ditto.
18
19 2012-03-02 Tobias Burnus <burnus@net-b.de>
20
21 PR fortran/52325
22 * primary.c (gfc_match_varspec): Add missing ;.
23
24 2012-03-02 Tobias Burnus <burnus@net-b.de>
25
26 PR fortran/52325
27 * primary.c (gfc_match_varspec): Add diagnostic for % with
28 nonderived types.
29
30 2012-03-02 Tobias Burnus <burnus@net-b.de>
31
32 PR fortran/52270
33 * expr.c (gfc_check_vardef_context): Fix check for
34 intent-in polymorphic pointer .
35 * interface.c (compare_parameter): Allow passing TYPE to
36 intent-in polymorphic pointer.
37
38 2012-03-02 Tobias Burnus <burnus@net-b.de>
39
40 PR fortran/52452
41 * resolve.c (resolve_intrinsic): Don't search for a
42 function if we know that it is a subroutine.
43
44 2012-02-29 Paul Thomas <pault@gcc.gnu.org>
45
46 PR fortran/52386
47 * trans-expr.c (fcncall_realloc_result): Dereference the
48 descriptor if needed.
49
50 2012-02-22 Tobias Burnus <burnus@net-b.de>
51
52 PR fortran/52335
53 * io.c (gfc_match_open): Remove bogus F2003 DELIM= check.
54
55 2012-02-18 Tobias Burnus <burnus@net-b.de>
56
57 PR fortran/52295
58 * interface.c (check_interface0): Internal procs in
59 generic interfaces are allowed in Fortran 2008.
60
61 2012-02-17 Tobias Burnus <burnus@net-b.de>
62 Roland Stigge <stigge@antcom.de>
63
64 PR translation/52273
65 * interface.c (compare_actual_formal): Fix typo "at at".
66
67 2012-02-17 Tobias Burnus <burnus@net-b.de>
68
69 * gfortran.texi (Q exponent-letter): Fix grammar.
70
71 2012-02-17 Tobias Burnus <burnus@net-b.de>
72
73 * gfortran.texi (Status): Fix typos.
74 * invoke.texi (ffixed-form, fstack-arrays): Spell Fortran with
75 a majuscule.
76
77 2012-02-17 Tobias Burnus <burnus@net-b.de>
78 Roland Stigge <stigge@antcom.de>
79
80 PR translation/52232
81 PR translation/52234
82 PR translation/52245
83 PR translation/52246
84 PR translation/52262
85 PR translation/52273
86 * io.c (gfc_match_open): Fix typo.
87 * interface.c (compare_actual_formal): Ditto.
88 * lang.opt (freal-4-real-8, freal-4-real-16, freal-8-real-16): Ditto.
89 * match.c (alloc_opt_list, gfc_match_nullify): Ditto.
90 * check.c (gfc_check_associated, gfc_check_null): Ditto.
91
92 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
93
94 PR fortran/50981
95 * trans-stmt.c (gfc_get_proc_ifc_for_call): New function.
96 (gfc_trans_call): Use gfc_get_proc_ifc_for_call.
97
98 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
99
100 * trans-array.c (gfc_walk_elemental_function_args,
101 gfc_walk_function_expr): Move call to gfc_get_proc_ifc_for_expr out
102 of gfc_walk_elemental_function_args.
103 * trans-stmt.c (gfc_trans_call): Ditto.
104 * trans-array.h (gfc_get_proc_ifc_for_expr): New prototype.
105 (gfc_walk_elemental_function_args): Update prototype.
106
107 2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
108
109 * trans-array.c (gfc_get_proc_ifc_for_expr): New function.
110 (gfc_walk_elemental_function_args): Move code to
111 gfc_get_proc_ifc_for_expr and call it.
112
113 2012-02-08 Tobias Burnus <burnus@net-b.de>
114
115 PR fortran/52151
116 * trans-expr.c (fcncall_realloc_result): Set also the stride.
117
118 2012-02-07 Tobias Burnus <burnus@net-b.de>
119
120 PR fortran/51514
121 * trans-expr.c (gfc_conv_procedure_call): Add _data component
122 for calls of scalar CLASS actuals to TYPE dummies.
123
124 2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
125
126 PR fortran/48847
127 * trans-decl.c: Warn about unused dummy procedure arguments
128 if -Wunused-dummy-argument is specified. Suppress middle-end
129 warnings about procedure arguments.
130
131 2012-02-05 Paul Thomas <pault@gcc.gnu.org>
132
133 * trans-array.c (gfc_array_allocate): Zero memory for all class
134 array allocations.
135 * trans-stmt.c (gfc_trans_allocate): Ditto for class scalars.
136
137 PR fortran/52102
138 * trans-stmt.c (gfc_trans_allocate): Before correcting a class
139 array reference, ensure that 'dataref' points to the _data
140 component that is followed by the array reference..
141
142 2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
143
144 PR fortran/41587
145 PR fortran/46356
146 PR fortran/51754
147 PR fortran/50981
148 * class.c (insert_component_ref, class_data_ref_missing,
149 gfc_fix_class_refs): New functions.
150 * gfortran.h (gfc_fix_class_refs): New prototype.
151 * trans-expr.c (gfc_conv_expr): Remove special case handling and call
152 gfc_fix_class_refs instead.
153
154 2012-02-02 Paul Thomas <pault@gcc.gnu.org>
155
156 PR fortran/52012
157 * trans-expr.c (fcncall_realloc_result): If variable shape is
158 correct, retain the bounds, whatever they are.
159
160 2012-02-02 Tobias Burnus <burnus@net-b.de>
161
162 PR fortran/52093
163 * simplify.c (gfc_simplify_size): Handle INTRINSIC_PARENTHESES.
164
165 2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
166
167 PR fortran/51958
168 * frontend-passes.c (convert_elseif): New function.
169 (optimize_namespace): Call it.
170
171 2012-02-01 Tobias Burnus <burnus@net-b.de>
172
173 PR fortran/52024
174 * module.c (MOD_VERSION): Bump.
175 (mio_typebound_proc): Read/write is_operator from/to the
176 .mod file.
177
178 2012-02-01 Tobias Burnus <burnus@net-b.de>
179
180 PR fortran/52059
181 * trans-expr.c (gfc_conv_procedure_call): Add array ref
182 only to variables.
183
184 2012-01-31 Tobias Burnus <burnus@net-b.de>
185
186 PR fortran/52024
187 * gfortran.h (gfc_tbp_generic): Store whether the
188 generic is an operator.
189 * decl.c (gfc_match_generic): Set that flag.
190 * resolve.c (check_generic_tbp_ambiguity): Use it in the
191 gfc_compare_interfaces check.
192
193 2012-01-31 Tobias Burnus <burnus@net-b.de>
194
195 PR fortran/52029
196 * class.c (gfc_find_derived_vtab): Mark _copy function as pure.
197
198 2012-01-31 Tobias Burnus <burnus@net-b.de>
199
200 PR fortran/52013
201 * class.c (get_unique_hashed_string): Adapt trim length.
202 (gfc_build_class_symbol) Encode also corank in the container name.
203
204 2012-01-31 Paul Thomas <pault@gcc.gnu.org>
205
206 PR fortran/52012
207 * trans-expr.c (fcncall_realloc_result): Correct calculation of
208 result offset.
209
210 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
211
212 * module.c (pointer_info): Make true_name and module pointers
213 rather than arrays, order pointers before other fields.
214 (free_pi_tree): free true_name and module as well.
215 (mio_read_string): Rename to read_string.
216 (mio_write_string): Remove.
217 (load_commons): Use read_string.
218 (read_module): Use read_string rather than mio_internal_string.
219 (write_blank_common): Call write_atom directly.
220 (write_symbol): Likewise.
221
222 2012-01-29 Tobias Burnus <burnus@net-b.de>
223
224 PR fortran/41600
225 * expr.c (gfc_default_initializer): Convert the values if
226 the type does not match.
227
228 2012-01-29 Tobias Burnus <burnus@net-b.de>
229
230 PR fortran/51972
231 * trans-array.c (structure_alloc_comps): Fix assignment of
232 polymorphic components (polymorphic deep copying).
233
234 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
235
236 PR fortran/51808
237 * decl.c (set_binding_label): Make binding_label argument const.
238 (curr_binding_label): Constify.
239 * gfortran.h (gfc_symbol): Constify binding_label.
240 (gfc_common_head): Likewise.
241 (get_iso_c_sym): Likewise.
242 * match.c (gfc_match_name_C): Constify buffer argument.
243 * match.h (gfc_match_name_C): Likewise.
244 * resolve.c (set_name_and_label): Constify binding_label argument.
245 (gfc_iso_c_sub_interface): Constify binding_label variable.
246 * symbol.c (get_iso_c_sym): Constify binding_label argument.
247
248 2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
249
250 PR fortran/51808
251 * decl.c (set_binding_label): Move prototype from match.h to here.
252 (curr_binding_label): Make a pointer rather than static array.
253 (build_sym): Check sym->binding_label pointer rather than array,
254 update set_binding_label call, handle curr_binding_label changes.
255 (set_binding_label): Handle new curr_binding_label, dest_label
256 double ptr, and sym->binding_label.
257 (verify_bind_c_sym): Handle sym->binding_label being a pointer.
258 (set_verify_bind_c_sym): Check sym->binding_label pointer rather
259 than array, update set_binding_label call.
260 (gfc_match_bind_c_stmt): Handle curr_binding_label change.
261 (match_procedure_decl): Update set_binding_label call.
262 (gfc_match_bind_c): Change binding_label to pointer, update
263 gfc_match_name_C call.
264 * gfortran.h (GFC_MAX_BINDING_LABEL_LEN): Remove macro.
265 (gfc_symbol): Make binding_label a pointer.
266 (gfc_common_head): Likewise.
267 * match.c (gfc_match_name_C): Heap allocate bind(C) name.
268 * match.h (gfc_match_name_C): Change prototype argument.
269 (set_binding_label): Move prototype to decl.c.
270 * module.c (struct pointer_info): Make binding_label a pointer.
271 (free_pi_tree): Free unused binding_label.
272 (mio_read_string): New function.
273 (mio_write_string): New function.
274 (load_commons): Redo reading of binding_label.
275 (read_module): Likewise.
276 (write_common_0): Change to write empty string instead of name if
277 no binding_label.
278 (write_blank_common): Write empty string for binding label.
279 (write_symbol): Change to write empty string instead of name if no
280 binding_label.
281 * resolve.c (gfc_iso_c_func_interface): Don't set binding_label.
282 (set_name_and_label): Make binding_label double pointer, use
283 asprintf.
284 (gfc_iso_c_sub_interface): Make binding_label a pointer.
285 (resolve_bind_c_comms): Handle cases if
286 gfc_common_head->binding_label is NULL.
287 (gfc_verify_binding_labels): sym->binding_label is a pointer.
288 * symbol.c (gfc_new_symbol): Rely on XCNEW zero init for
289 binding_label.
290 (gen_special_c_interop_ptr): Don't set binding label.
291 (generate_isocbinding_symbol): Insert binding_label into symbol
292 table.
293 (get_iso_c_sym): Use pointer assignment instead of strcpy.
294 * trans-common.c (gfc_sym_mangled_common_id): Handle
295 com->binding_label being a pointer.
296 * trans-decl.c (gfc_sym_mangled_identifier): Handle
297 sym->binding_label being a pointer.
298 (gfc_sym_mangled_function_id): Likewise.
299
300 2012-01-29 Tobias Burnus <burnus@net-b.de>
301
302 PR fortran/52038
303 * resolve.c (symbol_as): Remove unused, accidentally
304 added function.
305
306 2012-01-28 Tobias Burnus <burnus@net-b.de>
307
308 PR fortran/51972
309 * trans-stmt.c (gfc_trans_allocate): Properly check whether
310 we have a BT_CLASS which needs to be memset.
311
312 2012-01-27 Tobias Burnus <burnus@net-b.de>
313
314 PR fortran/52022
315 * trans-expr.c (gfc_conv_procedure_call): Fix passing
316 of functions, which return allocatables.
317
318 2012-01-27 Tobias Burnus <burnus@net-b.de>
319
320 PR fortran/52016
321 * resolve.c (resolve_formal_arglist): Fix elemental
322 constraint checks for polymorphic dummies also for
323 pointers.
324
325 2012-01-27 Tobias Burnus <burnus@net-b.de>
326
327 PR fortran/51970
328 PR fortran/51977
329 * primary.c (gfc_match_varspec. gfc_match_rvalue): Set
330 handle array spec for BT_CLASS.
331 * expr.c (gfc_get_variable_expr, gfc_lval_expr_from_sym)
332 * frontend-passes.c (create_var): Ditto.
333 * resolve.c (resolve_actual_arglist, resolve_assoc_var): Ditto.
334 * trans-decl.c (gfc_trans_deferred_vars): Use class_pointer
335 instead of attr.pointer.
336 (gfc_generate_function_code): Use CLASS_DATA (sym) for BT_CLASS.
337 * trans-intrinsic.c (conv_intrinsic_move_alloc): Move assert.
338 * trans-stmt.c (trans_associate_var): Ask for the descriptor.
339
340 2012-01-27 Tobias Burnus <burnus@net-b.de>
341
342 PR fortran/51953
343 * match.c (gfc_match_allocate): Allow more than allocate
344 object with SOURCE=.
345
346 2012-01-27 Tobias Burnus <burnus@net-b.de>
347
348 PR fortran/52016
349 * resolve.c (resolve_formal_arglist): Fix elemental
350 constraint checks for polymorphic dummies.
351
352 2012-01-27 Paul Thomas <pault@gcc.gnu.org>
353 Tobias Burnus <burnus@gcc.gnu.org>
354
355 PR fortran/48705
356 PR fortran/51870
357 PR fortran/51943
358 PR fortran/51946
359 * trans-array.c (gfc_array_init_size): Add two extra arguments
360 to convey the dynamic element size of a calls object and to
361 return the number of elements that have been allocated.
362 (gfc_array_allocate): Add the same arguments and use them to
363 call gfc_array_init_size. Before the allocation dereference
364 the data pointer, if necessary. Set the allocated array to zero
365 if the class element size or expr3 are non-null.
366 * trans-expr.c (gfc_conv_class_to_class): Give this function
367 global scope.
368 (get_class_array_ref): New function.
369 (gfc_copy_class_to_class): New function.
370 * trans-array.h : Update prototype for gfc_array_allocate.
371 * trans-stmt.c (gfc_trans_allocate): For non-variable class
372 STATUS expressions extract the class object and the dynamic
373 element size. Use the latter to call gfc_array_allocate and
374 the former for setting the vptr and, via
375 gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
376 * trans.h : Prototypes for gfc_get_class_array_ref,
377 gfc_copy_class_to_class and gfc_conv_class_to_class.
378
379 2012-01-25 Tobias Burnus <burnus@net-b.de>
380
381 * resolve.c (symbol_as): Check also for attr.class_ok.
382
383 2012-01-25 Tobias Burnus <burnus@net-b.de>
384
385 PR fortran/51995
386 * class.c (gfc_build_class_symbol): Fix invalid freeing
387 issue with fclass->f2k_derived.
388
389 2012-01-25 Tobias Burnus <burnus@net-b.de>
390
391 PR fortran/51995
392 * class.c (gfc_build_class_symbol): Ensure that
393 fclass->f2k_derived is set.
394
395 2012-01-25 Tobias Burnus <burnus@net-b.de>
396
397 PR fortran/51966
398 * resolve.c (resolve_structure_cons): Only create an
399 array constructors for nonscalars.
400
401 2012-01-23 Tobias Burnus <burnus@net-b.de>
402
403 PR fortran/51948
404 * check.c (variable_check): Fix checking for
405 variables and deeply nested BLOCKs.
406
407 2012-01-21 Tobias Burnus <burnus@net-b.de>
408 Steven G. Kargl <kargl@gcc.gnu.org>
409
410 PR fortran/50556
411 * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
412 attribute.
413
414 2012-01-21 Tobias Burnus <burnus@net-b.de>
415
416 PR fortran/51913
417 * interface.c (compare_parameter): Fix CLASS comparison.
418
419 2012-01-20 Tobias Burnus <burnus@net-b.de>
420 Janus Weil <janus@gcc.gnu.org>
421
422 PR fortran/51056
423 * module.c (load_needed, read_module): Don't mark __vtab etc.
424 as use_only.
425
426 2012-01-19 Tobias Burnus <burnus@net-b.de>
427
428 PR fortran/51904
429 * expr.c (gfc_build_intrinsic_call): Also set the symtree.
430
431 2012-01-18 Paul Thomas <pault@gcc.gnu.org>
432
433 PR fortran/51634
434 * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
435 components of temporary class arguments.
436
437 2012-01-17 Tobias Burnus <burnus@net-b.de>
438 Janne Blomqvist <jb@gcc.gnu.org>
439
440 PR fortran/51869
441 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
442 LHS after allocation, if it has allocatable components.
443 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
444
445 2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
446 Tobias Burnus <burnus@net-b.de>
447
448 PR fortran/50981
449 * trans-array.c (gfc_walk_elemental_function_args): Fix
450 passing of deallocated allocatables/pointers as absent argument.
451
452 2012-01-16 Tobias Burnus <burnus@net-b.de>
453
454 PR fortran/51809
455 * class.c (gfc_find_derived_vtab): Mark __vtab and
456 __def_init as FL_VARIABLE not as FL_PARAMETER.
457 * expr.c (gfc_simplify_expr): Remove special
458 handling of __vtab.
459 * resolve.c (resolve_values): Ditto.
460 * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
461 and __def_init as TREE_READONLY.
462
463 2012-01-16 Zydrunas Gimbutas <gimbutas@cims.nyu.edu>
464 Andreas Kloeckner <kloeckner@cims.nyu.edu>
465 Steven G. Kargl <kargl@gcc.gnu.org>
466
467 PR fortran/48426
468 * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
469 * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
470 -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
471 and -finteger-4-integer-8. User-desired type conversion information.
472 * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
473 in declaration parsing.
474 * trans-types.c (gfc_init_kinds): User-specified type conversion
475 checked for current backend.
476 * primary.c (match_integer_constant,match_real_constant): Implement
477 type conversion in constant parsing.
478 * options.c (gfc_init_options,gfc_handle_option): Translate input
479 options to flags in internal options data structure.
480 * invoke.texi: Document new options. Re-order options in Options
481 summary section.
482
483 2012-01-16 Paul Thomas <pault@gcc.gnu.org>
484
485 * trans-array.c (gfc_trans_create_temp_array): In the case of a
486 class array temporary, detect a null 'eltype' on entry and use
487 'initial' to provde the class reference and so, through the
488 vtable, the element size for the dynamic type.
489 * trans-stmt.c (gfc_conv_elemental_dependencies): For class
490 expressions, set 'eltype' to null and pass the values via the
491 'initial' expression.
492
493 2012-01-14 Tobias Burnus <burnus@net-b.de>
494
495 PR fortran/51800
496 * resolve.c (build_default_init_expr): Also initialize
497 nonconstant-length strings with -finit-character=<n>.
498
499 2011-01-14 Tobias Burnus <burnus@net-b.de>
500
501 PR fortran/51816
502 * module.c (read_module): Don't make nonexisting
503 intrinsic operators as found.
504 (rename_list_remove_duplicate): New function.
505 (gfc_use_modules): Use it.
506
507 2012-01-13 Paul Thomas <pault@gcc.gnu.org>
508
509 PR fortran/48351
510 * trans-array.c (structure_alloc_comps): Suppress interative
511 call to self, when current component is deallocated using
512 gfc_trans_dealloc_allocated.
513 * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
514 attribute from the declared type to the class structure.
515
516 2012-01-13 Tobias Burnus <burnus@net-b.de>
517
518 PR fortran/51842
519 * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
520 instead of a signed int of size POINTER_SIZE for
521 gfc_index_integer_kind.
522
523 2012-01-12 Tobias Burnus <burnus@net-b.de>
524
525 PR fortran/36755
526 * intrinsic.texi (CHMOD): Extend a bit and remove statement
527 that /bin/chmod is called.
528
529 2012-01-10 Gerald Pfeifer <gerald@pfeifer.com>
530
531 * gfortran.texi (Fortran 2003 Status): Fix grammar.
532
533 2012-01-10 Tobias Burnus <burnus@net-b.de>
534
535 PR fortran/51652
536 * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
537 check whether type-spec matches declaration.
538
539 2012-01-10 Tobias Burnus <burnus@net-b.de>
540
541 * resolve.c (resolve_ordinary_assign): Improve error wording.
542
543 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
544
545 PR fortran/51791
546 * interface.c (matching_typebound_op): Drill down through
547 possible parentheses to obtain base expression. Do not test for
548 'class_ok' but, instead for the class structure components.
549 * resolve.c (resolve_ordinary_assign): Extend error message for
550 polymorphic assignment to advise checking for specific
551 subroutine.
552
553 PR fortran/51792
554 * resolve.c (resolve_typebound_function): Restore 'static' to
555 declaration.
556
557 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
558
559 PR fortran/51758
560 * trans-array.c (gfc_walk_elemental_function_args):
561 Skip over NULL() actual arguments.
562
563 2012-01-09 Tobias Burnus <burnus@net-b.de>
564
565 * gfortran.texi: Bump copyright year.
566 (Fortran 2003 Status): Update polymorphism item, add
567 item for generic interface with DT name.
568
569 2012-01-09 Tobias Burnus <burnus@net-b.de>
570
571 PR fortran/51578
572 * gfortran.h (gfc_use_list):
573 * match.h (gfc_use_module): Rename to ...
574 (gfc_use_modules): ... this.
575 * module.c (use_locus, specified_nonint, specified_int): Remove
576 global variable.
577 (module_name): Change type to const char*, used with gfc_get_string.
578 (module_list): New global variable.
579 (free_rename): Free argument not global var.
580 (gfc_match_use): Save match to module_list.
581 (load_generic_interfaces, read_module): Don't free symtree.
582 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
583 type change of module_name.
584 (write_symbol0, write_generic): Optimize due to the type change.
585 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
586 locus of rename->where.
587 (gfc_use_module): Take module_list as argument.
588 (gfc_use_modules): New function.
589 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
590 * parse.c (last_was_use_stmt): New global variable.
591 (use_modules): New function.
592 (decode_specification_statement, decode_statement): Move USE match up
593 and call use_modules.
594 (next_free, next_fixed): Call use_modules.
595 (accept_statement): Don't call gfc_module_use.
596
597 2012-01-06 Tobias Burnus <burnus@net-b.de>
598
599 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
600 Update call to gfc_trans_dealloc_allocated.
601 * trans.c (gfc_allocate_using_malloc): Fix spacing.
602 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
603 label_finish when an error occurs.
604 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
605 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
606 Update prototype.
607 (gfor_fndecl_caf_deregister): New tree symbol.
608 * trans-expr.c (gfc_conv_procedure_call): Update
609 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
610 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
611 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
612 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
613 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
614 gfc_trans_dealloc_allocated): Update prototypes.
615 * trans-stmt.c (gfc_trans_sync): Fix indentation.
616 (gfc_trans_allocate): Fix errmsg padding and label handling.
617 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
618 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
619 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
620 to avoid other stats accidentally matching this one.
621 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
622 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
623 and add decl for caf_deregister.
624 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
625 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
626 gfc_deallocate_with_status.
627
628 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
629
630 PR fortran/PR48946
631 * resolve.c (resolve_typebound_static): If the typebound
632 procedure is 'deferred' try to find the correct specific
633 procedure in the derived type operator space itself.
634
635 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
636
637 PR fortran/50981
638 * trans-array.h (gfc_walk_elemental_function_args): New argument.
639 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
640 * trans-stmt.c (gfc_trans_call): Ditto.
641 * trans-array.c (gfc_walk_function_expr): Ditto.
642 (gfc_walk_elemental_function_args): Get the dummy argument list
643 if possible. Check that the dummy and the actual argument are both
644 optional, and set can_be_null_ref accordingly.
645
646 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
647
648 PR fortran/50981
649 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
650 * trans-array.c: If the reference can be NULL, save the reference
651 instead of the value.
652 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
653 dereference it.
654
655 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
656
657 * trans-expr.c (gfc_conv_expr): Move address taking...
658 (gfc_conv_expr_reference): ... here.
659
660 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
661
662 PR fortran/49693
663 * trans-common.c (create_common): Update copyright years. Mark
664 variables as used to avoid warnings about unused variables in
665 common blocks.
666
667 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
668
669 * gfortran.h (struct gfc_expr): Add missing "struct"
670 qualifier for member base_expr.
671
672 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
673
674 PR fortran/51529
675 * trans-array.c (gfc_array_allocate): Null allocated memory of
676 newly allocted class arrays.
677
678 PR fortran/46262
679 PR fortran/46328
680 PR fortran/51052
681 * interface.c(build_compcall_for_operator): Add a type to the
682 expression.
683 * trans-expr.c (conv_base_obj_fcn_val): New function.
684 (gfc_conv_procedure_call): Use base_expr to detect non-variable
685 base objects and, ensuring that there is a temporary variable,
686 build up the typebound call using conv_base_obj_fcn_val.
687 (gfc_trans_class_assign): Pick out class procedure pointer
688 assignments and do the assignment with no further prcessing.
689 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
690 gfc_trans_class_assign): Move to top of file.
691 * gfortran.h : Add 'base_expr' field to gfc_expr.
692 * resolve.c (get_declared_from_expr): Add 'types' argument to
693 switch checking of derived types on or off.
694 (resolve_typebound_generic_call): Set the new argument.
695 (resolve_typebound_function, resolve_typebound_subroutine):
696 Set 'types' argument for get_declared_from_expr appropriately.
697 Identify base expression, if not a variable, in the argument
698 list of class valued calls. Assign it to the 'base_expr' field
699 of the final expression. Strip away all references after the
700 last class reference.
701
702 2012-01-02 Tobias Burnus <burnus@net-b.de>
703
704 PR fortran/51682
705 * trans-intrinsic.c (trans_this_image, trans_image_index,
706 trans_num_images, conv_intrinsic_cobound): Fold_convert the
707 caf_num_images/caf_this_images variables to the correct int kind.
708
709 2012-01-01 Jakub Jelinek <jakub@redhat.com>
710
711 * gfortranspec.c (lang_specific_driver): Update copyright notice
712 dates.
713 \f
714 Copyright (C) 2012 Free Software Foundation, Inc.
715
716 Copying and distribution of this file, with or without modification,
717 are permitted in any medium without royalty provided the copyright
718 notice and this notice are preserved.