re PR fortran/51448 (Compiler crash when assigning floating point values of different...
[gcc.git] / gcc / fortran / ChangeLog
1 2011-12-08 Tobias Burnus <burnus@net-b.de>
2
3 PR fortran/51448
4 * fortran/trans-array.c (get_std_lbound): Fix handling of
5 conversion functions.
6
7 2011-12-08 Toon Moene <toon@moene.org>
8
9 PR fortran/51310
10 * invoke.texi: Itemize the cases for which
11 -finit-<type>=<constant> doesn't work.
12
13 2011-12-06 Tobias Burnus <burnus@net-b.de>
14
15 PR fortran/51435
16 * expr.c (gfc_has_default_initializer): Fix handling of
17 DT with initialized pointer components.
18
19 2011-12-05 Thomas Koenig <tkoenig@gcc.gnu.org>
20
21 PR fortran/51338
22 * dependency.c (are_identical_variables): Handle case where
23 end fields of substring references are NULL.
24
25 2011-12-04 Tobias Burnus <burnus@net-b.de>
26
27 PR fortran/51383
28 * resolve.c (find_array_spec): Use ref->u.c.component
29 directly without starting from ts.u.derived.
30
31 2011-12-03 Tobias Burnus <burnus@net-b.de>
32
33 PR fortran/48887
34 * match.c (select_type_set_tmp): Don't set allocatable/pointer
35 attribute.
36 * class.c (gfc_build_class_symbol): Handle
37 attr.select_type_temporary.
38
39 2011-12-03 Tobias Burnus <burnus@net-b.de>
40
41 PR fortran/50684
42 * check.c (variable_check): Fix intent(in) check.
43
44 2011-12-03 Tobias Burnus <burnus@net-b.de>
45
46 * check.c (gfc_check_move_alloc): Allow nonpolymorphic
47 FROM with polymorphic TO.
48 * trans-intrinsic.c (conv_intrinsic_move_alloc): Handle
49 nonpolymorphic FROM with polymorphic TO.
50
51 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org>
52
53 * module.c (dt_lower_string): Make static.
54 (dt_upper_string): Likewise.
55
56 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org>
57
58 PR fortran/25708
59 * module.c (parse_string): Read string into resizable array
60 instead of parsing twice and seeking.
61 (peek_atom): New implementation avoiding seeks.
62 (require_atom): Save and set column and line explicitly for error
63 handling.
64
65 2011-12-01 Janne Blomqvist <jb@gcc.gnu.org>
66
67 * misc.c (gfc_open_file): Don't call stat.
68
69 2011-11-29 Thomas Koenig <tkoenig@gcc.gnu.org>
70
71 PR fortran/40958
72 * module.c (prev_module_line): New variable.
73 (prev_module_column): New variable.
74 (prev_character): New variable.
75 (module_char): Update the new variables.
76 (module_unget_char): New function.
77 (parse_string): Use module_unget_char.
78 (parse_integer): Likewise.
79 (parse_name): Likewise.
80
81 2011-11-29 Tobias Burnus <burnus@net-b.de>
82
83 PR fortran/51306
84 PR fortran/48700
85 * check.c (gfc_check_move_alloc): Make sure that from/to
86 are both polymorphic or neither.
87 * trans-intrinsic.c (conv_intrinsic_move_alloc): Cleanup,
88 generate inline code.
89
90 2011-11-28 Tobias Burnus <burnus@net-b.de>
91 Steven G. Kargl <kargl@gcc.gnu.org>
92
93 PR fortran/51308
94 * symbol.c (check_conflict): Ignore BIND(C) + PARAMETER
95 conflicts for ISO_C_BINDING variables.
96 (gen_special_c_interop_ptr): Don't mark c_ptr_null/c_funptr_null
97 as SAVE.
98
99 2011-11-25 Mikael Morin <mikael@gcc.gnu.org>
100
101 * trans-array.c (set_loop_bounds): Remove dead conditions.
102
103 2011-11-25 Mikael Morin <mikael@gcc.gnu.org>
104
105 PR fortran/51250
106 PR fortran/43829
107 * trans-array.c (gfc_trans_create_temp_array): Get dimension from
108 the right gfc_ss struct.
109
110 2011-11-25 Tobias Burnus <burnus@net-b.de>
111
112 PR fortran/50408
113 * trans-decl.c (gfc_get_module_backend_decl): Also copy
114 ts.u.derived from the gsym if the ts.type is BT_CLASS.
115 (gfc_get_extern_function_decl): Copy also the backend_decl
116 for the symbol's ts.u.{derived,cl} from the gsym.
117 * trans-types.c (gfc_copy_dt_decls_ifequal): Directly
118 return if "from" and "to" are the same.
119
120 2011-11-25 Tobias Burnus <burnus@net-b.de>
121
122 PR fortran/51302
123 * trans-stmt.c (gfc_trans_simple_do): Add a fold_convert.
124
125 2011-11-24 Tobias Burnus <burnus@net-b.de>
126
127 PR fortran/51218
128 * resolve.c (pure_subroutine): If called subroutine is
129 impure, unset implicit_pure.
130 (resolve_function): Move impure check to simplify code.
131
132 2011-11-19 Tobias Burnus <burnus@net-b.de>
133
134 PR fortran/51207
135 * class.c (gfc_find_derived_vtab): Mark __def_init as PARAMETER
136 and hence as TREE_READONLY; add subroutine attribute to
137 __copy_ procedure.
138
139 PR fortran/50640
140 * trans.h (GFC_DECL_PUSH_TOPLEVEL): New DECL_LANG_FLAG_7.
141 * trans-decl.c (gfc_get_symbol_decl): Mark __def_init and vtab as
142 GFC_DECL_PUSH_TOPLEVEL.
143 (gfc_generate_function_code): If GFC_DECL_PUSH_TOPLEVEL, push it there.
144 (build_function_decl): Push __copy_ procedure to the toplevel.
145
146 2011-11-16 Tobias Burnus <burnus@net-b.de>
147
148 PR fortran/39427
149 PR fortran/37829
150 * decl.c (match_data_constant, match_data_constant, variable_decl,
151 gfc_match_decl_type_spec, access_attr_decl,
152 check_extended_derived_type, gfc_match_derived_decl,
153 gfc_match_derived_decl, gfc_match_derived_decl) Modified to deal
154 with DT constructors.
155 * gfortran.h (gfc_find_dt_in_generic,
156 gfc_convert_to_structure_constructor): New function prototypes.
157 * interface.c (check_interface0, check_interface1,
158 gfc_search_interface): Ignore DT constructors in generic list.
159 * match.h (gfc_match_structure_constructor): Update prototype.
160 * match.c (match_derived_type_spec): Ensure that one uses the DT
161 not the generic function.
162 * module.c (MOD_VERSION): Bump.
163 (dt_lower_string, dt_upper_string): New functions.
164 (find_use_name_n, find_use_operator, compare_true_names,
165 find_true_name, add_true_name, fix_mio_expr, load_needed,
166 read_module, write_dt_extensions, write_symbol): Changes to deal with
167 different symtree vs. sym names.
168 (create_derived_type): Create also generic procedure.
169 * parse.c (gfc_fixup_sibling_symbols): Don't regard DT and generic
170 function as the same.
171 * primary.c (gfc_convert_to_structure_constructor): New function.
172 (gfc_match_structure_constructor): Restructured; calls
173 gfc_convert_to_structure_constructor.
174 (build_actual_constructor, gfc_match_rvalue): Update for DT generic
175 functions.
176 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
177 is_illegal_recursion, resolve_generic_f, resolve_variable,
178 resolve_fl_variable_derived, resolve_fl_derived0,
179 resolve_symbol): Handle DT and DT generic constructors.
180 * symbol.c (gfc_use_derived, gfc_undo_symbols,
181 gen_special_c_interop_ptr, gen_cptr_param,
182 generate_isocbinding_symbol, gfc_get_derived_super_type): Handle
183 derived-types, which are hidden in the generic type.
184 (gfc_find_dt_in_generic): New function
185 * trans-array.c (gfc_conv_array_initializer): Replace FL_PARAMETER
186 expr by actual value.
187 * trans-decl.c (gfc_get_module_backend_decl, gfc_trans_use_stmts):
188 Ensure that we use the DT and not the generic function.
189 * trans-types.c (gfc_get_derived_type): Ensure that we use the DT
190 and not the generic procedure.
191
192 2011-11-14 Tobias Burnus <burnus@net-b.de>
193
194 PR fortran/51073
195 * trans-decl.c (generate_coarray_sym_init): Handle zero-sized arrays.
196
197 2011-11-09 Tobias Burnus <burnus@net-b.de>
198
199 * symbol.c (clear_sym_mark, traverse_ns): Remove functions.
200 (count_st_nodes, do_traverse_symtree, fill_st_vector): New functions.
201 (gfc_traverse_symtree, gfc_traverse_ns): Call do_traverse_symtree.
202
203 2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
204
205 PR libfortran/50016
206 * gfortran.texi (Data consistency and durability): New section.
207
208 2011-11-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
209
210 PR fortran/50540
211 * resolve.c (resolve_forall_iterators): Transform internal errors
212 to normal errors.
213
214 2011-11-09 Janus Weil <janus@gcc.gnu.org>
215
216 PR fortran/50960
217 * class.c (gfc_find_derived_vtab): Make the vtab symbols FL_PARAMETER.
218 * expr.c (gfc_simplify_expr): Prevent vtabs from being replaced with
219 their value.
220 * resolve.c (resolve_values): Use-associated symbols do not need to
221 be resolved again.
222 (resolve_fl_parameter): Make sure the symbol has a value.
223
224 2011-11-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
225
226 PR fortran/38718
227 * intrinsic.c (add_functions): Allow dreal simplification.
228 * intrinsic.h (gfc_simplify_dreal): New prototype.
229 * simplify.c (gfc_simplify_dreal): New function.
230
231 2011-11-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
232
233 PR fortran/21881
234 * trans-types.c (gfc_get_dtype): Issue a fatal error instead of
235 an internal error.
236
237 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
238
239 PR fortran/50404
240 * io.c (gfc_resolve_close): CLOSE requires a UNIT.
241
242 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
243
244 PR fortran/50409
245 * expr.c (gfc_simplify_expr): Substrings can't have negative
246 length.
247
248 2011-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
249
250 PR fortran/50334
251 * invoke.texi (-finit-*): Document interaction with
252 -Wuninitialized.
253
254 2011-11-07 François-Xavier Coudert <fxcoudert@gcc.gnu.org>
255
256 PR libfortran/49188
257 PR libfortran/49336
258 * invoke.texi: Fix documentation of fsign-zero option. Remove
259 contractions.
260 * intrinsic.texi: Fix ATAN2 documentation for signed zeros.
261 Remove contractions.
262 * gfortran.texi: Remove contractions.
263
264 2011-11-07 Janus Weil <janus@gcc.gnu.org>
265
266 PR fortran/50919
267 * class.c (add_proc_comp): Don't add non-overridable procedures to the
268 vtable.
269 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
270 Don't generate a dynamic _vptr call for non-overridable procedures.
271
272 2011-11-07 Janne Blomqvist <jb@gcc.gnu.org>
273
274 * intrinsic.texi (MCLOCK, MCLOCK8, TIME, TIME8): Functions clock
275 and time are part of the C standard library.
276
277 2011-11-06 Janus Weil <janus@gcc.gnu.org>
278
279 * gfortran.h (gfc_extend_expr): Modified prototype.
280 * interface.c (gfc_extend_expr): Return 'match' instead of 'gfc_try'.
281 Remove argument 'real_error'.
282 * resolve.c (resolve_operator): Modified call to 'gfc_extend_expr'.
283
284 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
285 Aldy Hernandez <aldyh@redhat.com>
286
287 Merged from cxx-mem-model.
288
289 * types.def: (BT_SIZE, BT_CONST_VOLATILE_PTR, BT_FN_VOID_INT,
290 BT_FN_I{1,2,4,8,16}_CONST_VPTR_INT, BT_FN_VOID_VPTR_INT,
291 BT_FN_BOOL_VPTR_INT, BT_FN_BOOL_SIZE_CONST_VPTR,
292 BT_FN_VOID_VPTR_I{1,2,4,8,16}_INT, BT_FN_VOID_SIZE_VPTR_PTR_INT,
293 BT_FN_VOID_SIZE_CONST_VPTR_PTR_INT, BT_FN_VOID_SIZE_VPTR_PTR_PTR_INT,
294 BT_FN_BOOL_VPTR_PTR_I{1,2,4,8,16}_BOOL_INT_INT,
295 BT_FN_I{1,2,4,8,16}_VPTR_I{1,2,4,8,16}_INT): New types.
296
297 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
298
299 PR fortran/43829
300 * trans-array.c (gfc_conv_expr_descriptor): Accept the inline intrinsic
301 case in the assertion.
302 * trans-intrinsic (enter_nested_loop): New function.
303 (gfc_conv_intrinsic_arith): Support non-scalar cases.
304 (nest_loop_dimension, walk_inline_intrinsic_arith): New functions.
305 (walk_inline_intrinsic_function): Handle sum and product.
306 (gfc_inline_intrinsic_function_p): Ditto.
307 * trans.h (gfc_get_loopinfo): New macro.
308
309 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
310
311 * trans-intrinsic.c (gfc_conv_intrinsic_arith): Introduce parent
312 expression variable. Use it.
313
314 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
315
316 * trans-intrinsic.c (gfc_conv_intrinsic.c): Introduce current loop
317 pointer. Use it.
318
319 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
320
321 * trans-intrinsic.c (gfc_conv_intrinsic_arith): Small argument handling
322 cleanup.
323
324 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
325
326 * trans-intrinsic.c (gfc_conv_intrinsic_arith): Update conditions.
327
328 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
329
330 * frontend-passes.c (cfe_register_funcs): Return early in the case
331 of an inline intrinsic function.
332 (optimize_binop_array_assignment): Skip optimization in the case of
333 an inline intrinsic function.
334
335 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
336
337 * array.c (match_subscript): Skip whitespaces before setting locus.
338 * matchexp.c (match_level_1): Ditto.
339
340 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
341
342 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Set loop's
343 temporary rank to the loop rank. Mark ss chains for multiple loop
344 if necessary. Use gfc_trans_scalarized_loop_boundary to end one loop
345 and start another.
346
347 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
348
349 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set loop's
350 temporary rank to the loop rank. Mark ss chains for multiple loop
351 if necessary. Use gfc_trans_scalarized_loop_boundary to end one loop
352 and start another.
353
354 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
355
356 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Don't calculate
357 offset twice in generated code.
358
359 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
360
361 * trans-expr.c (gfc_conv_procedure_call): Handle temporaries for
362 arguments to elemental calls.
363 * trans-stmt.c (replace_ss): New function.
364 (gfc_conv_elemental_dependencies): Remove temporary loop handling.
365 Create a new ss for the temporary and replace the original one with it.
366 Remove fake array references. Recalculate all offsets.
367
368 2011-11-04 Mikael Morin <mikael@gcc.gnu.org>
369
370 * trans-array.h (gfc_free_ss, gfc_set_delta): New prototypes.
371 * trans-array.c (gfc_free_ss): Remove forward declaration.
372 Make non-static.
373 (set_delta, gfc_set_delta): Remove forward declaration.
374 Make non-static and rename the former to the later. Update uses.
375
376 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
377
378 * trans.h (gfc_inline_intrinsic_function_p): Move prototype...
379 * gfortran.h (gfc_inline_intrinsic_function_p): ... here.
380 * dependency.c (gfc_check_argument_var_dependency): Check dependencies
381 of inline intrinsics' arguments.
382
383 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
384
385 * trans-array.c (gfc_trans_preloop_setup): New pointers to outer
386 dimension's ss and loop. Use them.
387
388 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
389
390 * trans-array.c (outermost_loop): New function.
391 (gfc_trans_array_constructor, gfc_set_vector_loop_bounds,
392 gfc_add_loop_ss_code): Put generated code out of the outermost loop.
393
394 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
395
396 * trans-array.c (constant_array_constructor_loop_size):
397 Handle multiple loops.
398
399 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
400
401 * trans-array.c (get_rank, get_loop_upper_bound_for_array):
402 New functions.
403 (gfc_trans_array_constructor): Handle multiple loops.
404
405 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
406
407 * trans.h (struct gfc_loopinfo): New field parent.
408 * trans-array.c (gfc_cleanup_loop): Free nested loops.
409 (gfc_add_ss_to_loop): Set nested_loop's parent loop.
410 (gfc_trans_array_constructor): Update assertion.
411 (gfc_conv_loop_setup): Ditto.
412
413 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
414
415 * trans-array.c (gfc_add_loop_ss_code): Skip non-nestedmost ss.
416 Call recursively gfc_add_loop_ss_code for all the nested loops.
417 (gfc_conv_ss_startstride): Only get the descriptor for the outermost
418 ss. Call recursively gfc_conv_ss_startstride for all the nested loops.
419 (set_loop_bounds): Call recursively for all the nested loops.
420 (set_delta): Ditto.
421
422 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
423
424 * trans.h (struct gfc_loopinfo): New fields nested and next.
425 * trans-array.c (gfc_add_ss_to_loop): Update list of nested list if
426 ss has non-null nested_ss field.
427
428 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
429
430 * trans-array.c (gfc_trans_create_temp_array): Loop over the parents.
431
432 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
433
434 * trans-array.c (get_array_ref_dim, get_scalarizer_dim_for_array_dim):
435 Rename the former to the latter and loop over the parents.
436 (innermost_ss): New function.
437 (get_array_ref_dim_for_loop_dim): New function.
438 (gfc_trans_create_temp_array): Use get_scalarizer_dim_for_array_dim.
439 (set_loop_bounds): Use get_array_dim_for_loop_dim).
440
441 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
442
443 * trans.h (struct gfc_ss): New field nested_ss.
444 * trans-expr.c (gfc_advance_se_ss_chain): Update assertion.
445
446 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
447
448 * trans-array.c (set_vector_loop_bounds): Loop over the parents.
449
450 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
451
452 * trans-array.c (gfc_trans_array_constructor): Loop over the parents.
453
454 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
455
456 * trans-array.c (gfc_set_loop_bounds_from_array_spec): Loop over the
457 parents.
458
459 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
460
461 * trans.h (struct gfc_ss): New field parent.
462 * trans-array.c (gfc_trans_scalarizing_loops): Skip clearing if a
463 parent exists.
464 * trans-expr.c (gfc_advance_se_ss_chain): Move to parent ss at the
465 end of the chain.
466
467 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
468
469 * trans-array.h (gfc_trans_create_temp_array): Remove loop argument.
470 * trans-array.c (gfc_trans_create_temp_array): Ditto. Get loop from ss.
471 Update reference to loop. Remove loop argument.
472 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update calls to
473 gfc_trans_create_temp_array.
474 * trans-expr.c (gfc_conv_procedure_call): Ditto.
475 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
476 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
477 Set loop before calling gfc_trans_create_temp_array.
478
479 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
480
481 * trans-array.c (gfc_trans_create_temp_array): New variable total_dim.
482 Set total_dim to loop's rank. Replace usages of loop's rank.
483
484 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
485
486 * trans-array.c (gfc_trans_array_constructor, trans_array_constructor):
487 Rename the former to the later. Get loop from ss.
488 Remove loop argument.
489 (gfc_add_loop_ss_code): Update call.
490
491 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
492
493 * trans-array.c (gfc_set_vector_loop_bounds): Get loop from ss.
494 Remove loop argument.
495 (gfc_add_loop_ss_code): Update call.
496
497 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
498
499 * trans.h (struct gfc_ss): New field loop.
500 * trans-array.c (set_ss_loop): New function.
501 (gfc_add_ss_to_loop): Call set_ss_loop.
502
503 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
504
505 * trans.h (struct gfc_ss_info): New field refcount.
506 * trans-array.c (free_ss_info): Decrement refcount. Return early if
507 still non-zero.
508 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss): Increment
509 refcount.
510
511 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
512
513 * trans-array.c (gfc_trans_create_temp_array): Move invariant condition
514 out of the containing loop.
515
516 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
517
518 * trans-array.c (gfc_conv_loop_setup, gfc_trans_create_temp_array):
519 Move specloop arrays clearing from the former to the latter.
520
521 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
522
523 * trans-array.c (set_loop_bounds): Separate the beginning of
524 gfc_conv_loop_setup into a function of its own.
525 (set_delta): Separate the end of gfc_conv_loop_setup into a function
526 of its own.
527 (gfc_conv_loop_setup): Call set_loop_bounds and set delta.
528 (set_loop_bounds, set_delta, gfc_conv_loop_setup): Make loopspec a
529 pointer to the specloop field from the loop struct.
530
531 2011-11-03 Tobias Burnus <burnus@net-b.de>
532
533 PR fortran/50933
534 * interface.c (gfc_compare_derived_types): Fix check for BIND(C).
535
536 2011-11-03 Tobias Burnus <burnus@net-b.de>
537
538 PR fortran/50960
539 * trans-decl.c (gfc_finish_var_decl): Mark PARAMETER as TREE_READONLY.
540
541 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
542
543 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
544 gfc_ss::where into gfc_ss_info.
545 * trans-array.c (gfc_add_loop_ss_code):
546 Update reference chains.
547 * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
548
549 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
550
551 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
552 gfc_ss::useflags into gfc_ss_info.
553 * trans-array.c (gfc_mark_ss_chain_used, gfc_trans_preloop_setup,
554 gfc_trans_scalarizing_loops, gfc_trans_scalarized_boundary):
555 Update reference chains.
556 * trans-expr.c (gfc_conv_procedure_call): Ditto.
557 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
558
559 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
560
561 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
562 gfc_ss::data::info into gfc_ss_info::data and remove empty union
563 gfc_ss::data.
564 * trans-array.c (gfc_free_ss, gfc_trans_create_temp_array,
565 gfc_trans_constant_array_constructor, gfc_trans_array_constructor,
566 gfc_set_vector_loop_bounds, gfc_add_loop_ss_code,
567 gfc_conv_ss_descriptor, gfc_trans_array_bound_check,
568 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
569 add_array_offset, gfc_trans_preloop_setup,
570 gfc_trans_scalarized_boundary, gfc_conv_section_startstride,
571 gfc_conv_ss_startstride, gfc_could_be_alias,
572 gfc_conv_loop_setup, gfc_conv_expr_descriptor,
573 gfc_alloc_allocatable_for_assignment, gfc_walk_array_ref):
574 Update reference chains and factor them where possible.
575 * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
576 gfc_conv_procedure_call, gfc_trans_subarray_assign): Updata reference
577 chains.
578 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
579 * trans-io.c (transfer_array_component): Ditto.
580 * trans-stmt.c (gfc_conv_elemental_dependencies,
581 gfc_trans_pointer_assign_need_temp): Ditto.
582
583 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
584
585 * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct
586 gfc_ss::data::temp into gfc_ss_info::data.
587 * trans-array.c (gfc_get_temp_ss, gfc_conv_loop_setup): Update reference
588 chains.
589
590 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
591
592 * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct
593 gfc_ss::data::scalar into newly created union gfc_ss_info::data,
594 and rename subfield expr to value.
595 * trans-array.c (gfc_add_loop_ss_code, gfc_conv_array_index_offset,
596 gfc_conv_expr_descriptor): Update reference chains.
597 * trans-const.c (gfc_conv_constant): Ditto.
598 * trans-expr.c (gfc_conv_expr): Ditto.
599
600 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
601
602 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field
603 string_length from the former struct to the latter.
604 * trans-array.c
605 (gfc_get_temp_ss, gfc_trans_array_constructor, gfc_add_loop_ss_code,
606 gfc_conv_ss_descriptor, gfc_conv_scalarized_array_ref,
607 gfc_conv_resolve_dependencies, gfc_conv_loop_setup,
608 gfc_conv_expr_descriptor): Update references to string_length and
609 factor common reference chains where possible.
610 * trans-const.c (gfc_conv_constant): Ditto.
611 * trans-expr.c (gfc_conv_variable, gfc_conv_subref_array_arg,
612 gfc_conv_expr): Ditto.
613
614 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
615
616 * trans.h (struct gfc_ss, struct gfc_ss_info): Move field expr from
617 the former struct to the latter.
618 * trans-array.c
619 (gfc_get_array_ss, gfc_get_scalar_ss,
620 gfc_trans_constant_array_constructor, gfc_trans_array_constructor,
621 gfc_add_loop_ss_code, gfc_conv_ss_descriptor,
622 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
623 gfc_conv_scalarized_array_ref, gfc_conv_ss_startstride,
624 gfc_could_be_alias, gfc_conv_resolve_dependencies,
625 gfc_conv_loop_setup, gfc_conv_expr_descriptor,
626 gfc_alloc_allocatable_for_assignment): Update references to expr and
627 factor common reference chains where possible.
628 * trans-const.c (gfc_conv_constant): Ditto.
629 * trans-expr.c (gfc_conv_variable, gfc_conv_procedure_call,
630 gfc_conv_array_constructor_expr, gfc_conv_expr,
631 gfc_conv_expr_reference): Ditto.
632 * trans-intrinsic.c (trans_this_image, gfc_conv_intrinsic_bound,
633 gfc_conv_intrinsic_cobound, gfc_conv_intrinsic_funcall,
634 gfc_add_intrinsic_ss_code): Ditto.
635 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
636
637 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
638
639 * trans.h (struct gfc_ss_info): New struct.
640 (gfc_get_ss_info): New macro.
641 (struct gfc_ss): Move type field to struct gfc_ss_info.
642 Add an info field of type gfc_ss_info.
643 * trans-array.c (free_ss_info): New function.
644 (gfc_free_ss): Call free_ss_info.
645 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss):
646 Allocate gfc_ss_info field.
647 (gfc_get_array_ss, gfc_get_temp_ss, gfc_get_scalar_ss,
648 gfc_set_vector_loop_bounds, gfc_add_loop_ss_code,
649 gfc_conv_array_index_offset, gfc_trans_preloop_setup,
650 gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
651 gfc_conv_ss_startstride, gfc_conv_resolve_dependencies,
652 gfc_conv_loop_setup, transposed_dims, gfc_conv_expr_descriptor,
653 gfc_walk_elemental_function_args): Update references to type.
654 * trans-const.c (gfc_conv_constant): Factor common reference chains
655 and update reference to type.
656 * trans-expr.c (gfc_conv_procedure_call, gfc_trans_assignment_1):
657 Update reference to type.
658 (gfc_conv_array_constructor_expr, gfc_conv_expr,
659 gfc_conv_expr_reference): Ditto. Factor common reference chains.
660 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Update references
661 to type
662 * trans-stmt.c (gfc_trans_where_assign): Ditto.
663
664 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
665
666 * trans.h (struct gfc_ss, struct gfc_array_info): Move shape field
667 from the former struct to the latter.
668 * trans-array.c (gfc_conv_ss_startstride, gfc_conv_loop_setup):
669 Update field references.
670 * trans-expr.c (gfc_trans_subarray_assign): Update field references
671 and factor common reference chains.
672 * trans-io.c (transfer_array_component): Ditto.
673
674 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
675
676 * trans.h (struct gfc_array_info): Move dim and dimen fields...
677 (struct gfc_ss): ... here. Remove gfc_ss::data::temp::dimen field.
678 * trans-array.c (gfc_conv_loop_setup): Remove temp_ss dim array
679 initialization.
680 (gfc_get_temp_ss): Initialize dim and dimen.
681 (gfc_free_ss, gfc_get_array_ss, gfc_get_temp_ss,
682 gfc_set_loop_bounds_from_array_spec, get_array_ref_dim,
683 gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
684 gfc_set_vector_loop_bounds, gfc_conv_scalarized_array_ref,
685 gfc_trans_preloop_setup, gfc_conv_ss_startstride,
686 gfc_conv_resolve_dependencies, gfc_conv_loop_setup, transposed_dims,
687 gfc_conv_expr_descriptor, gfc_alloc_allocatable_for_assignment,
688 gfc_walk_array_ref): Update field references.
689 * trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
690 Ditto.
691 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Ditto.
692 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
693
694 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
695
696 * trans.h (struct gfc_ss_info, struct gfc_array_info):
697 Rename the former to the latter.
698 * trans-array.c (gfc_get_array_ss, gfc_trans_allocate_array_storage,
699 get_array_ref_dim, gfc_trans_create_temp_array,
700 gfc_trans_constant_array_constructor, gfc_set_vector_loop_bounds,
701 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
702 add_array_offset, gfc_trans_preloop_setup, gfc_conv_section_startstride,
703 gfc_conv_ss_startstride, gfc_conv_loop_setup, transposed_dims,
704 gfc_conv_expr_descriptor): Update all uses.
705 * trans-expr.c (gfc_conv_subref_array_arg, gfc_conv_procedure_call):
706 Ditto.
707 * trans-intrinsic.c (gfc_conv_intrinsic_transfer,
708 walk_inline_intrinsic_transpose): Ditto.
709 * trans-stmt.c (gfc_conv_elemental_dependencies,
710 gfc_trans_pointer_assign_need_temp): Ditto.
711
712 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
713
714 * trans-array.c (dim_ok, transposed_dims): Rename the former to the
715 latter. Change argument type. Invert return value.
716 (gfc_conv_expr_descriptor): Update calls.
717
718 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
719
720 * trans-array.c (get_array_ref_dim): Change argument type and name.
721 Obtain previous argument from the new argument in the body.
722 (gfc_trans_create_temp_arry, gfc_conv_loop_setup): Update calls.
723
724 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
725
726 * trans-array.c (gfc_set_vector_loop_bounds, set_vector_loop_bounds):
727 Rename the former to the latter. Change type and name of argument.
728 Get previous argument from the new one.
729 (gfc_add_loop_ss_code): Update call.
730
731 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
732
733 * trans-array.h (gfc_trans_create_temp_array): Replace info argument
734 with ss argument.
735 * trans-array.c (gfc_trans_create_temp_array): Ditto. Get info from ss.
736 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
737 gfc_trans_create_temp_array.
738 * trans-expr.c (gfc_conv_procedure_call): Ditto.
739 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Ditto.
740 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
741
742 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
743
744 * trans-array.c (gfc_trans_array_bound_check): Use ss argument
745 to get name.
746
747 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
748
749 * trans-array.c (gfc_trans_array_bound_check,
750 trans_array_bound_check): Rename the former to the latter.
751 Replace descriptor argument with ss argument. Get descriptor from ss.
752 (gfc_conv_array_index_offset, conv_array_index_offset): Rename the
753 former to the latter. Update call to trans_array_bound_check.
754 Replace info argument with ss argument. Get info from ss.
755 (gfc_conv_scalarized_array_ref): Update call to conv_array_index_offset.
756 (add_array_offset): Ditto
757
758 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
759
760 * trans-array.c (gfc_trans_constant_array_constructor,
761 trans_constant_array_constructor): Rename the former to the latter.
762 Don't set the rank of the temporary for the loop. Remove then unused
763 loop argument.
764 (gfc_trans_array_constructor): Update call.
765
766 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
767
768 * trans-array.c (gfc_trans_scalarizing_loops): Stop loop before end
769 marker, not after it.
770
771 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
772
773 * trans-array.c (gfc_conv_loop_setup): Also skip temporary arrays.
774
775 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
776
777 * trans-array.c (gfc_conv_ss_startstride): Access array bounds along
778 array dimensions instead of loop dimensions.
779
780 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
781
782 * trans-array.c (gfc_trans_preloop_setup): Assertify one condition.
783
784 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
785
786 * trans-array.c (gfc_walk_array_ref): Skip coarray dimensions.
787
788 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
789
790 * trans-array.c (get_array_ref_dim): Remove redundant condition.
791
792 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
793
794 * trans-array.c (gfc_trans_preloop_setup): Move common code...
795 (add_array_offset): ...into that new function.
796
797 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
798
799 * trans-array.c (gfc_trans_preloop_setup): Use loop's dimension instead
800 of array's dimention. Check that it is indeed the same.
801
802 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
803
804 * trans-array.c (gfc_trans_preloop_setup): Remove redundant assertion.
805 Special case outermost loop.
806
807 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
808
809 * trans-array.c (gfc_trans_preloop_setup): Factor loop index
810 initialization.
811
812 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
813
814 * trans-array.c (gfc_trans_preloop_setup): Move code earlier.
815
816 2011-11-03 Mikael Morin <mikael@gcc.gnu.org>
817
818 * trans-array.c (gfc_trans_preloop_setup): Move array reference
819 initialisation earlier. Factor subsequent array references.
820
821 2011-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
822
823 * Makef-lang.in (gfortranspec.o): Pass SHLIB instead of SHLIB_LINK.
824
825 2011-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
826
827 PR fortran/50573
828 * check.c (gfc_check_dshift): Update argument checking for BOZ.
829 Update checking SHIFT against BITSIZE of I or J.
830 * intrinsic.texi: Update docs for DSHIFTL and DSHIFTR.
831
832 2011-10-28 Steven G. Kargl <kargl@gcc.gnu.org>
833
834 * check.c (gfc_check_atan_2): Typo in comment.
835 (gfc_check_nearest): If 's' is constant, check that it is not 0.
836 * simplify.c (simplify_dshift, gfc_simplify_ibclr, gfc_simplify_ibits,
837 gfc_simplify_ibset, simplify_shift, gfc_simplify_ishftc,
838 gfc_simplify_nearest): Remove dead code.
839
840 2011-10-23 Steven G. Kargl <kargl@gcc.gnu.org>
841
842 * simplify.c (simplify_transformation_to_array): Fix memory leak.
843
844 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
845
846 PR fortran/50821
847 * check.c (gfc_check_ishftc): Check args are constant before
848 extracting the integer.
849
850 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
851
852 PR fortran/50514
853 * check.c (less_than_bitsize1): Check |shift| <= bit_size(i).
854 (gfc_check_ishftc): Check |shift| <= bit_size(i) and check
855 that size is positive.
856
857 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
858
859 PR fortran/50524
860 * resolve.c (resolve_ref): Check return value of resolve_substring().
861
862 2011-10-20 Steven G. Kargl <kargl@gcc.gnu.org>
863
864 * io.c (match_dt_format): Match a user-defined operator or a kind
865 type prefixed string.
866
867 2011-10-19 Janus Weil <janus@gcc.gnu.org>
868
869 PR fortran/47023
870 * check.c (gfc_check_sizeof): Reject procedures as argument of SIZEOF.
871 * intrinsinc.texi (SIZEOF): Document it.
872 (STORAGE_SIZE): Fix special characters. Fix line breaks.
873
874 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
875
876 PR fortran/50420
877 * trans.c (gfc_build_array_ref): If type is not an array, check that
878 there is nothing to do, and do nothing.
879
880 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
881
882 PR fortran/50420
883 * trans-types.c (gfc_build_array_type): Don't force lower bound to one
884 in the deferred case.
885
886 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
887
888 PR fortran/50420
889 * simplify.c (simplify_cobound): Accept non-last-in-ref-chain coarrays.
890 Don't set already set array ref.
891
892 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
893
894 * array.c (gfc_find_array_ref): Remove coarray-specific handling.
895
896 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
897
898 PR fortran/50420
899 * check.c (dim_corank_check): Use gfc_get_corank to get corank.
900
901 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
902
903 PR fortran/50420
904 * trans-intrinsic.c (walk_coarray): Change AR_ELEMENT to AR_SECTION.
905
906 PR fortran/50420
907 * trans-intrinsic.c (walk_coarray): Use gfc_walk_array_ref for
908 the scalarization chain initialization.
909
910 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
911
912 PR fortran/50420
913 * trans-intrinsic.c (walk_coarray): Allow subreferences after a
914 coarray object reference.
915
916 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
917
918 PR fortran/50420
919 * trans-array.c (gfc_walk_array_ref): Allow zero rank arrays
920 if they are coarrays.
921
922 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
923
924 * trans-array.h (gfc_walk_array_ref): New prototype.
925 * trans-array.c (gfc_walk_array_ref): New function, containing
926 all but the beginning of gfc_walk_variable_expr's code.
927 (gfc_walk_variable_expr): Use gfc_walk_array_ref.
928
929 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
930
931 PR fortran/50420
932 * trans-array.c (gfc_conv_expr_descriptor): Use loop.dimen instead of
933 ndim for the descriptor's rank.
934
935 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
936
937 PR fortran/50420
938 * trans-array.c (gfc_conv_expr_descriptor): Count codimensions starting
939 from zero, and add then the relevant offset (either ndim or loop.dimen)
940 depending on context.
941
942 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
943
944 * trans-array.c (gfc_conv_expr_descriptor): Save some horizontal space.
945
946 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
947
948 * trans-array.c (gfc_conv_expr_descriptor): Move ndim initialization
949 earlier.
950
951 2011-10-18 Janus Weil <janus@gcc.gnu.org>
952
953 PR fortran/47023
954 * decl.c (verify_c_interop_param): Renamed to
955 'gfc_verify_c_interop_param'. Add error message for polymorphic
956 arguments.
957 (verify_c_interop): Renamed to 'gfc_verify_c_interop'. Reject
958 polymorphic variables.
959 (verify_bind_c_sym): Renamed 'verify_c_interop'.
960 * gfortran.h (verify_c_interop,verify_c_interop_param): Renamed.
961 * check.c (gfc_check_sizeof): Ditto.
962 * resolve.c (gfc_iso_c_func_interface,resolve_fl_procedure): Ditto.
963 * symbol.c (verify_bind_c_derived_type): Ditto.
964
965 2011-10-15 Tom Tromey <tromey@redhat.com>
966 Dodji Seketeli <dodji@redhat.com>
967
968 * cpp.c (print_line, cb_define): Adjust to avoid using internals
969 of struct line_map. Use the public API instead.
970
971 2011-10-17 Janus Weil <janus@gcc.gnu.org>
972
973 PR fortran/47023
974 PR fortran/50752
975 * primary.c (match_kind_param): Avoid segfault.
976
977 2011-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
978
979 * frontend-passes.c (current_ns): Make static.
980 (create_var): Note parent of newly created namespace.
981 (optimize_namespace): Don't wak sibling namespaces
982 if they are EXEC_BLOCK because this is handled...
983 (gfc_code_walker): ... here. Also walk ASSOCIATE lists.
984
985 2011-10-16 Janus Weil <janus@gcc.gnu.org>
986
987 PR fortran/47023
988 * primary.c (match_kind_param): Detect ISO_C_BINDING kinds.
989 (get_kind): Pass on 'is_iso_c' flag.
990 (match_integer_constant,match_real_constant,match_logical_constant):
991 Set 'ts.is_c_interop'.
992
993 2011-10-16 Janus Weil <janus@gcc.gnu.org>
994
995 PR fortran/50547
996 * resolve.c (resolve_formal_arglist): Remove unneeded error message.
997 Some reshuffling.
998
999 2011-10-15 Tobias Burnus <burnus@net-b.de>
1000
1001 * gfortran.texi (Fortran 2008 status, TS 29113 status,
1002 Further Interoperability of Fortran with C): Update implementation
1003 status, change references from TR 29113 to TS 29113.
1004 * intrinsic.texi (RANK): Change TR 29113 to TS 29113.
1005 * invoke.text (-std=): Ditto, change -std=f2008tr to -std=f2008ts.
1006 * lang.opt (std=): Ditto.
1007 * options.c (gfc_handle_option, set_default_std_flags): Ditto and
1008 change GFC_STD_F2008_TR to GFC_STD_F2008_TS.
1009 * libgfortran.h: Ditto.
1010 * intrinsic.c (add_functions, gfc_check_intrinsic_standard): Ditto.
1011 * decl.c (verify_c_interop_param): Ditto.
1012
1013 2011-10-14 Janus Weil <janus@gcc.gnu.org>
1014
1015 PR fortran/50570
1016 * expr.c (gfc_check_vardef_context): Don't throw an error on
1017 non-pointer assignments involving an intent(in) pointer dummy.
1018
1019 2011-10-14 Tobias Burnus <burnus@net-b.de>
1020
1021 PR fortran/50718
1022 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
1023 for dummy arguments with VALUE attribute.
1024
1025 2011-10-11 Tobias Burnus <burnus@net-b.de>
1026 Janus Weil <janus@gcc.gnu.org>
1027
1028 * invoke.texi (-fwhole-file): Update wording since -fwhole-file
1029 is now enabled by default.
1030
1031 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
1032
1033 * trans-expr.c (gfc_conv_power_op): Delete old interface with two
1034 parallel arrays to hold standard builtin declarations, and replace
1035 it with a function based interface that can support creating
1036 builtins on the fly in the future. Change all uses, and poison
1037 the old names. Make sure 0 is not a legitimate builtin index.
1038 (fill_with_spaces): Ditto.
1039 (gfc_trans_string_copy): Ditto.
1040 (gfc_trans_zero_assign): Ditto.
1041 (gfc_build_memcpy_call): Ditto.
1042 (alloc_scalar_allocatable_for_assignment): Ditto.
1043 * trans-array.c (gfc_trans_array_constructor_value): Ditto.
1044 (duplicate_allocatable): Ditto.
1045 (gfc_alloc_allocatable_for_assignment): Ditto.
1046 * trans-openmp.c (gfc_omp_clause_copy_ctor): Ditto.
1047 (gfc_omp_clause_assign_op): Ditto.
1048 (gfc_trans_omp_atomic): Ditto.
1049 (gfc_trans_omp_do): Ditto.
1050 (gfc_trans_omp_task): Ditto.
1051 * trans-stmt.c (gfc_trans_stop): Ditto.
1052 (gfc_trans_sync): Ditto.
1053 (gfc_trans_allocate): Ditto.
1054 (gfc_trans_deallocate): Ditto.
1055 * trans.c (gfc_call_malloc): Ditto.
1056 (gfc_allocate_using_malloc): Ditto.
1057 (gfc_call_free): Ditto.
1058 (gfc_deallocate_with_status): Ditto.
1059 (gfc_deallocate_scalar_with_status): Ditto.
1060 * f95-lang.c (gfc_define_builtin): Ditto.
1061 (gfc_init_builtin_functions): Ditto.
1062 * trans-decl.c (create_main_function): Ditto.
1063 * trans-intrinsic.c (builtin_decl_for_precision): Ditto.
1064
1065 2011-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1066
1067 PR fortran/50564
1068 * frontend-passes (forall_level): New variable.
1069 (cfe_register_funcs): Don't register functions if we
1070 are within a forall loop.
1071 (optimize_namespace): Set forall_level to 0 before entry.
1072 (gfc_code_walker): Increase/decrease forall_level.
1073
1074 2011-10-09 Tobias Burnus <burnus@net-b.de>
1075
1076 PR fortran/50273
1077 * trans-common.c (translate_common): Fix -Walign-commons check.
1078
1079 2011-10-09 Mikael Morin <mikael.morin@sfr.fr>
1080
1081 * interface.c (check_dummy_characteristics): Count dimensions starting
1082 from one in diagnostic.
1083
1084 2011-10-09 Tobias Burnus <burnus@net-b.de>
1085
1086 * Make-lang.in (F95_PARSER_OBJS, GFORTRAN_TRANS_DEPS): Add
1087 dependency on iso-c-binding.def and iso-fortran-env.def.
1088 * module.c (import_iso_c_binding_module): Add error when
1089 explicitly importing a nonstandard symbol; extend standard-
1090 depending loading.
1091 * iso-c-binding.def: Add c_float128 and c_float128_complex
1092 integer parameters (for -std=gnu).
1093 * intrinsic.texi (ISO_C_Binding): Document them.
1094 * symbol.c (generate_isocbinding_symbol): Change macros
1095 to ignore GFC_STD_* data.
1096 * trans-types.c (gfc_init_c_interop_kinds): Ditto; make
1097 nonstatic and renamed from "init_c_interop_kinds".
1098 (gfc_init_kinds): Don't call it
1099 * trans-types.h (gfc_init_c_interop_kinds): Add prototype.
1100 * f95-lang.c (gfc_init_decl_processing): Call it.
1101
1102 2011-10-09 Janus Weil <janus@gcc.gnu.org>
1103
1104 PR fortran/50659
1105 * expr.c (replace_symbol): Only do replacement if the symbol is a dummy.
1106
1107 2011-10-08 Paul Thomas <pault@gcc.gnu.org>
1108
1109 PR fortran/47844
1110 * trans-array.c (gfc_conv_array_index_offset): Use descriptor
1111 stride for pointer function results.
1112
1113 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1114
1115 * trans-array.c (gfc_conv_expr_descriptor): Remove trailing whitespace.
1116
1117 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1118
1119 * trans-array.c (gfc_conv_ss_startstride): Merge two switch cases.
1120
1121 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1122
1123 * trans-array.c (gfc_conv_section_startstride): Remove coarray argument.
1124 Remove conditions on coarray.
1125 (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
1126 (gfc_conv_expr_descriptor): Ditto. Add assertions before the call.
1127
1128 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1129
1130 * trans-array.c (gfc_conv_section_startstride): Remove coarray_last
1131 argument. Remove condition on coarray_last.
1132 (gfc_conv_ss_startstride): Update call to gfc_conv_section_startstride.
1133 (gfc_conv_expr_descriptor): Ditto.
1134
1135 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1136
1137 * trans-array.c (gfc_walk_variable_expr): Remove scalar coarray
1138 handling. Don't reset array ref's corank and codimensions' types
1139 in the full array ref case. Update loop upper limit.
1140 Remove DIMEN_THIS_IMAGE case. Remove unnecessary conditions.
1141
1142 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1143
1144 * trans.h (gfc_ss_info): Remove codimen field.
1145 * trans-array.c (gfc_get_array_ss): Don't set codimen field.
1146 (gfc_trans_create_temp_array): Don't set descriptor's cobounds.
1147 (gfc_trans_constant_array_constructor): Update loop upper limit.
1148 (gfc_conv_ss_startstride): Don't set codimen field.
1149 Don't get descriptor's cobounds.
1150 (gfc_walk_variable_expr): Update dimension index.
1151 * trans-intrinsic.c (trans_this_image, trans_image_index,
1152 conv_intrinsic_cobound): Don't set codimen field
1153
1154 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1155
1156 * trans.h (gfc_loopinfo): Remove codimen field.
1157 * trans-array.c (gfc_set_vector_loop_bounds,
1158 gfc_trans_scalarizing_loops, gfc_conv_loop_setup): Update loop upper
1159 limit.
1160 (gfc_set_loop_bounds_from_array_spec): Ditto. Remove skip on last
1161 codimension.
1162 (gfc_start_scalarized_body): Update loop lower limit.
1163 (gfc_conv_ss_startstride): Don't set loop's codimen field.
1164 (gfc_conv_loop_setup): Remove unnecessary condition.
1165 (gfc_conv_expr_descriptor): Don't use loop's codimen field as corank.
1166
1167 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1168
1169 * trans.h (gfc_ss): Remove data.temp.codimen field.
1170 * trans-array.c (gfc_conv_resolve_dependencies,
1171 gfc_conv_expr_descriptor): Don't set temp's codimen field.
1172
1173 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1174
1175 * resolve.c (resolve_array_ref): Set array_ref's dimen field (and the
1176 associated dimen_type) in the full array ref case.
1177
1178 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1179
1180 * trans-intrinsic.c (walk_coarray): New function.
1181 (convert_element_to_coarray_ref): Move code to walk_coarray. Remove.
1182 (trans-this_image, trans_image_index, conv_intrinsic_cobound):
1183 Use walk_coarray.
1184
1185 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1186
1187 * trans-array.c (gfc_conv_expr_descriptor): Add out-of-the-scalarizer
1188 cobounds evaluation.
1189
1190 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1191
1192 * trans-array.c (gfc_conv_ss_startstride): Support zero rank loop.
1193
1194 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1195
1196 * trans-array.c (gfc_conv_section_startstride): Move code to
1197 evaluate_bound. Use evaluate_bound.
1198 (evaluate_bound): New function.
1199
1200 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1201
1202 * trans-array.c (gfc_conv_section_startstride): Update assertion to
1203 also accept coarrays.
1204
1205 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1206
1207 * trans-array.c (gfc_conv_section_startstride): Factor common
1208 array ref references.
1209
1210 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1211
1212 * trans-array.c (gfc_conv_expr_descriptor): Use codim instead of
1213 loop.codimen as argument to gfc_get_array_type_bounds.
1214
1215 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1216
1217 * trans-array.h (struct gfc_se): New flag want_coarray.
1218 * trans-intrinsic.c (trans_this_image, trans_image_index,
1219 conv_intrinsic_cobound): Set want_coarray.
1220 * trans_array.c (gfc_conv_expr_descriptor): Evaluate codimension
1221 earlier and without relying on the scalarizer.
1222
1223 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1224
1225 * expr.c (gfc_get_corank): Return 0 if input expression is not a
1226 coarray.
1227
1228 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1229
1230 * trans-array.c (gfc_conv_expr_descriptor): Simplify coarray
1231 descriptor setup code.
1232
1233 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1234
1235 * resolve.c (compare_spec_to_ref): Move coarray ref initialization
1236 code...
1237 (resolve_array_ref): ... here.
1238
1239 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
1240
1241 * check.c (is_coarray): Remove.
1242 (coarray_check): Use gfc_is_coarray.
1243
1244 2011-10-07 Janus Weil <janus@gcc.gnu.org>
1245
1246 PR fortran/50625
1247 * class.c (gfc_build_class_symbol): Fix whitespace.
1248 * module.c (mio_symbol): Set 'class_ok' attribute.
1249 * trans-decl.c (gfc_get_symbol_decl): Make sure the backend_decl has
1250 been built for class symbols.
1251
1252 2011-10-04 Janus Weil <janus@gcc.gnu.org>
1253
1254 PR fortran/35831
1255 * interface.c (check_dummy_characteristics): Check the array shape.
1256
1257 2011-10-01 Janus Weil <janus@gcc.gnu.org>
1258
1259 PR fortran/50585
1260 * interface.c (get_expr_storage_size): Check if 'length' component is
1261 associated.
1262
1263 2011-09-29 Janus Weil <janus@gcc.gnu.org>
1264
1265 PR fortran/50547
1266 * resolve.c (resolve_formal_arglist): Fix pureness check for dummy
1267 functions.
1268
1269 PR fortran/50553
1270 * symbol.c (check_conflict): Forbid TARGET attribute for statement
1271 functions.
1272
1273 2011-09-27 Jakub Jelinek <jakub@redhat.com>
1274
1275 * trans-types.c (gfc_type_for_size): Return wider type
1276 if no suitable narrower type has been found.
1277 (gfc_type_for_mode): Return NULL_TREE if gfc_type_for_size
1278 returned type doesn't have expected TYPE_MODE.
1279
1280 2011-09-26 Janus Weil <janus@gcc.gnu.org>
1281
1282 PR fortran/50515
1283 * resolve.c (resolve_common_blocks): Check for EXTERNAL attribute.
1284
1285 PR fortran/50517
1286 * interface.c (gfc_compare_interfaces): Bugfix in check for result type.
1287
1288 2011-09-22 Janus Weil <janus@gcc.gnu.org>
1289
1290 PR fortran/41733
1291 * expr.c (gfc_check_pointer_assign): Check for nonintrinsic elemental
1292 procedures.
1293 * interface.c (gfc_compare_interfaces): Rename 'intent_flag'. Check
1294 for PURE and ELEMENTAL attributes.
1295 (compare_actual_formal): Remove pureness check here.
1296
1297 2011-09-20 Steven G. Kargl <kargl@gcc.gnu.org>
1298
1299 * check.c (gfc_check_c_sizeof): Remove redundant word.
1300
1301 2011-09-20 Simon Baldwin <simonb@google.com>
1302
1303 * module.c (gfc_dump_module): Omit timestamp from output.
1304
1305 2011-09-17 Janus Weil <janus@gcc.gnu.org>
1306
1307 PR fortran/50403
1308 * symbol.c (gfc_use_derived): Fix coding style.
1309
1310 2011-09-15 Janus Weil <janus@gcc.gnu.org>
1311
1312 PR fortran/50401
1313 * resolve.c (resolve_transfer): Check if component 'ref' is defined.
1314
1315 PR fortran/50403
1316 * symbol.c (gfc_use_derived): Check if argument 'sym' is defined.
1317
1318 2011-09-14 Tobias Burnus <burnus@net-b.de>
1319
1320 PR fortran/34547
1321 PR fortran/50375
1322 * check.c (gfc_check_null): Allow allocatables as MOLD to NULL.
1323 * resolve.c (resolve_transfer): Reject NULL without MOLD.
1324 * interface.c (gfc_procedure_use): Reject NULL without MOLD
1325 if no explicit interface is known.
1326 (gfc_search_interface): Reject NULL without MOLD if it would
1327 lead to ambiguity.
1328
1329 2011-09-13 Janus Weil <janus@gcc.gnu.org>
1330
1331 PR fortran/50379
1332 * symbol.c (check_conflict): Check conflict between GENERIC and RESULT
1333 attributes.
1334
1335 2011-09-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1336
1337 PR fortran/50327
1338 * frontend-passes.c (dummy_expr_callback): New function.
1339 (convert_do_while): New function.
1340 (optimize_namespace): Call code walker to convert do while loops.
1341
1342 2011-09-11 Janus Weil <janus@gcc.gnu.org>
1343
1344 PR fortran/35831
1345 PR fortran/47978
1346 * interface.c (check_dummy_characteristics): New function to check the
1347 characteristics of dummy arguments.
1348 (gfc_compare_interfaces,gfc_check_typebound_override): Call it here.
1349
1350 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1351
1352 * trans-array.c (gfc_trans_constant_array_constructor): Remove
1353 superfluous initialisation of DIM field.
1354 (gfc_trans_array_constructor): Assert that DIMEN field is properly set.
1355 (gfc_conv_expr_descriptor): Ditto.
1356 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1357
1358 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1359
1360 * trans-array.h (gfc_get_scalar_ss): New prototype.
1361 * trans-array.c (gfc_get_scalar_ss): New function.
1362 (gfc_walk_variable_expr, gfc_walk_op_expr,
1363 gfc_walk_elemental_function_args): Re-use gfc_get_scalar_ss.
1364 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1365 (gfc_trans_assignment_1): Ditto.
1366 * trans-stmt.c (compute_inner_temp_size, gfc_trans_where_assign,
1367 gfc_trans_where_3): Ditto.
1368
1369 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1370
1371 * trans-array.h (gfc_get_temp_ss): New prototype.
1372 * trans-array.c (gfc_get_temp_ss): New function.
1373 (gfc_conv_resolve_dependencies): Re-use gfc_get_temp_ss.
1374 (gfc_conv_expr_descriptor): Ditto.
1375 * trans-expr.c (gfc_conv_subref_array_arg): Ditto.
1376
1377 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
1378
1379 * trans-array.h (gfc_get_array_ss): New prototype.
1380 * trans-array.c (gfc_get_array_ss): New function.
1381 (gfc_walk_variable_expr, gfc_walk_function_expr,
1382 gfc_walk_array_constructor): Re-use gfc_get_array_ss.
1383 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1384 * trans-intrinsic.c (gfc_walk_intrinsic_bound,
1385 gfc_walk_intrinsic_libfunc): Ditto.
1386 * trans-io.c (transfer_array_component): Ditto.
1387
1388 2011-09-08 Tobias Burnus <burnus@net-b.de>
1389
1390 PR fortran/44646
1391 * decl.c (gfc_match_entry, gfc_match_end): Handle COMP_DO_CONCURRENT.
1392 * dump-parse-tree.c (show_code_node): Handle EXEC_DO_CONCURRENT.
1393 * gfortran.h (gfc_exec_op): Add EXEC_DO_CONCURRENT.
1394 * match.c (gfc_match_critical, match_exit_cycle, gfc_match_stopcode,
1395 lock_unlock_statement, sync_statement, gfc_match_allocate,
1396 gfc_match_deallocate, gfc_match_return): Add DO CONCURRENT diagnostic.
1397 (gfc_match_do): Match DO CONCURRENT.
1398 (match_derived_type_spec, match_type_spec, gfc_free_forall_iterator,
1399 match_forall_iterator, match_forall_header, match_simple_forall,
1400 gfc_match_forall): Move up in the file.
1401 * parse.c (check_do_closure, parse_do_block): Handle do concurrent.
1402 * parse.h (gfc_compile_state): Add COMP_DO_CONCURRENT.
1403 * resolve.c (do_concurrent_flag): New global variable.
1404 (resolve_function, pure_subroutine, resolve_branch,
1405 gfc_resolve_blocks, resolve_code, resolve_types): Add do concurrent
1406 diagnostic.
1407 * st.c (gfc_free_statement): Handle EXEC_DO_CONCURRENT.
1408 * trans-stmt.c (gfc_trans_do_concurrent): New function.
1409 (gfc_trans_forall_1): Handle do concurrent.
1410 * trans-stmt.h (gfc_trans_do_concurrent): New function prototype.
1411 * trans.c (trans_code): Call it.
1412 * frontend-passes.c (gfc_code_walker): Handle EXEC_DO_CONCURRENT.
1413
1414 2011-09-07 Janus Weil <janus@gcc.gnu.org>
1415
1416 PR fortran/48095
1417 * primary.c (gfc_match_structure_constructor): Handle parsing of
1418 procedure pointers components in structure constructors.
1419 * resolve.c (resolve_structure_cons): Check interface of procedure
1420 pointer components. Changed wording of some error messages.
1421
1422 2011-09-04 Janus Weil <janus@gcc.gnu.org>
1423
1424 PR fortran/50227
1425 * trans-types.c (gfc_sym_type): Check for proc_name.
1426
1427 2011-08-30 Tobias Burnus <burnus@net-b.de>
1428
1429 PR fortran/45044
1430 * trans-common.c (build_common_decl): Warn if named common
1431 block's size is not everywhere the same.
1432
1433 2011-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
1434
1435 PR fortran/45170
1436 * trans-stmt.c (gfc_trans_allocate): Evaluate the substring.
1437
1438 2011-08-29 Janus Weil <janus@gcc.gnu.org>
1439
1440 PR fortran/50225
1441 * trans-decl.c (gfc_generate_function_code): Nullify polymorphic
1442 allocatable function results.
1443
1444 2011-08-29 Tobias Burnus <burnus@net-b.de>
1445
1446 * trans-decl.c (generate_coarray_sym_init): Use
1447 GFC_CAF_COARRAY_STATIC for static coarrays.
1448
1449 2011-08-28 Dodji Seketeli <dodji@redhat.com>
1450
1451 * scanner.c (load_file): Don't abuse LC_RENAME reason while
1452 (indirectly) calling linemap_add.
1453
1454 2011-08-26 Jakub Jelinek <jakub@redhat.com>
1455
1456 * trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL
1457 if threadprivate.
1458 * symbol.c (check_conflict): Allow threadprivate attribute with
1459 FL_PROCEDURE if proc_pointer.
1460
1461 2011-08-25 Mikael Morin <mikael@gcc.gnu.org>
1462
1463 PR fortran/50050
1464 * expr.c (gfc_free_shape): Do nothing if shape is NULL.
1465 (free_expr0): Remove redundant NULL shape check.
1466 * resolve.c (check_host_association): Ditto.
1467 * trans-expr.c (gfc_trans_subarray_assign): Assert that shape is
1468 non-NULL.
1469 * trans-io.c (transfer_array_component): Ditto.
1470
1471 2011-08-25 Tobias Burnus <burnus@net-b.de>
1472
1473 * trans-array.c (gfc_conv_descriptor_token): Add assert.
1474 * trans-decl.c (gfc_build_qualified_array,
1475 create_function_arglist): Handle assumed-shape arrays.
1476 * trans-expr.c (gfc_conv_procedure_call): Ditto.
1477 * trans-types.c (gfc_get_array_descriptor_base): Ditto, don't
1478 add "caf_token" to assumed-shape descriptors, new akind argument.
1479 (gfc_get_array_type_bounds): Pass akind.
1480 * trans.h (lang_decl): New elements caf_offset and token.
1481 (GFC_DECL_TOKEN, GFC_DECL_CAF_OFFSET): New macros.
1482
1483 2011-08-25 Tobias Burnus <burnus@net-b.de>
1484
1485 * trans-array.c (structure_alloc_comps): Fix for allocatable
1486 scalar coarray components.
1487 * trans-expr.c (gfc_conv_component_ref): Ditto.
1488 * trans-type.c (gfc_get_derived_type): Ditto.
1489
1490 2011-08-24 Tobias Burnus <burnus@net-b.de>
1491
1492 PR fortran/50163
1493 * expr.c (check_init_expr): Return when an error occured.
1494
1495 2011-08-24 Joseph Myers <joseph@codesourcery.com>
1496
1497 * Make-lang.in (fortran/cpp.o): Remove explicit compilation rule.
1498
1499 2011-08-23 Tobias Burnus <burnus@net-b.de>
1500
1501 PR fortran/31600
1502 * symbol.c (gfc_add_type): Better diagnostic if redefining
1503 use-associated symbol.
1504 * module.c (gfc_use_module): Use module name as locus.
1505
1506 2011-08-22 Gabriel Charette <gchare@google.com>
1507
1508 * cpp.c (gfc_cpp_init): Force BUILTINS_LOCATION for tokens
1509 defined in cpp_define_builtins.
1510
1511 2011-08-22 Mikael Morin <mikael@gcc.gnu.org>
1512
1513 PR fortran/50050
1514 * gfortran.h (gfc_clear_shape, gfc_free_shape): New prototypes.
1515 * expr.c (gfc_clear_shape, gfc_free_shape): New functions.
1516 (free_expr0): Re-use gfc_free_shape.
1517 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
1518 * trans-io.c (transfer_array_component): Ditto.
1519 * resolve.c (check_host_association): Ditto.
1520 (gfc_expr_to_initialize): Don't force the rank value and free the shape
1521 after updating the expression. Recalculate shape and rank.
1522 (resolve_where_shape): Re-use gfc_clear_shape.
1523 * array.c (gfc_array_ref_shape): Ditto.
1524
1525 2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1526
1527 PR fortran/47659
1528 * expr.c (gfc_check_assign): Check for type conversions when the
1529 right-hand side is a constant REAL/COMPLEX contstant the left-hand
1530 side is also REAL/COMPLEX. Don't warn when a narrowing conversion
1531 for REAL does not change the value of the constant.
1532
1533 2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1534
1535 PR fortran/50130
1536 * resolve.c (resolve_array_ref): Don't calculate upper bound
1537 if the stride is zero.
1538
1539 2011-08-20 Janus Weil <janus@gcc.gnu.org>
1540
1541 PR fortran/49638
1542 * dependency.c (gfc_dep_compare_expr): Add new result value "-3".
1543 (gfc_check_element_vs_section,gfc_check_element_vs_element): Handle
1544 result value "-3".
1545 * frontend-passes.c (optimize_comparison): Ditto.
1546 * interface.c (gfc_check_typebound_override): Ditto.
1547
1548 2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
1549
1550 PR fortran/50129
1551 * parse.c (parse_where): Undo changes after emitting an error.
1552
1553 2011-08-19 Jakub Jelinek <jakub@redhat.com>
1554
1555 PR fortran/49792
1556 * trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
1557 bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
1558 lhs needs reallocation.
1559 * trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
1560 code is NULL, emit a barrier if workshare emitted no code at all
1561 and NOWAIT clause isn't present.
1562
1563 2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
1564
1565 PR fortran/50071
1566 * gfortran.h (gfc_exec_op): New constant EXEC_END_NESTED_BLOCK.
1567 * parse.c (check_statement_label): Accept ST_END_BLOCK and
1568 ST_END_ASSOCIATE as valid branch target.
1569 (accept_statement): Change EXEC_END_BLOCK to EXEC_END_NESTED_BLOCK.
1570 Add EXEC_END_BLOCK code in the ST_END_BLOCK and ST_END_ASSOCIATE cases.
1571 * resolve.c (find_reachable_labels): Change EXEC_END_BLOCK to
1572 EXEC_END_NESTED_BLOCK.
1573 (resolve_branch): Ditto.
1574 (resolve_code): Add EXEC_END_NESTED_BLOCK case.
1575 * st.c (gfc_free_statement): Ditto.
1576 * trans.c (trans_code): Ditto.
1577
1578 2011-08-18 Mikael Morin <mikael.morin@sfr.fr>
1579
1580 PR fortran/50071
1581 * symbol.c (gfc_get_st_label): Use the derived type namespace when
1582 we are parsing a derived type definition.
1583
1584 2011-08-18 Tobias Burnus <burnus@net-b.de>
1585
1586 PR fortran/18918
1587 * parse.c (parse_derived): Add lock_type
1588 checks, improve coarray_comp handling.
1589 * resolve.c (resolve_allocate_expr,
1590 resolve_lock_unlock, resolve_symbol): Fix lock_type
1591 constraint checks.
1592
1593 2011-08-17 Tobias Burnus <burnus@net-b.de>
1594
1595 PR fortran/31461
1596 * trans-decl.c (generate_local_decl): Warn about
1597 unused explicitly imported module variables/parameters.
1598
1599 2011-08-17 Janus Weil <janus@gcc.gnu.org>
1600
1601 PR fortran/50070
1602 * resolve.c (resolve_fl_variable): Reject non-constant character lengths
1603 in COMMON variables.
1604
1605 2011-08-16 Tobias Burnus <burnus@net-b.de>
1606 Dominique Dhumieres <dominiq@lps.ens.fr>
1607
1608 PR fortran/50094
1609 * resolve.c (resolve_symbol): Fix stupid typo.
1610
1611 2011-08-15 Tobias Burnus <burnus@net-b.de>
1612
1613 * resolve.c (resolve_symbol): Fix coarray result-var check.
1614
1615 2011-08-14 Steven G. Kargl <kargl@gcc.gnu.org>
1616
1617 * module.c (use_iso_fortran_env_module): Spell 'referrenced' correctly.
1618
1619 2011-08-14 Janus Weil <janus@gcc.gnu.org>
1620
1621 PR fortran/50073
1622 * decl.c (check_function_name): New function, separated off from
1623 'variable_decl' and slightly extended.
1624 (variable_decl,attr_decl1): Call it.
1625
1626 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1627
1628 * Make-lang.in (gfortran$(exeext)): Add $(EXTRA_GCC_LIBS).
1629
1630 2011-08-07 Janus Weil <janus@gcc.gnu.org>
1631 Thomas Koenig <tkoenig@gcc.gnu.org>
1632
1633 PR fortran/49638
1634 * dependency.c (are_identical_variables): For dummy arguments only
1635 check for equal names, not equal symbols.
1636 * interface.c (gfc_check_typebound_override): Add checking for rank
1637 and character length.
1638
1639 2011-08-07 Janus Weil <janus@gcc.gnu.org>
1640
1641 PR fortran/49638
1642 * dependency.h (gfc_is_same_range,gfc_are_identical_variables): Remove
1643 two prototypes.
1644 * dependency.c (gfc_are_identical_variables,are_identical_variables):
1645 Renamed the former to the latter and made static.
1646 (gfc_dep_compare_expr): Renamed 'gfc_are_identical_variables', handle
1647 commutativity of multiplication.
1648 (gfc_is_same_range,is_same_range): Renamed the former to the latter,
1649 made static and removed argument 'def'.
1650 (check_section_vs_section): Renamed 'gfc_is_same_range'.
1651 * gfortran.h (gfc_check_typebound_override): New prototype.
1652 * interface.c (gfc_check_typebound_override): Moved here from ...
1653 * resolve.c (check_typebound_override): ... here (and renamed).
1654 (resolve_typebound_procedure): Renamed 'check_typebound_override'.
1655
1656 2011-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1657
1658 PR fortran/50004
1659 * target-memory.c (gfc_target_expr-size): Don't clobber typespec
1660 for derived types.
1661 * simplify.c (gfc_simplify_transfer): Don't calculate source_size
1662 twice.
1663
1664 2011-08-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1665
1666 PR fortran/37211
1667 * gfortran.h (gfc_calculate_transfer_sizes): Add prototype.
1668 * target-memory.h (gfc_target_interpret_expr): Add boolean
1669 argument wether to convert wide characters.
1670 * target-memory.c (gfc_target_expr_size): Also return length
1671 of characters for non-constant expressions if these can be
1672 determined from the cl.
1673 (interpret_array): Add argument for gfc_target_interpret_expr.
1674 (gfc_interpret_derived): Likewise.
1675 (gfc_target_interpret_expr): Likewise.
1676 * check.c: Include target-memory.h.
1677 (gfc_calculate_transfer_sizes): New function.
1678 (gfc_check_transfer): When -Wsurprising is in force, calculate
1679 sizes and warn if result is larger than size (check moved from
1680 gfc_simplify_transfer).
1681 * simplify.c (gfc_simplify_transfer): Use
1682 gfc_calculate_transfer_sizes. Remove warning.
1683
1684 2011-08-04 Richard Guenther <rguenther@suse.de>
1685
1686 PR fortran/49957
1687 * trans-array.c (add_to_offset): New function.
1688 (gfc_conv_array_ref): Build the array index expression in optimally
1689 associated order.
1690 (gfc_walk_variable_expr): Adjust for the backward walk.
1691
1692 2011-08-02 Daniel Kraft <d@domob.eu>
1693
1694 PR fortran/49885
1695 * trans-array.c (gfc_trans_auto_array_allocation): Change
1696 gfc_start_block to gfc_init_block to avoid spurious extra-scope.
1697
1698 2011-08-02 Tobias Burnus <burnus@net-b.de>
1699
1700 * trans-array.c (gfc_array_allocate): Pass token to
1701 gfc_allocate_allocatable for -fcoarray=lib.
1702 * trans-stmt.c (gfc_trans_allocate): Update
1703 gfc_allocate_allocatable call.
1704 * trans.h (gfc_allocate_allocatable): Update prototype.
1705 (gfc_allocate_using_lib): Remove.
1706 * trans.c (gfc_allocate_using_lib): Make static, handle token.
1707 (gfc_allocate_allocatable): Ditto.
1708
1709 2011-08-02 Jakub Jelinek <jakub@redhat.com>
1710
1711 PR fortran/46752
1712 * cpp.c (cpp_define_builtins): Change _OPENMP to 201107.
1713 * openmp.c (gfc_free_omp_clauses): Free also final_expr.
1714 (OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define.
1715 (gfc_match_omp_clauses): Handle parsing final and mergeable
1716 clauses.
1717 (OMP_TASK_CLAUSES): Allow final and mergeable clauses.
1718 (gfc_match_omp_taskyield): New function.
1719 (resolve_omp_clauses): Resolve final clause. Allow POINTERs and
1720 Cray pointers in clauses other than REDUCTION.
1721 (gfc_match_omp_atomic): Match optional
1722 read/write/update/capture keywords after !$omp atomic.
1723 (resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms.
1724 * dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD,
1725 print final and mergeable clauses.
1726 (show_code_node): Handle EXEC_OMP_TASKYIELD.
1727 * trans-openmp.c (gfc_trans_omp_clauses): Handle final and
1728 mergeable clauses.
1729 (gfc_trans_omp_taskyield): New function.
1730 (gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD.
1731 (gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms.
1732 (gfc_omp_clause_copy_ctor): Handle non-allocated allocatable.
1733 (gfc_omp_predetermined_sharing): Adjust comment.
1734 * gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and
1735 ST_OMP_END_ATOMIC.
1736 (gfc_omp_clauses): Add final_expr and mergeable fields.
1737 (gfc_exec_op): Add EXEC_OMP_TASKYIELD.
1738 (gfc_omp_atomic_op): New enum typedef.
1739 (struct gfc_code): Add ext.omp_atomic.
1740 * trans.c (trans_code): Handle EXEC_OMP_TASKYIELD.
1741 * frontend-passes.c (gfc_code_walker): Also walk final_expr.
1742 * resolve.c (gfc_resolve_blocks, resolve_code): Handle
1743 EXEC_OMP_TASKYIELD.
1744 * st.c (gfc_free_statement): Likewise.
1745 * match.h (gfc_match_omp_taskyield): New prototype.
1746 * parse.c (decode_omp_directive): Handle taskyield directive.
1747 Handle !$omp end atomic.
1748 (case_executable): Add ST_OMP_TASKYIELD case.
1749 (gfc_ascii_statement): Handle ST_OMP_TASKYIELD.
1750 (parse_omp_atomic): Return gfc_statement instead of void.
1751 For !$omp atomic capture parse two assignments instead of
1752 just one and require !$omp end atomic afterwards, for
1753 other !$omp atomic forms just allow !$omp end atomic at the
1754 end.
1755 (parse_omp_structured_block, parse_executable): Adjust
1756 parse_omp_atomic callers.
1757
1758 2011-08-02 Tobias Burnus <burnus@net-b.de>
1759
1760 * intrinsic.c (OMP_LIB): Updated openmp_version's
1761 value to 201107.
1762 * gfortran.texi (OpenMP): Update ref to OpenMP 3.1.
1763 * intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1;
1764 remove deleted omp_integer_kind and omp_logical_kind constants.
1765
1766 2011-07-31 Janus Weil <janus@gcc.gnu.org>
1767
1768 PR fortran/49112
1769 * resolve.c (resolve_structure_cons): Don't do the full dt resolution,
1770 only call 'resolve_fl_derived0'.
1771 (resolve_typebound_procedures): Resolve typebound procedures of
1772 parent type.
1773 (resolve_fl_derived0): New function, which does a part of the work
1774 for 'resolve_fl_derived'.
1775 (resolve_fl_derived): Call 'resolve_fl_derived0' and do some additional
1776 things.
1777
1778 2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1779
1780 PR fortran/48876
1781 * expr.c (gfc_simplify_expr): If end of a string is less
1782 than zero, set it to zero.
1783
1784 2011-07-28 Jakub Jelinek <jakub@redhat.com>
1785
1786 PR fortran/31067
1787 * frontend-passes.c (optimize_minmaxloc): New function.
1788 (optimize_expr): Call it.
1789
1790 2011-07-27 Tobias Burnus <burnus@net-b.de>
1791
1792 PR fortran/45586
1793 * trans-types.c (gfc_get_derived_type): Ensure that pointer
1794 component types are marked as nonrestricted.
1795
1796 2011-07-27 Daniel Carrera <dcarrera@gmail.com>
1797
1798 PR fortran/49755
1799 * trans.c (gfc_allocate_using_malloc): Change function signature.
1800 Return nothing. New parameter "pointer". Eliminate temorary variables.
1801 (gfc_allocate_using_lib): Ditto.
1802 (gfc_allocate_allocatable): Ditto. Update call to gfc_allocate_using_lib
1803 and gfc_allocate_using_malloc. Do not free and then reallocate a
1804 variable that is already allocated.
1805 (gfc_likely): New function. Basedon gfc_unlikely.
1806 * trans-array.c (gfc_array_init_size): New parameter "descriptor_block".
1807 Instructions to modify the array descriptor are stored in this block
1808 while other instructions continue to be stored in "pblock".
1809 (gfc_array_allocate): Update call to gfc_array_init_size. Move the
1810 descriptor_block so that the array descriptor is only updated if
1811 the array was allocated successfully.
1812 Update calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
1813 * trans.h (gfc_allocate_allocatable): Change function signature.
1814 Function now returns void.
1815 (gfc_allocate_using_lib): Ditto, and new function parameter.
1816 (gfc_allocate_using_malloc): Ditto.
1817 * trans-openmp.c (gfc_omp_clause_default_ctor,
1818 gfc_omp_clause_copy_ctor,gfc_trans_omp_array_reduction): Replace a call
1819 to gfc_allocate_allocatable with gfc_allocate_using_malloc.
1820 * trans-stmt.c (gfc_trans_allocate): Update function calls for
1821 gfc_allocate_allocatable and gfc_allocate_using_malloc.
1822
1823 2011-07-26 Tobias Burnus <burnus@net-b.de>
1824
1825 * trans-array.c (CAF_TOKEN_FIELD): New macro constant.
1826 (gfc_conv_descriptor_token): New function.
1827 * trans-array.h (gfc_conv_descriptor_token): New prototype.
1828 * trans-types.c (gfc_get_array_descriptor_base): For coarrays
1829 with -fcoarray=lib, append "void *token" to the array descriptor.
1830 (gfc_array_descriptor_base_caf): New static variable.
1831 * trans-expr.c (gfc_conv_procedure_call): Handle token and offset
1832 when passing a descriptor coarray to a nondescriptor dummy.
1833
1834 2011-07-23 Tobias Burnus <burnus@net-b.de>
1835
1836 * resolve.c (resolve_symbol): Fix coarray var decl check.
1837
1838 2011-07-21 Daniel Carrera <dcarrera@gmail.com>
1839
1840 * trans.c (gfc_allocate_with_status): Split into two functions
1841 gfc_allocate_using_malloc and gfc_allocate_usig_lib.
1842 (gfc_allocate_using_malloc): The status parameter is now the
1843 actual status rather than a pointer. Code cleanup.
1844 (gfc_allocate_using_lib): Ditto. Add new parametrs errmsg and
1845 errlen. Pass these to the coarray lib.
1846 * trans-openmp.c (gfc_omp_clause_default_ctor): Update calls to
1847 gfc_allocate_allocatable.
1848 (gfc_omp_clause_copy_ctor): Ditto.
1849 (gfc_trans_omp_array_reduction): Ditto.
1850 * trans-stmt.c (gfc_trans_allocate): Ditto. Update call to
1851 gfc_allocate_using_malloc. Pass stat rather than pstat to the allocate
1852 fuctions. If using coarray lib, pass errmsg and errlen to the allocate
1853 functions. Move error checking outside the if (!gfc_array_allocate)
1854 block so that it also affects trees produced by gfc_array_allocate.
1855 * trans-array.c (gfc_array_allocate): Add new parameters errmsg
1856 and errlen. Replace parameter pstat by status. Code cleanup. Update
1857 calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
1858 * trans-array.h (gfc_array_allocate): Update signature of
1859 gfc_array_allocate.
1860
1861 2011-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
1862
1863 * gfortran.texi: Remove a duplicate word.
1864
1865 2011-07-21 Tobias Burnus <burnus@net-b.de>
1866
1867 * check.c (gfc_check_present): Allow coarrays.
1868 * trans-array.c (gfc_conv_array_ref): Avoid casting
1869 when a pointer is wanted.
1870 * trans-decl.c (create_function_arglist): For -fcoarray=lib,
1871 handle hidden token and offset arguments for nondescriptor
1872 coarrays.
1873 * trans-expr.c (get_tree_for_caf_expr): New function.
1874 (gfc_conv_procedure_call): For -fcoarray=lib pass the
1875 token and offset for nondescriptor coarray dummies.
1876 * trans.h (lang_type): Add caf_offset tree.
1877 (GFC_TYPE_ARRAY_CAF_OFFSET): New macro.
1878
1879 2011-07-19 Tobias Burnus <burnus@net-b.de>
1880
1881 * expr.c (gfc_is_coarray): New function.
1882 * gfortran.h (gfc_is_coarray): New prototype.
1883 * interface.c (compare_parameter): Use it.
1884
1885 2011-07-19 Richard Guenther <rguenther@suse.de>
1886
1887 * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus.
1888 (gfc_trans_string_copy): Likewise.
1889 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise.
1890 * trans-types.c (gfc_get_array_descr_info): Likewise.
1891 * trans.c (gfc_build_array_ref): Likewise.
1892
1893 2011-07-19 Janus Weil <janus@gcc.gnu.org>
1894
1895 PR fortran/49708
1896 * resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.
1897
1898 2011-07-18 Tobias Burnus <burnus@net-b.de>
1899
1900 * trans-decl.c (gfc_build_qualified_array): Make coarray's
1901 token TYPE_QUAL_RESTRICT.
1902
1903 2011-07-18 Tobias Burnus <burnus@net-b.de>
1904
1905 * resolve.c (resolve_transfer): Mention defined I/O
1906 in the diagnostic for alloc_comp/pointer_comp.
1907
1908 2011-07-17 Tobias Burnus <burnus@net-b.de>
1909
1910 PR fortran/34657
1911 * module.c (check_for_ambiguous): Check whether the name is matches
1912 the current program unit.
1913
1914 2011-07-17 Tobias Burnus <burnus@net-b.de>
1915
1916 PR fortran/49624
1917 * expr.c (gfc_check_pointer_assign): Fix checking for invalid
1918 pointer bounds.
1919
1920 2011-07-16 Tobias Burnus <burnus@net-b.de>
1921
1922 * expr.c (gfc_ref_this_image): New function.
1923 (gfc_is_coindexed): Use it.
1924 * gfortran.h (gfc_ref_this_image): New prototype.
1925 * resolve.c (resolve_deallocate_expr,
1926 resolve_allocate_expr): Support alloc scalar coarrays.
1927 * trans-array.c (gfc_conv_array_ref, gfc_array_init_size,
1928 gfc_conv_descriptor_cosize, gfc_array_allocate,
1929 gfc_trans_deferred_array): Ditto.
1930 * trans-expr.c (gfc_conv_variable) Ditto.:
1931 * trans-stmt.c (gfc_trans_deallocate): Ditto.
1932 * trans-types.c (gfc_get_element_type, gfc_get_array_type_bounds
1933 gfc_get_array_descr_info): Ditto.
1934 * trans-decl.c (gfc_get_symbol_decl): Ditto.
1935
1936 2011-07-11 Jakub Jelinek <jakub@redhat.com>
1937
1938 PR fortran/49698
1939 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
1940 inner_size to gfc_index_one_node instead of integer_one_node.
1941
1942 2011-07-10 Tobias Burnus <burnus@net-b.de>
1943
1944 PR fortran/49690
1945 * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of SIGNAL.
1946
1947 2011-07-09 Uros Bizjak <ubizjak@gmail.com>
1948
1949 PR fortran/48926
1950 * expr.c (gfc_get_corank): Change return value to int.
1951 * gfortran.h (gfc_get_corank): Update function prototype.
1952
1953 2011-07-07 Mikael Morin <mikael.morin@sfr.fr>
1954
1955 PR fortran/49648
1956 * resolve.c (resolve_symbol): Force resolution of function result's
1957 array specification.
1958
1959 2011-07-07 Tobias Burnus <burnus@net-b.de>
1960
1961 * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register
1962 with NULL arguments for (new) stat=/errmsg= arguments.
1963
1964 2011-07-06 Daniel Carrera <dcarrera@gmail.com>
1965
1966 * trans-array.c (gfc_array_allocate): Rename allocatable_array to
1967 allocatable. Rename function gfc_allocate_array_with_status to
1968 gfc_allocate_allocatable_with_status. Update function call for
1969 gfc_allocate_with_status.
1970 * trans-opemp.c (gfc_omp_clause_default_ctor): Rename function
1971 gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status.
1972 * trans-stmt.c (gfc_trans_allocate): Update function call for
1973 gfc_allocate_with_status. Rename function gfc_allocate_array_with_status
1974 to gfc_allocate_allocatable_with_status.
1975 * trans.c (gfc_call_malloc): Add new parameter gfc_allocate_with_status
1976 so it uses the library for memory allocation when -fcoarray=lib.
1977 (gfc_allocate_allocatable_with_status): Renamed from
1978 gfc_allocate_array_with_status.
1979 (gfc_allocate_allocatable_with_status): Update function call for
1980 gfc_allocate_with_status.
1981 * trans.h (gfc_coarray_type): New enum.
1982 (gfc_allocate_with_status): Update prototype.
1983 (gfc_allocate_allocatable_with_status): Renamed from
1984 gfc_allocate_array_with_status.
1985 * trans-decl.c (generate_coarray_sym_init): Use the new constant
1986 GFC_CAF_COARRAY_ALLOC in the call to gfor_fndecl_caf_register.
1987
1988 2011-07-06 Richard Guenther <rguenther@suse.de>
1989
1990 * f95-lang.c (gfc_init_decl_processing):
1991 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
1992
1993 2011-07-04 Jakub Jelinek <jakub@redhat.com>
1994
1995 PR fortran/49623
1996 * gfortranspec.c (lang_specific_driver): Ignore options with
1997 CL_ERR_MISSING_ARG errors.
1998
1999 2011-07-02 Janus Weil <janus@gcc.gnu.org>
2000
2001 PR fortran/49562
2002 * expr.c (gfc_check_vardef_context): Handle type-bound procedures.
2003
2004 2011-06-30 Jakub Jelinek <jakub@redhat.com>
2005
2006 PR fortran/49540
2007 * gfortran.h (gfc_constructor): Add repeat field.
2008 * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
2009 * array.c (current_expand): Add repeat field.
2010 (expand_constructor): Copy repeat.
2011 * constructor.c (node_free, node_copy, gfc_constructor_get,
2012 gfc_constructor_lookup): Handle repeat field.
2013 (gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
2014 * data.h (gfc_assign_data_value): Add mpz_t * argument.
2015 (gfc_assign_data_value_range): Removed.
2016 * constructor.h (gfc_constructor_advance): Removed.
2017 (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
2018 * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
2019 also handle overwriting a range with a single entry.
2020 (gfc_assign_data_value_range): Removed.
2021 * resolve.c (check_data_variable): Adjust gfc_assign_data_value
2022 call. Use gfc_assign_data_value instead of
2023 gfc_assign_data_value_expr.
2024
2025 2011-06-27 Janus Weil <janus@gcc.gnu.org>
2026
2027 PR fortran/49466
2028 * trans-array.c (structure_alloc_comps): Make sure sub-components
2029 and extended types are correctly deallocated.
2030
2031 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
2032
2033 * trans-openmp.c: Add sync_ or SYNC__ to builtin names.
2034 * trans-stmt.c: Add sync_ or SYNC__ to builtin names.
2035 * trans-decl.c: Add sync_ or SYNC__ to builtin names.
2036
2037 2011-06-21 Janus Weil <janus@gcc.gnu.org>
2038
2039 PR fortran/49112
2040 * class.c (gfc_find_derived_vtab): Make vtab and default initialization
2041 symbols SAVE_IMPLICIT.
2042
2043 2011-06-20 Tobias Burnus <burnus@net-b.de>
2044
2045 PR fortran/18918
2046 * gfortran.h (gfc_check_vardef_context): Update prototype.
2047 (iso_fortran_env_symbol): Handle derived types.
2048 (symbol_attribute): Add lock_comp.
2049 * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check.
2050 * interface.c (compare_parameter, gfc_procedure_use): Handle
2051 LOCK_TYPE.
2052 (compare_actual_formal): Update
2053 gfc_check_vardef_context call.
2054 * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
2055 * intrinsic.c (check_arglist): Ditto.
2056 * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
2057 * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add.
2058 * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE.
2059 * module.c (mio_symbol_attribute): Handle lock_comp.
2060 (create_derived_type): New function.
2061 (use_iso_fortran_env_module): Call it to handle LOCK_TYPE.
2062 * parse.c (parse_derived): Add constraint check for LOCK_TYPE.
2063 * resolve.c (resolve_symbol, resolve_lock_unlock): Add constraint
2064 checks for LOCK_TYPE.
2065 (gfc_resolve_iterator, resolve_deallocate_expr,
2066 resolve_allocate_expr, resolve_code, resolve_transfer): Update
2067 gfc_check_vardef_context call.
2068 * trans-stmt.h (gfc_trans_lock_unlock): New prototype.
2069 * trans-stmt.c (gfc_trans_lock_unlock): New function.
2070 * trans.c (trans_code): Handle LOCK and UNLOCK.
2071
2072 2011-06-18 Janus Weil <janus@gcc.gnu.org>
2073
2074 PR fortran/49400
2075 * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside
2076 BLOCK constructs.
2077
2078 2011-06-17 Janus Weil <janus@gcc.gnu.org>
2079
2080 PR fortran/48699
2081 * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
2082 make sure the vtab is present.
2083
2084 2011-06-16 Janus Weil <janus@gcc.gnu.org>
2085
2086 PR fortran/49074
2087 * interface.c (gfc_extend_assign): Propagate the locus from the
2088 assignment to the type-bound procedure call.
2089
2090 2011-06-16 Janus Weil <janus@gcc.gnu.org>
2091
2092 PR fortran/49417
2093 * module.c (mio_component): Make sure the 'class_ok' attribute is set
2094 for use-associated CLASS components.
2095 * parse.c (parse_derived): Check for 'class_ok' attribute.
2096 * resolve.c (resolve_fl_derived): Ditto.
2097
2098 2011-06-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2099
2100 * frontend-passes.c (remove_trim): New function.
2101 (optimize_assignment): Use it.
2102 (optimize_comparison): Likewise. Return correct status
2103 for previous change.
2104
2105 2011-06-12 Tobias Burnus
2106
2107 PR fortran/49324
2108 * trans-expr.c (gfc_trans_assignment_1): Tell
2109 gfc_trans_scalar_assign to also deep-copy RHS nonvariables
2110 with allocatable components.
2111 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
2112
2113 2011-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2114
2115 * frontend-passes.c (optimize_assignment): Follow chains
2116 of concatenation operators to the end for removing trailing
2117 TRIMS for assignments.
2118
2119 2011-06-10 Daniel Carrera <dcarrera@gmail.com>
2120
2121 * trans-decl.c (gfc_build_builtin_function_decls):
2122 Updated declaration of caf_sync_all and caf_sync_images.
2123 * trans-stmt.c (gfc_trans_sync): Function
2124 can now handle a "stat" variable that has an integer type
2125 different from integer_type_node.
2126
2127 2011-06-09 Richard Guenther <rguenther@suse.de>
2128
2129 * trans.c (gfc_allocate_array_with_status): Mark error path
2130 as unlikely.
2131
2132 2011-06-08 Tobias Burnus <burnus@net-b.de>
2133
2134 PR fortran/18918
2135 * gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK.
2136 (gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK.
2137 (gfc_code): Add expr4.
2138 * match.h (gfc_match_lock, gfc_match_unlock): New prototypes.
2139 * match.c (gfc_match_lock, gfc_match_unlock,
2140 lock_unlock_statement): New functions.
2141 (sync_statement): Bug fix, avoiding double freeing.
2142 (gfc_match_if): Handle LOCK/UNLOCK statement.
2143 * parse.c (decode_statement, next_statement,
2144 gfc_ascii_statement): Ditto.
2145 * st.c (gfc_free_statement): Handle LOCK and UNLOCK.
2146 * resolve.c (resolve_lock_unlock): New function.
2147 (resolve_code): Call it.
2148 * dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK.
2149
2150 2011-06-07 Richard Guenther <rguenther@suse.de>
2151
2152 * f95-lang.c (gfc_init_decl_processing): Do not set
2153 size_type_node or call set_sizetype.
2154
2155 2011-06-05 Tobias Burnus <burnus@net-b.de>
2156
2157 PR fortran/49255
2158 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
2159 for F2008.
2160
2161 2011-06-05 Andreas Schmidt <andreas.schmidt.42@gmx.net>
2162 Thomas Koenig <tkoenig@gcc.gnu.org>
2163
2164 * dump-parse-tree.c (show_symbol): Don't dump namespace
2165 for ENTRY to avoid infinite recursion.
2166
2167 2011-06-02 Asher Langton <langton2@llnl.gov>
2168
2169 PR fortran/49268
2170 * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray
2171 pointees as AS_EXPLICIT.
2172
2173 2011-06-02 Asher Langton <langton2@llnl.gov>
2174
2175 PR fortran/37039
2176 * decl.c (variable_decl): Merge current_as before copying to cp_as.
2177
2178 2011-06-02 Steven G. Kargl <kargl@gcc.gnu.org>
2179
2180 PR fortran/49265
2181 * decl.c (gfc_match_modproc): Allow for a double colon in a module
2182 procedure statement.
2183 * parse.c ( decode_statement): Deal with whitespace around :: in
2184 gfc_match_modproc.
2185
2186 2011-05-31 Tobias Burnus <burnus@net-b.de>
2187
2188 PR fortran/18918
2189 * intrinsic.c (klass): Add CLASS_ATOMIC.
2190 (add_subroutines): Add atomic_ref/atomic_define.
2191 * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document.
2192 * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref,
2193 gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes.
2194 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF
2195 and GFC_ISYM_ATOMIC_REF.
2196 (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars.
2197 * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New
2198 functions.
2199 * check.c (gfc_check_atomic, gfc_check_atomic_def,
2200 gfc_check_atomic_ref): New functions.
2201 * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND,
2202 ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value.
2203 * trans-intrinsic.c (conv_intrinsic_atomic_def,
2204 conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New
2205 functions.
2206 (conv_intrinsic_move_alloc) Renamed from
2207 gfc_conv_intrinsic_move_alloc - and made static.
2208 * trans.h (gfc_conv_intrinsic_move_alloc): Remove.
2209 (gfc_conv_intrinsic_subroutine) Add prototype.
2210 * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine.
2211 * trans-types (gfc_atomic_int_kind, gfc_atomic_logical_kind): New
2212 global vars.
2213 (gfc_init_kinds): Set them.
2214
2215 2011-05-31 Tobias Burnus <burnus@net-b.de>
2216
2217 PR fortran/18918
2218 * trans-array.c (gfc_trans_dummy_array_bias): Handle
2219 cobounds of assumed-shape arrays.
2220
2221 2011-05-31 Tobias Burnus <burnus@net-b.de>
2222
2223 PR fortran/18918
2224 * resolve.c (resolve_fl_variable): Handle static coarrays
2225 with non-constant cobounds.
2226
2227 2011-05-29 Janus Weil <janus@gcc.gnu.org>
2228
2229 PR fortran/47601
2230 * module.c (mio_component_ref): Handle components of extended types.
2231 * symbol.c (gfc_find_component): Return is sym is NULL.
2232
2233 2011-05-29 Tobias Burnus <burnus@net-b.de>
2234
2235 PR fortran/18918
2236 * interface.c (compare_parameter): Add check for passing coarray
2237 to allocatable noncoarray dummy.
2238
2239 2011-05-29 Tobias Burnus <burnus@net-b.de>
2240 Richard Guenther <rguenther@suse.de>
2241
2242 PR fortran/18918
2243 * trans-types.c (gfc_get_nodesc_array_type): Don't mess with
2244 the type's TREE_TYPE.
2245 * trans-array.c (gfc_conv_array_ref): Use TYPE_MAIN_VARIANT.
2246 * trans.c (gfc_build_array_ref): Ditto.
2247
2248 2011-05-27 Tobias Burnus <burnus@net-b.de>
2249
2250 PR fortran/18918
2251 * check.c (gfc_check_associated, gfc_check_null): Add coindexed check.
2252 * match.c (gfc_match_nullify): Ditto.
2253 * resolve.c (resolve_deallocate_expr): Ditto.
2254 * trans-types.c (gfc_get_nodesc_array_type): Don't set restricted
2255 for nonpointers.
2256
2257 2011-05-27 Tobias Burnus <burnus@net-b.de>
2258
2259 PR fortran/48820
2260 * gfortran.h (gfc_isym_id): Add GFC_ISYM_RANK.
2261 * intrinsic.c (add_functions): Add rank intrinsic.
2262 (gfc_check_intrinsic_standard): Handle GFC_STD_F2008_TR.
2263 * intrinsic.h (gfc_simplify_rank, gfc_check_rank): Add prototypes.
2264 * simplify.c (gfc_simplify_rank): New function.
2265 * intrinsic.texi (RANK): Add description for rank intrinsic.
2266 * check.c (gfc_check_rank): New function.
2267
2268 2011-05-26 Paul Thomas <pault@gcc.gnu.org>
2269 Thomas Koenig <tkoenig@gcc.gnu.org>
2270
2271 PR fortran/48955
2272 * trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
2273 changed to GFC_ENABLE_REVERSE.
2274 * trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
2275 to GFC_INHIBIT_REVERSE.
2276 * gfortran.h : Enum gfc_reverse is now GFC_ENABLE_REVERSE,
2277 GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
2278 * dependency.c (gfc_dep_resolver): Change names for elements of
2279 gfc_reverse as necessary. Change the logic so that forward
2280 dependences are remembered as well as backward ones. When both
2281 have appeared, force a temporary.
2282
2283 2011-05-26 Tobias Burnus <burnus@net-b.de>
2284
2285 PR fortran/18918
2286 * trans-array.c (gfc_conv_array_ref): Handle pointer coarrays.
2287 * trans-decl.c (has_coarray_vars, caf_init_block,
2288 gfor_fndecl_caf_register): New file-global variables.
2289 (gfc_finish_var_decl): Make sure that coarrays in main are static.
2290 (gfc_build_qualified_array): Generate coarray token variable.
2291 (gfc_get_symbol_decl): Don't use a static initializer for coarrays.
2292 (gfc_build_builtin_function_decls): Set gfor_fndecl_caf_register.
2293 (gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Skip for
2294 static coarrays.
2295 (generate_local_decl): Check for local coarrays.
2296 (create_main_function): SYNC ALL before calling MAIN.
2297 (generate_coarray_sym_init): Register static coarray.
2298 (generate_coarray_init): Generate CAF registering constructor
2299 function.
2300 (gfc_generate_function_code): Call it, if needed, do not create
2301 cgraph twice.
2302 (gfc_generate_module_vars, gfc_process_block_locals): Call
2303 generate_coarray_init.
2304 * trans-types.c (gfc_get_nodesc_array_type): Generate pointers for
2305 -fcoarray=lib.
2306 * trans.h (gfor_fndecl_caf_register): New variable.
2307 (lang_type): New element caf_token.
2308 (GFC_TYPE_ARRAY_CAF_TOKEN): New macro.
2309
2310 2011-05-24 Joseph Myers <joseph@codesourcery.com>
2311
2312 * Make-lang.in (GFORTRAN_D_OBJS): Remove prefix.o.
2313 (gfortran$(exeext)): Use libcommon-target.a.
2314
2315 2011-05-22 Thomas Koenig <tkoenig@gcc.gnu.org>
2316
2317 * frontend-passes.c (cfe_register_funcs): Also register
2318 character functions if their charlens are known and constant.
2319 Also register allocatable functions.
2320
2321 2011-05-21 Janus Weil <janus@gcc.gnu.org>
2322
2323 PR fortran/48699
2324 * match.c (select_type_set_tmp): Make the temporary ALLOCATABLE if the
2325 selector is ALLOCATABLE.
2326
2327 2011-05-20 Janus Weil <janus@gcc.gnu.org>
2328
2329 PR fortran/48706
2330 * module.c (write_dt_extensions): Do not write extended types which
2331 are local to a subroutine.
2332
2333 2011-05-20 Joseph Myers <joseph@codesourcery.com>
2334
2335 * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o.
2336
2337 2011-05-20 Janne Blomqvist <jb@gcc.gnu.org>
2338
2339 * gfortran.texi (set_fpe): Update documentation.
2340 * invoke.texi (-ffpe-trap): Likewise.
2341 * libgfortran.h (GFC_FPE_PRECISION): Rename to GFC_FPE_INEXACT.
2342 * options.c (gfc_handle_fpe_trap_option): Handle inexact and make
2343 precision an alias for it.
2344
2345 2011-05-19 Tobias Burnus <burnus@net-b.de>
2346
2347 PR fortran/18918
2348 * trans-types.c (gfc_get_element_type): Handle scalar coarrays.
2349 (gfc_get_nodesc_array_type): Make a variant-type copy for scalar
2350 coarrays.
2351 * trans.c (gfc_build_array_ref): Return original type not variant
2352 copy for scalar coarrays.
2353 * trans-array.c (gfc_conv_array_ref): Ditto.
2354
2355 2011-05-18 Janus Weil <janus@gcc.gnu.org>
2356
2357 PR fortran/48700
2358 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): Deallocate 'TO'
2359 argument to avoid memory leaks.
2360
2361 2011-05-16 Tobias Burnus <burnus@net-b.de>
2362
2363 * gfortran.texi (_gfortran_set_options): Add GFC_STD_F2008_TR.
2364 (Fortran 2008 status): Multi-image support for coarrays.
2365 (TR 19113 status): New section.
2366
2367 2011-05-15 Tobias Burnus <burnus@net-b.de>
2368
2369 PR fortran/18918
2370 actual argument is not an array; rank mismatch is diagnosted later.
2371 * trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars): Handle
2372 scalar coarrays.
2373 * trans-types.c (gfc_get_array_type_bounds): Ditto.
2374
2375 2011-05-15 Joern Rennecke <amylaar@spamcop.net>
2376
2377 PR middle-end/46500
2378 * trans-types.c: Include "tm.h".
2379 [0] (c_size_t_size): Remove.
2380
2381 2011-05-15 Janne Blomqvist <jb@gcc.gnu.org>
2382
2383 PR libfortran/48915
2384 * gfortran.texi (_gfortran_set_options): Even though -fbacktrace
2385 is now the default, the library defaults to backtracing disabled.
2386
2387 2011-05-14 Tobias Burnus <burnus@net-b.de>
2388
2389 * lang.opt (fdump-core): Re-add as ignored option
2390 for backward compatibility.
2391
2392 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2393
2394 PR libfortran/48915
2395 * gfortran.texi: Update mixed-language programming section
2396 reflecting the removal of the fdump-core option, and that
2397 -fbacktrace is now enabled by default.
2398
2399 2011-05-14 Thomas Koenig <tkoenig@gcc.gnu.org>
2400
2401 PR fortran/22572
2402 * frontend-passes.c (cfe_register_funcs): Also register functions
2403 for potential elimination if the rank is > 0, the shape is unknown
2404 and reallocate on assignment is active.
2405 (create_var): For rank > 0 functions with unknown shape, create
2406 an allocatable temporary.
2407
2408 2011-05-14 Tobias Burnus <burnus@net-b.de>
2409
2410 PR fortran/18918
2411 * interface.c (compare_parameter): Skip diagnostic if
2412 actual argument is not an array; rank mismatch is diagnosted later.
2413
2414 2011-05-14 Tobias Burnus <burnus@net-b.de>
2415
2416 * options.c (gfc_init_options, gfc_post_options): Enable
2417 -fstack-arrays by default if -Ofast is used.
2418 * invoke.texi (-fstack-arrays): Document this.
2419
2420 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2421
2422 PR libfortran/48915
2423 * gfortran.h (gfc_option_t): Remove flag_dump_core.
2424 * gfortran.texi (GFORTRAN_ERROR_DUMPCORE): Remove section.
2425 (GFORTRAN_ERROR_BACKTRACE): Document that it's enabled by default.
2426 * intrinsic.texi (ABORT): Remove explanation of -fdump-core.
2427 * invoke.texi: Remove -fdump-core, document that -fbacktrace is
2428 enabled by default.
2429 * lang.opt: Remove -fdump-core.
2430 * options.c (gfc_init_options): Make backtrace default to enabled,
2431 remove dump_core.
2432 (gfc_handle_option): Remove OPT_fdump-core.
2433 * trans-decl.c: Pass a 0 to preserve ABI.
2434
2435 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
2436
2437 * gfortran.texi: Remove GFORTRAN_USE_STDERR documentation.
2438
2439 2011-05-13 Tobias Burnus <burnus@net-b.de>
2440
2441 PR fortran/48972
2442 * io.c (resolve_tag_format, resolve_tag): Make sure
2443 that the string is of default kind.
2444 (gfc_resolve_inquire): Also resolve decimal tag.
2445
2446 2011-05-12 Tobias Burnus <burnus@net-b.de>
2447
2448 PR fortran/48972
2449 * resolve.c (resolve_intrinsic): Don't resolve module
2450 intrinsics multiple times.
2451
2452 2011-05-11 Tobias Burnus <burnus@net-b.de>
2453
2454 PR fortran/48889
2455 * expr.c (gfc_is_constant_expr): Use e->value.function.esym
2456 instead of e->symtree->n.sym, if available.
2457
2458 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
2459
2460 * f95-lang.c (global_bindings_p): Return bool and simplify.
2461
2462 2011-05-07 Tobias Burnus <burnus@net-b.de>
2463
2464 PR fortran/18918
2465 PR fortran/48919
2466 * trans.h: Move gfc_init_coarray_decl prototype ...
2467 * gfortran.h: ... to here.
2468 * parse.c (translate_all_program_units): Call gfc_init_coarray_decl.
2469 (gfc_parse_file): Update translate_all_program_units call.
2470 * trans-decl.c (gfc_init_coarray_decl): Fix variable declaration,
2471 new argument whether DECL_EXTERNAL should be used.
2472 (create_main_function): Update gfc_init_coarray_decl call.
2473 * trans-intrinsic.c (trans_this_image, trans_image_index,
2474 conv_intrinsic_cobound): Ditto.
2475
2476 2011-05-06 Tobias Burnus <burnus@net-b.de>
2477
2478 PR fortran/18918
2479 * trans-array.c (gfc_walk_variable_expr): Continue walking
2480 for scalar coarrays.
2481 * trans-intrinsic.c (convert_element_to_coarray_ref): New function.
2482 (trans_this_image, trans_image_index, conv_intrinsic_cobound): Use it.
2483 (trans_this_image): Fix algorithm.
2484 * trans-types.c (gfc_get_element_type, gfc_get_array_descriptor_base,
2485 gfc_sym_type): Handle scalar coarrays.
2486
2487 2011-05-06 Tobias Burnus <burnus@net-b.de>
2488
2489 PR fortran/48858
2490 PR fortran/48820
2491 * lang.opt (std=f2008tr): New.
2492 * libgfortran.h (GFC_STD_F2008_TR): New macro constant.
2493 * decl.c (verify_c_interop_param): Allow OPTIONAL in BIND(C)
2494 procedures for -std=f2008tr/gnu/legacy.
2495 (gfc_match_import): Set sym to NULL.
2496 * options.c (set_default_std_flags,gfc_handle_option): Handle
2497 -std=f2008tr.
2498 * invoke.texi (-std=): Document -std=f2008tr.
2499
2500 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
2501
2502 * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label.
2503 * trans-io.c (add_case): Likewise.
2504 * trans-stmt.c (gfc_trans_integer_select): Likewise.
2505 (gfc_trans_character_select): Likewise.
2506
2507 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
2508
2509 * trans-decl.c (trans_function_start): Do not set
2510 dont_save_pending_sizes_p.
2511
2512 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
2513
2514 * trans.h (gfc_chainon_list): Delete.
2515 * trans.c (gfc_chainon_list): Delete.
2516
2517 2011-05-04 Tobias Burnus <burnus@net-b.de>
2518
2519 PR fortran/48864
2520 * invoke.texi (fno-protect-parens): Document
2521 that -Ofast implies -fno-protect-parens.
2522 * options.c (gfc_init_options, gfc_post_options):
2523 Make -Ofast imply -fno-protect-parens.
2524
2525 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
2526
2527 * trans-decl.c (build_library_function_decl_1): Call
2528 build_function_type_vec. Adjust argument list building accordingly.
2529 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
2530 * trans-types.c (gfc_get_function_type): Likewise.
2531
2532 2011-05-04 Richard Guenther <rguenther@suse.de>
2533
2534 * trans-array.c (gfc_trans_array_constructor_value): Use
2535 size_int for bounds of range types.
2536 (gfc_trans_array_constructor_value): Use size_type_node
2537 for memcpy argument.
2538 * trans-common.c (build_field): Use gfc_charlen_type_node
2539 for lengths.
2540 * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL
2541 as type to build_int_cst.
2542 * trans-const.c (gfc_build_string_const): Use size_int
2543 for bounds of range types.
2544 (gfc_build_wide_string_const): Likewise.
2545 * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node
2546 for lengths.
2547 (gfc_trans_character_select): Likewise.
2548 (gfc_trans_character_select): Do not pass NULL
2549 as type to build_int_cst.
2550 (gfc_trans_character_select): Use size_int for bounds of range types.
2551 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
2552 (add_case): Do not pass NULL as type to build_int_cst.
2553 (transfer_expr): Likewise.
2554 (transfer_array_desc): Likewise.
2555 * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node
2556 for lengths.
2557 (gfc_trans_assign_aux_var): Likewise.
2558 (create_main_function): Use size_int for bounds of range types.
2559 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass
2560 NULL as type to build_int_cst.
2561 (gfc_conv_intrinsic_spacing): Likewise.
2562 (gfc_conv_intrinsic_rrspacing): Likewise.
2563 (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths.
2564
2565 2011-05-04 Richard Guenther <rguenther@suse.de>
2566
2567 * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc
2568 argument to int_const_binop.
2569
2570 2011-05-03 Tobias Burnus <burnus@net-b.de>
2571
2572 PR fortran/18918
2573 * trans-intrinsic.c (trans_this_image): Implement version with
2574 coarray argument.
2575 (conv_intrinsic_cobound): Simplify code.
2576 (gfc_conv_intrinsic_function): Call trans_this_image for
2577 this_image(coarray) except for -fcoarray=single.
2578
2579 2011-05-02 Steven G. Kargl <kargl@gcc.gnu.org>
2580
2581 PR fortran/48720
2582 * gfortran.texi: Document the 'Q' exponent-letter extension.
2583 * invoke.texi: Document -Wreal-q-constant.
2584 * lang.opt: Add -Wreal-q-constant option.
2585 * gfortran.h: Add warn_real_q_constant to option struct.
2586 * primary.c (match_real_constant): Use it. Accept 'Q' as
2587 exponent-letter for REAL(16) real-literal-constant with a
2588 fallback to REAL(10) or error if REAL(10) is not available.
2589 * options.c (gfc_init_options, set_Wall) Set it.
2590 (gfc_handle_option): Handle new option.
2591
2592 2011-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2593
2594 * dump-prase-tree.c (show_code_node): Set the current
2595 namespace to the BLOCK before displaying it; restore
2596 afterwards.
2597
2598 2011-04-30 Tobias Burnus <burnus@net-b.de>
2599
2600 PR fortran/48821
2601 * decl.c (gfc_match_import): Don't try to find the
2602 symbol if already found.
2603
2604 2011-04-30 Paul Thomas <pault@gcc.gnu.org>
2605
2606 PR fortran/48746
2607 * trans-expr.c (fcncall_realloc_result): Set the bounds and the
2608 offset so that the lbounds are one.
2609 (gfc_trans_arrayfunc_assign): Add rank to arguments of above.
2610
2611 2011-04-29 Paul Thomas <pault@gcc.gnu.org>
2612
2613 PR fortran/48462
2614 * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
2615 automatic reallocation when the lhs is a target.
2616
2617 PR fortran/48746
2618 * trans-expr.c (fcncall_realloc_result): Make sure that the
2619 result dtype field is set before the function call.
2620
2621 2011-04-29 Tobias Burnus <burnus@net-b.de>
2622
2623 PR fortran/48810
2624 * resolve.c (resolve_typebound_generic_call): Don't check access
2625 flags of the specific function.
2626
2627 PR fortran/48800
2628 * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
2629 to AS_ASSUMED_SHAPE for function results.
2630 (resolve_fl_var_and_proc): Print also for function results with
2631 AS_DEFERRED an error, if they are not a pointer or allocatable.
2632 (resolve_types): Make sure arguments of procedures in interface
2633 blocks are resolved.
2634
2635 2011-04-29 Michael Matz <matz@suse.de>
2636
2637 * options.c (options.c): Set warn_maybe_uninitialized.
2638
2639 2011-04-28 Tobias Burnus <burnus@net-b.de>
2640
2641 PR fortran/48112
2642 * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
2643 function results only once.
2644 (resolve_symbol): Always resolve function results.
2645
2646 PR fortran/48279
2647 * expr.c (gfc_check_vardef_context): Fix handling of generic
2648 EXPR_FUNCTION.
2649 * interface.c (check_interface0): Reject internal functions
2650 in generic interfaces, unless -std=gnu.
2651
2652 2011-04-27 Tobias Burnus <burnus@net-b.de>
2653
2654 PR fortran/48788
2655 * resolve.c (resolve_global_procedure): Error recovery -
2656 avoid segfault for (non)character-returning functions.
2657
2658 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
2659
2660 * decl.c (gfc_match_end): Check that the block name starts
2661 with "block@".
2662 * parse.c (gfc_build_block_ns): Make block names unique by
2663 numbering them.
2664
2665 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
2666
2667 * frontend-passes.c (inserted_block): New variable.
2668 (changed_statement): Likewise.
2669 (create_var): Encase statement to be operated on in a BLOCK.
2670 Adjust code insertion for BLOCK.
2671 (cfe_code): Set inserted_block and changed_statement to NULL.
2672
2673 2011-04-23 Tobias Burnus <burnus@net-b.de>
2674
2675 PR fortran/18918
2676 * module.c (mio_array_spec): Set as->cotype on reading.
2677 * resolve.c (resolve_allocate_expr): Fix allocating coarray
2678 components.
2679
2680 2011-04-21 Thomas Koenig <tkoenig@gcc.gnu.org>
2681
2682 PR fortran/48405
2683 * frontend_passes (cfe_register_funcs): Remove workaround for DO
2684 loops.
2685 (gfc_code_walker): Make sure the pointer to the current
2686 statement doen't change when other statements are inserted.
2687
2688 2011-04-21 Tobias Burnus <burnus@net-b.de>
2689
2690 PR fortran/18918
2691 * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.
2692
2693 2011-04-20 Jim Meyering <meyering@redhat.com>
2694
2695 * expr.c (free_expr0): Remove useless if-before-free.
2696 * gfortranspec.c (lang_specific_pre_link): Likewise.
2697 * interface.c (gfc_extend_expr): Likewise.
2698 * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
2699
2700 2011-04-19 Tobias Burnus <burnus@net-b.de>
2701
2702 PR fortran/48588
2703 PR fortran/48692
2704
2705 * module.c (fix_mio_expr): Commit created symbol.
2706
2707 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
2708
2709 * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
2710
2711 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
2712
2713 * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
2714 free.
2715
2716 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
2717
2718 * misc.c (gfc_getmem): Remove function.
2719 * gfortran.h: Remove gfc_getmem prototype. Replace gfc_getmem
2720 usage with XCNEW or XCNEWVEC.
2721 * expr.c (gfc_check_assign_symbol): Replace gfc_getmem usage with
2722 XCNEW or XCNEWVEC.
2723 * options.c (gfc_handle_module_path_options)
2724 (gfc_get_option_string): Likewise.
2725 * resolve.c (gfc_resolve_forall): Likewise.
2726 * simplify.c (simplify_transformation_to_array): Likewise.
2727 * target-memory.c (gfc_target_interpret_expr): Likewise.
2728 * trans-common.c (get_segment_info, copy_equiv_list_to_ns)
2729 (get_init_field): Likewise.
2730 * trans-expr.c (gfc_conv_statement_function): Likewise.
2731 * trans-io.c (nml_full_name): Likewise.
2732 * trans-stmt.c (gfc_trans_forall_1): Likewise.
2733 * scanner.c (load_file): Replace gfc_getmem usage with xcalloc.
2734
2735 2011-04-19 Tobias Burnus <burnus@net-b.de>
2736
2737 PR fortran/48588
2738 * parse.c (resolve_all_program_units): Skip modules.
2739 (translate_all_program_units): Handle modules.
2740 (gfc_parse_file): Defer code generation for modules.
2741
2742 2011-04-19 Martin Jambor <mjambor@suse.cz>
2743
2744 * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node
2745 instead of cgraph_get_create_node.
2746
2747 2011-04-18 Jim Meyering <meyering@redhat.com>
2748
2749 remove now-unused definition of gfc_free
2750 * misc.c (gfc_free): Remove function.
2751 * gfortran.h (gfc_free): Remove its prototype.
2752
2753 2011-04-18 Jim Meyering <meyering@redhat.com>
2754
2755 convert each use of gfc_free (p) to free (p)
2756 Do that by running this command:
2757 perl -pi -e 's/\bgfc_free ?\(/free (/' \
2758 $(git grep -El '\bgfc_free ?\(')
2759 which also corrects the few uses that lacked a space between
2760 the function name and the open parenthesis.
2761 Manually undo the change to the function definition itself
2762 and its prototype. They'll be removed next.
2763 * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
2764 * constructor.c (node_free): Likewise.
2765 * cpp.c (dump_queued_macros): Likewise.
2766 * data.c (gfc_assign_data_value): Likewise.
2767 * decl.c (free_variable, free_value, gfc_free_data): Likewise.
2768 (gfc_free_data_all, match_old_style_init): Likewise.
2769 (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
2770 Likewise.
2771 (gfc_match_modproc): Likewise.
2772 * dependency.c (check_section_vs_section): Likewise.
2773 * error.c (gfc_pop_error, gfc_free_error): Likewise.
2774 * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
2775 (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
2776 (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
2777 Likewise.
2778 * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
2779 (strip_function_call, optimize_comparison): Likewise.
2780 * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
2781 (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
2782 Likewise.
2783 * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
2784 (gfc_convert_chartype): Likewise.
2785 * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
2786 Likewise.
2787 (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
2788 * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
2789 (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
2790 Likewise.
2791 (free_case, gfc_free_forall_iterator): Likewise.
2792 * misc.c: Likewise.
2793 * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
2794 (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
2795 (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
2796 (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
2797 (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
2798 (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
2799 * openmp.c (gfc_free_omp_clauses): Likewise.
2800 * options.c (gfc_post_options): Likewise.
2801 * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
2802 * primary.c (gfc_free_structure_ctor_component): Likewise.
2803 * resolve.c (resolve_structure_cons, check_host_association): Likewise.
2804 (gfc_resolve_forall, resolve_equivalence): Likewise.
2805 * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
2806 (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
2807 (load_file, gfc_read_orig_filename): Likewise.
2808 * simplify.c (simplify_transformation_to_array): Likewise.
2809 (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
2810 Likewise.
2811 (gfc_simplify_compiler_options): Likewise.
2812 * st.c (gfc_free_statement, gfc_free_statements): Likewise.
2813 (gfc_free_association_list): Likewise.
2814 * symbol.c (free_components, gfc_free_st_label, free_st_labels):
2815 Likewise.
2816 (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
2817 (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
2818 (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
2819 (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
2820 Likewise.
2821 (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
2822 (gfc_free_namespace): Likewise.
2823 * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
2824 (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
2825 (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
2826 * trans-common.c (get_init_field, create_common): Likewise.
2827 * trans-const.c (gfc_build_wide_string_const): Likewise.
2828 (gfc_conv_string_init): Likewise.
2829 * trans-decl.c (gfc_generate_function_code): Likewise.
2830 * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
2831 Likewise.
2832 (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
2833 (gfc_trans_subarray_assign): Likewise.
2834 * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
2835 * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
2836 (transfer_namelist_element, transfer_array_component): Likewise.
2837 * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
2838 * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
2839 * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
2840 Likewise.
2841
2842 2011-04-15 Jim Meyering <meyering@redhat.com>
2843
2844 gfortran: remove cpp definition of free, ...
2845 in preparation for the s/gfc_free/free/ transformation.
2846 * gfortran.h (free): Remove macro definition that would otherwise
2847 prevent direct use of the function.
2848
2849 2011-04-18 Tobias Burnus <burnus@net-b.de>
2850
2851 PR fortran/18918
2852 * array.c (gfc_match_array_ref): Check for too many codimensions.
2853 * check.c (gfc_check_image_index): Check number of elements
2854 in SUB argument.
2855 * simplify.c (gfc_simplify_image_index): Remove unreachable checks.
2856
2857 2011-04-18 Tobias Burnus <burnus@net-b.de>
2858
2859 PR fortran/18918
2860 * iresolve.c (gfc_resolve_image_index): Set ts.type.
2861 * simplify.c (gfc_simplify_image_index): Don't abort if the bounds
2862 are not known at compile time and handle -fcoarray=lib.
2863 * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle
2864 IMAGE_INDEX.
2865 (conv_intrinsic_cobound): Fix comment typo.
2866 (trans_this_image): New function.
2867 * trans-array.c (gfc_unlikely): Move to trans.c.
2868 * trans.c (gfc_unlikely): Function moved from trans-array.c.
2869 (gfc_trans_runtime_check): Use it.
2870 * trans-io.c (gfc_trans_io_runtime_check): Ditto.
2871 * trans.h (gfc_unlikely): Add prototype.
2872
2873 2011-04-18 Paul Thomas <pault@gcc.gnu.org>
2874
2875 PR fortran/48462
2876 * trans-expr.c (fcncall_realloc_result): Renamed version of
2877 realloc_lhs_bounds_for_intrinsic_call that does not touch the
2878 descriptor bounds anymore but makes a temporary descriptor to
2879 hold the result.
2880 (gfc_trans_arrayfunc_assign): Modify the reference to above
2881 renamed function.
2882
2883 2011-05-17 Tobias Burnus <burnus@net-b.de>
2884
2885 PR fortran/48624
2886 * trans-decl.c (gfc_get_extern_function_decl): Fix decl
2887 for external procedures with proc arguments.
2888
2889 2011-04-15 Michael Matz <matz@suse.de>
2890
2891 * trans-array.c (toplevel): Include gimple.h.
2892 (gfc_trans_allocate_array_storage): Check flag_stack_arrays,
2893 properly expand variable length arrays.
2894 (gfc_trans_auto_array_allocation): If flag_stack_arrays create
2895 variable length decls and associate them with their scope.
2896 * gfortran.h (gfc_option_t): Add flag_stack_arrays member.
2897 * options.c (gfc_init_options): Handle -fstack_arrays option.
2898 * lang.opt (fstack-arrays): Add option.
2899 * invoke.texi (Code Gen Options): Document it.
2900 * Make-lang.in (trans-array.o): Depend on GIMPLE_H.
2901
2902 2011-04-15 Tobias Burnus <burnus@net-b.de>
2903
2904 PR fortran/18918
2905 * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
2906 code which is also causing an ICE.
2907
2908 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
2909
2910 * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
2911
2912 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
2913
2914 * f95-lang.c (union lang_tree_node): Check for TS_COMMON before
2915 calling TREE_CHAIN.
2916
2917 2011-04-12 Paul Thomas <pault@gcc.gnu.org>
2918
2919 PR fortran/48360
2920 PR fortran/48456
2921 * trans-array.c (get_std_lbound): For derived type variables
2922 return array valued component lbound.
2923
2924 2011-04-12 Martin Jambor <mjambor@suse.cz>
2925
2926 * trans-decl.c (gfc_generate_function_code): Call
2927 cgraph_get_create_node instead of cgraph_node.
2928
2929 2011-04-11 Tobias Burnus <burnus@net-b.de>
2930
2931 PR fortran/18918
2932 * simplify.c (simplify_bound_dim): Exit for
2933 ucobound's last dimension unless -fcoarray=single.
2934 * trans-array (gfc_conv_descriptor_size_1): Renamed from
2935 gfc_conv_descriptor_size, made static, has now from_dim and
2936 to_dim arguments.
2937 (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
2938 (gfc_conv_descriptor_cosize): New function.
2939 * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
2940 * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
2941 and handle last codim of ucobound for when -fcoarray is not "single".
2942
2943 2011-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
2944
2945 PR fortran/48448
2946 * gfortran.h (gfc_option_t): Add warn_function_elimination and
2947 flag_frontend_optimize.
2948 * lang.opt (Wfunction-elimination): Add.
2949 (ffrontend-optimize): Add.
2950 * invoke.texi: Add documentation for -Wfunction-elimination
2951 and -ffrontend-optimize. Add -faggressive-function-elimination
2952 to list of code generation options.
2953 * frontend-passes.c (gfc_run_passes): Run optimizations if
2954 flag_frontend_optimize is set.
2955 (warn_function_elimination): New function.
2956 (cfe_expr_0): Call it if requested to do so.
2957 * options.c (gfc_init_options): Initiate warn_function_elimination
2958 and flag_frontend_optimize.
2959 (gfc_post_options): Set flag_frontend_optimize if not specified
2960 by user, depending on the optimization level.
2961 (gfc_handle_option): Handle -Wfunction-elimination and
2962 -ffrontend-optimize.
2963
2964 2011-04-06 Tobias Burnus <burnus@net-b.de>
2965
2966 PR fortran/18918
2967 * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
2968 call for this_image.
2969
2970 2011-04-05 Nathan Froyd <froydnj@codesourcery.com>
2971
2972 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
2973 build_function_type_list instead of build_function_type. Correct
2974 argument order for func_frexp and func_scalbn.
2975
2976 2011-04-05 Duncan Sands <baldrick@free.fr>
2977
2978 * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
2979
2980 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2981
2982 * frontend-passes: (optimize_lexical_comparison): New function.
2983 (optimize_expr): Call it.
2984 (optimize_comparison): Also handle lexical comparison functions.
2985 Return false instad of -2 for unequal comparison.
2986
2987 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2988
2989 PR fortran/48412
2990 * frontend-passes (cfe_expr_0): Reverse the order of going
2991 through the loops.
2992
2993 2011-04-04 Tobias Burnus <burnus@net-b.de>
2994 Mikael Morin <mikael.morin@sfr.fr>
2995
2996 PR fortran/18918
2997 * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
2998 * expr.c (gfc_is_coindexed): Ditto.
2999 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
3000 * interface.c (compare_parameter): Use gfc_expr_attr and
3001 gfc_is_coindexed.
3002 * resolve.c (check_dimension, compare_spec_to_ref,
3003 resolve_allocate_expr, check_data_variable): Update for
3004 DIMEN_THIS_IMAGE.
3005 * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
3006 gfc_simplify_ucobound): Allow non-constant bounds.
3007 * trans-array.c (gfc_set_loop_bounds_from_array_spec,
3008 gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
3009 gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
3010 gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
3011 gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
3012 gfc_conv_ss_startstride, gfc_conv_loop_setup,
3013 gfc_trans_array_bounds, gfc_conv_expr_descriptor,
3014 gfc_walk_variable_expr): Handle codimen.
3015 * trans-decl.c (gfc_build_qualified_array): Save cobounds.
3016 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
3017 (conv_intrinsic_cobound): New function.
3018 (gfc_conv_intrinsic_function): Call it.
3019 (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
3020 ucobound, lcobound, this_image.
3021 * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
3022 (gfc_get_dtype): Honour corank.
3023 (gfc_get_nodesc_array_type): Save corank and codimensions.
3024 (gfc_get_array_type_bounds): Save cobound.
3025 * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
3026 (gfc_array_kind): Add corank item.
3027 (GFC_TYPE_ARRAY_CORANK): New macro.
3028
3029 2011-04-03 Kai Tietz <ktietz@redhat.com>
3030
3031 PR middle-end/48422
3032 * Make-lang.in (f95-lang.o): Add some missing dependencies.
3033
3034 2011-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3035
3036 PR fortran/48352
3037 * frontend-passes (cfe_register_funcs): Don't
3038 register functions if they appear as iterators in DO loops.
3039
3040 2011-03-30 Michael Matz <matz@suse.de>
3041
3042 PR fortran/47516
3043 * trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
3044 don't use local variable.
3045 (gfc_trans_arrayfunc_assign): Adjust caller.
3046
3047 2011-03-29 Janus Weil <janus@gcc.gnu.org>
3048
3049 PR fortran/48095
3050 * decl.c (match_procedure_decl,match_ppc_decl): Set flavor of interface.
3051 * module.c (MOD_VERSION): Bump.
3052 (mio_typespec): Read/write 'interface' field.
3053 * primary.c (match_string_constant,match_logical_constant): Remove
3054 unneeded code.
3055 (match_complex_constant): Make sure to clear the typespec.
3056
3057 2011-03-29 Thomas Koenig <tkoenig@gcc.gnu.org>
3058
3059 * frontend-passes.c (create_var): Warn about creating an
3060 array temporary if requested.
3061
3062 2011-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
3063
3064 PR fortran/47065
3065 * frontend-passes.c (optimize_trim): Also follow references, except
3066 when they are substring references or array references.
3067
3068 2011-03-27 Tobias Burnus <burnus@net-b.de>
3069
3070 PR fortran/18918
3071 * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
3072 GFC_ISYM_NUM_IMAGES.
3073 (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
3074 * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
3075 rename.
3076 * invoke.texi (-fcoarray=): Document "lib" argument.
3077 * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
3078 * libgfortran.h (libgfortran_stat_codes): Add comments.
3079 * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
3080 * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
3081 Handle GFC_FCOARRAY_LIB.
3082 * trans.h (gfc_init_coarray_decl): New prototype.
3083 (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
3084 gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
3085 gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
3086 gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
3087 gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
3088 New global variables.
3089 * trans-decl.c: Declare several CAF functions (cf. above).
3090 (gfc_build_builtin_function_decls): Initialize those.
3091 (gfc_init_coarray_decl): New function.
3092 (create_main_function): Call CAF init/finalize functions.
3093 * trans-intrinsic.c (trans_this_image, trans_num_images): New.
3094 (gfc_conv_intrinsic_function): Call those.
3095 * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
3096 Add code for GFC_FCOARRAY_LIB.
3097
3098 2011-03-26 Janus Weil <janus@gcc.gnu.org>
3099
3100 PR fortran/48291
3101 * class.c (get_unique_hashed_string): Adjust maximum allowable length
3102 for unique type string.
3103
3104 2011-03-25 Kai Tietz <ktietz@redhat.com>
3105
3106 * scanner.c (preprocessor_line): Use filename_cmp
3107 instead of strcmp.
3108
3109 2011-03-25 Tobias Burnus <burnus@net-b.de>
3110
3111 PR fortran/48174
3112 PR fortran/45304
3113 * trans-types.c (gfc_get_function_type): Don't use varargs if the
3114 procedure is known to have no arguments.
3115
3116 2011-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
3117
3118 PR fortran/22572
3119 * gfortran.h (gfc_option_t) : Add
3120 flag_aggressive_function_elimination.
3121 (gfc_dep_compare_functions): Add prototype.
3122 * lang.opt: Add faggressive-function-elimination.
3123 * invoke.texi: Document -faggressive-function-elimination.
3124 * frontend_passes (expr_array): New static variable.
3125 (expr_size): Likewise.
3126 (expr_count): Likewise.
3127 (current_code): Likewise.
3128 (current_ns): Likewise.
3129 (gfc_run_passes): Allocate and free space for expressions.
3130 (cfe_register_funcs): New function.
3131 (create_var): New function.
3132 (cfc_expr_0): New function.
3133 (cfe_code): New function.
3134 (optimize_namespace): Invoke gfc_code_walker with cfe_code
3135 and cfe_expr_0.
3136 * dependency.c (gfc_dep_compare_functions): New function.
3137 (gfc_dep_compare_expr): Use it.
3138 * options.c (gfc_init_options): Handle
3139 flag_aggressive_function_elimination.
3140 (gfc_handle_option): Likewise.
3141
3142 2011-03-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3143
3144 * arith.c (arith_power): Plug memory leak.
3145
3146 2011-03-12 Janus Weil <janus@gcc.gnu.org>
3147
3148 PR fortran/48059
3149 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
3150 for polymorphic arguments.
3151
3152 2011-03-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3153
3154 PR fortran/48054
3155 * intrinsic.texi: Clarify doc of logarithm functions.
3156
3157 2011-03-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3158
3159 PR fortran/47552
3160 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
3161 the string length variable.
3162
3163 2011-03-11 Janus Weil <janus@gcc.gnu.org>
3164
3165 PR fortran/47768
3166 * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
3167 (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
3168
3169 2011-03-06 Paul Thomas <pault@gcc.gnu.org>
3170 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3171
3172 PR fortran/47850
3173 * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
3174 the expression has an iterator. Otherwise, iterate through the
3175 array, checking for constant expressions for each element.
3176
3177 2011-03-04 Janne Blomqvist <jb@gcc.gnu.org>
3178
3179 PR libfortran/47802
3180 * intrinsic.texi: Update CTIME and FDATE documentation.
3181
3182 2011-03-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3183
3184 * invoke.texi (Option Summary, Fortran Dialect Options)
3185 (Preprocessing Options, Runtime Options, Code Gen Options):
3186 Fix vertical list spacing by using @itemx for additinoal
3187 items, empty line before @table. Fix typos.
3188
3189 2011-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3190
3191 PR fortran/47894
3192 * intrinsic.texi: Fix doc of the VERIFY intrinsic.
3193
3194 2011-02-26 Tobias Burnus <burnus@net-b.de>
3195
3196 PR fortran/47846
3197 * trans-stmt.c (gfc_trans_allocate): Fix allocation with
3198 type-spec of deferred-length strings.
3199
3200 2011-02-26 Tobias Burnus <burnus@net-b.de>
3201
3202 PR fortran/47886
3203 * openmp.c (gfc_resolve_omp_directive): Resolve if()
3204 condition of OpenMP's task.
3205
3206 2011-02-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3207
3208 PR fortran/47894
3209 * intrinsic.texi: Fix doc of the VERIFY intrinsic.
3210
3211 2011-02-24 Tobias Burnus <burnus@net-b.de>
3212
3213 PR fortran/47872
3214 * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
3215 multitable for linebreak between different syntax variants.
3216
3217 2011-02-24 Richard Guenther <rguenther@suse.de>
3218
3219 PR fortran/47839
3220 * f95-lang.c (pushdecl): For externs in non-global scope push
3221 a copy of the decl into the BLOCK.
3222
3223 2011-02-23 Mikael Morin <mikael@gcc.gnu.org>
3224
3225 PR fortran/40850
3226 * trans.c (gfc_prepend_expr_to_block): New function.
3227 * trans.h (gfc_prepend_expr_to_block): Declare.
3228 * trans-array.c (gfc_conv_array_parameter): Replace
3229 gfc_add_expr_to_block with gfc_prepend_expr_to_block.
3230
3231 2011-02-22 Paul Thomas <pault@gcc.gnu.org>
3232
3233 PR fortran/45743
3234 * trans-decl.c (gfc_get_extern_function_decl): Don't use the
3235 gsymbol backend_decl if the procedure has a formal argument
3236 that is a procedure.
3237
3238 2011-02-22 Tobias Burnus <burnus@net-b.de>
3239
3240 PR fortran/41359
3241 * trans-stmt.c (gfc_trans_if_1): Use correct line for
3242 expressions in the if condition.
3243
3244 2011-02-20 Tobias Burnus <burnus@net-b.de>
3245
3246 PR fortran/47797
3247 * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
3248 gfc_restore_backend_locus to have better debug locations.
3249 * trans-array.c (gfc_trans_deferred_array): Ditto.
3250
3251 2011-02-20 Paul Thomas <pault@gcc.gnu.org>
3252
3253 PR fortran/45077
3254 PR fortran/44945
3255 * trans-types.c (gfc_get_derived_type): Remove code that looks
3256 for decls in gsym and add call to gfc_get_module_backend_decl.
3257 * trans.h : Add prototype for gfc_get_module_backend_decl.
3258 * trans-decl.c (gfc_get_module_backend_decl): New function.
3259 (gfc_get_symbol_decl): Call it.
3260
3261 2011-02-19 Paul Thomas <pault@gcc.gnu.org>
3262
3263 PR fortran/47348
3264 * trans-array.c (get_array_ctor_all_strlen): Move up in file.
3265 (get_array_ctor_var_strlen): Add block dummy and add call to
3266 get_array_ctor_all_strlen instead of giving up on substrings.
3267 Call gcc_unreachable for default case.
3268 (get_array_ctor_strlen): Add extra argument to in call to
3269 get_array_ctor_var_strlen.
3270
3271 2011-02-18 Janus Weil <janus@gcc.gnu.org>
3272
3273 PR fortran/47789
3274 * primary.c (gfc_match_structure_constructor): Handle empty parent
3275 types.
3276
3277 2011-02-18 Tobias Burnus
3278
3279 PR fortran/47775
3280 * trans-expr.c (arrayfunc_assign_needs_temporary): Use
3281 esym to check whether the specific procedure returns an
3282 allocatable or pointer.
3283
3284 2011-02-18 Michael Matz <matz@suse.de>
3285
3286 PR fortran/45586
3287 * gfortran.h (struct gfc_component): Add norestrict_decl member.
3288 * trans.h (struct lang_type): Add nonrestricted_type member.
3289 * trans-expr.c (gfc_conv_component_ref): Search fields with correct
3290 parent type.
3291 * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
3292 (gfc_sym_type): Use it.
3293
3294 2011-02-18 Janus Weil <janus@gcc.gnu.org>
3295
3296 PR fortran/47768
3297 * resolve.c (resolve_transfer): Reject variables with procedure pointer
3298 components.
3299
3300 2011-02-18 Janus Weil <janus@gcc.gnu.org>
3301
3302 PR fortran/47767
3303 * gfortran.h (gfc_check_access): Removed prototype.
3304 (gfc_check_symbol_access): Added prototype.
3305 * module.c (gfc_check_access): Renamed to 'check_access', made static.
3306 (gfc_check_symbol_access): New function, basically a shortcut for
3307 'check_access'.
3308 (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
3309 'gfc_check_symbol_access'.
3310 (write_operator,write_module): Renamed 'gfc_check_access'.
3311 * resolve.c (resolve_fl_procedure,resolve_fl_derived,
3312 resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
3313 'gfc_check_symbol_access'.
3314
3315 2011-02-16 Janus Weil <janus@gcc.gnu.org>
3316
3317 PR fortran/47745
3318 * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
3319 * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
3320 'gfc_build_class_symbol'.
3321 (gfc_match_decl_type_spec): Reject unlimited polymorphism.
3322 * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
3323 * match.c (select_type_set_tmp): Move setting of 'class_ok' into
3324 'gfc_build_class_symbol'.
3325 * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
3326
3327 2011-02-15 Steven G. Kargl <kargl@gcc.gnu.org>
3328
3329 PR fortran/47633
3330 . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
3331
3332 2011-02-14 Janus Weil <janus@gcc.gnu.org>
3333
3334 PR fortran/47730
3335 * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
3336
3337 2011-02-14 Janus Weil <janus@gcc.gnu.org>
3338
3339 PR fortran/47728
3340 * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
3341 arrays.
3342 * primary.c (gfc_match_varspec): Avoid ICE for invalid class
3343 declaration.
3344
3345 2011-02-14 Janus Weil <janus@gcc.gnu.org>
3346
3347 PR fortran/47349
3348 * interface.c (get_expr_storage_size): Handle derived-type components.
3349
3350 2011-02-13 Tobias Burnus <burnus@net-b.de>
3351
3352 PR fortran/47569
3353 * interface.c (compare_parameter): Avoid ICE with
3354 character components.
3355
3356 2011-02-12 Janus Weil <janus@gcc.gnu.org>
3357
3358 * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
3359 * decl.c (build_sym,build_struct,attr_decl1): Use return value of
3360 'gfc_build_class_symbol'.
3361
3362 2011-02-12 Michael Matz <matz@suse.de>
3363 Janus Weil <janus@gcc.gnu.org>
3364 Tobias Burnus <burnus@net-b.de>
3365
3366 PR fortran/45586
3367 * trans-expr.c (conv_parent_component_references): Avoid unintendent
3368 skipping of parent compounds.
3369
3370 2011-02-11 Tobias Burnus <burnus@net-b.de>
3371
3372 PR fortran/47550
3373 * resolve.c (resolve_formal_arglist): PURE with VALUE
3374 and no INTENT: Add -std= diagnostics.
3375
3376 2011-02-09 Janus Weil <janus@gcc.gnu.org>
3377
3378 PR fortran/47352
3379 * resolve.c (resolve_procedure_interface): If interface has a result
3380 variable, copy the typespec and set result pointer to self.
3381
3382 2011-02-09 Janus Weil <janus@gcc.gnu.org>
3383
3384 PR fortran/47463
3385 * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
3386
3387 2011-02-09 Janus Weil <janus@gcc.gnu.org>
3388
3389 PR fortran/47637
3390 * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
3391
3392 2011-02-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3393
3394 * io.c (match_io_element): Do not set dt if not inquire.
3395
3396 2011-02-08 Janus Weil <janus@gcc.gnu.org>
3397
3398 PR fortran/45290
3399 * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
3400 initialization target.
3401
3402 2011-02-07 Janne Blomqvist <jb@gcc.gnu.org>
3403 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3404
3405 * gfortran.texi (Thread-safety): texinfo styling fixes.
3406 * intrinsic.texi: Likewise.
3407
3408 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
3409
3410 * gfortran.texi (Compiler Characteristics): Add reference to
3411 thread-safety section.
3412
3413 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
3414
3415 * gfortran.texi (Thread-safety): New section.
3416 * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
3417 (GETENV): Likewise.
3418 (GET_ENVIRONMENT_VARIABLE): Likewise.
3419 (SYSTEM): Likewise.
3420
3421 2011-02-06 Paul Thomas <pault@gcc.gnu.org>
3422
3423 PR fortran/47592
3424 * trans-stmt.c (gfc_trans_allocate): For deferred character
3425 length allocations with SOURCE, store to the values and string
3426 length to avoid calculating twice. Replace gfc_start_block
3427 with gfc_init_block to avoid unnecessary contexts and to keep
3428 declarations of temporaries where they should be. Tidy up the
3429 code a bit.
3430
3431 2011-02-05 Janne Blomqvist <jb@gcc.gnu.org>
3432
3433 PR fortran/42434
3434 * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
3435
3436 2011-02-02 Janus Weil <janus@gcc.gnu.org>
3437 Paul Thomas <pault@gcc.gnu.org>
3438
3439 PR fortran/47082
3440 * trans-expr.c (gfc_trans_class_init_assign): Add call to
3441 gfc_get_derived_type.
3442 * module.c (read_cleanup): Do not use unique_symtrees for vtabs
3443 or vtypes.
3444
3445 2011-02-02 Janus Weil <janus@gcc.gnu.org>
3446
3447 PR fortran/47572
3448 * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
3449
3450 2011-02-01 Janus Weil <janus@gcc.gnu.org>
3451
3452 PR fortran/47565
3453 * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
3454 pointer components with allocatable result.
3455
3456 2011-01-31 Janus Weil <janus@gcc.gnu.org>
3457
3458 PR fortran/47455
3459 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
3460 with pointer or allocatable result.
3461
3462 2011-01-31 Paul Thomas <pault@gcc.gnu.org>
3463
3464 PR fortran/47519
3465 * trans-stmt.c (gfc_trans_allocate): Improve handling of
3466 deferred character lengths with SOURCE.
3467 * iresolve.c (gfc_resolve_repeat): Calculate character
3468 length from source length and ncopies.
3469 * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
3470 expressions for ALLOCATE.
3471
3472 2011-01-31 Janus Weil <janus@gcc.gnu.org>
3473
3474 PR fortran/47463
3475 * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
3476 an argument of a typebound assignment being a component.
3477
3478 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3479
3480 * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
3481 LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
3482
3483 2011-01-31 Tobias Burnus <burnus@net-b.de>
3484
3485 PR fortran/47042
3486 * resolve.c (resolve_fl_procedure): Reject stmt functions
3487 with pointer/allocatable attribute.
3488
3489 2011-01-31 Tobias Burnus <burnus@net-b.de>
3490
3491 PR fortran/47042
3492 * interface.c (gfc_procedure_use): Add explicit interface check for
3493 pointer/allocatable functions.
3494
3495 2011-01-30 Paul Thomas <pault@gcc.gnu.org>
3496
3497 PR fortran/47523
3498 * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
3499 expr and is assigned to a deferred character length scalar,
3500 make sure that the function is called before reallocation,
3501 so that the length is available. Include procedure pointer
3502 and procedure pointer component rhs as well.
3503
3504 PR fortran/45170
3505 PR fortran/35810
3506 PR fortran/47350
3507 * gfortran.dg/allocatable_function_5.f90: New test not added by
3508 mistake on 2011-01-28.
3509
3510 2011-01-29 Tobias Burnus <burnus@net-b.de>
3511
3512 PR fortran/47531
3513 * check.c (gfc_check_shape): Support kind argument in SHAPE.
3514 * intrinsic.c (add_functions): Ditto.
3515 * resolve.c (gfc_resolve_shape): Ditto.
3516 * simplify.c (gfc_simplify_shape): Ditto.
3517 * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
3518 gfc_simplify_shape): Update prototypes.
3519 * intrinisc.text (SHAPE): Document kind argument.
3520
3521 2011-01-28 Tobias Burnus <burnus@net-b.de>
3522
3523 PR fortran/47507
3524 * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
3525 attribute also without INTENT.
3526
3527 2011-01-28 Tobias Burnus <burnus@net-b.de>
3528
3529 * gfortran.texi (Fortran 2003 status): Mention support for
3530 nonconstant namelist variables.
3531
3532 2011-01-28 Paul Thomas <pault@gcc.gnu.org>
3533 Tobias Burnus <burnus@gcc.gnu.org>
3534
3535 PR fortran/45170
3536 PR fortran/35810
3537 PR fortran/47350
3538 * interface.c (compare_actual_formal): An allocatable or pointer
3539 deferred length actual is only allowed if the formal argument
3540 is also deferred length. Clean up whitespace.
3541 * trans-expr.c (gfc_conv_procedure_call): Pass string length for
3542 deferred character length formal arguments by reference. Do the
3543 same for function results.
3544 (gfc_trans_pointer_assignment): Do not do runtime check of lhs
3545 and rhs character lengths, if deferred length lhs. In this case
3546 set the lhs character length to that of the rhs.
3547 (gfc_conv_string_parameter): Remove assert that string length is
3548 an integer type.
3549 (is_scalar_reallocatable_lhs): New function.
3550 (alloc_scalar_allocatable_for_assignment): New function.
3551 (gfc_trans_assignment_1): Call above new function. If the rhs is
3552 a deferred character length itself, makes ure that the function
3553 is called before reallocation, so that the length is available.
3554 (gfc_trans_asssignment): Remove error about assignment to
3555 deferred length character variables.
3556 * gfortran.texi : Update entry about (re)allocation on
3557 assignment.
3558 * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
3559 length character variables.
3560 * module.c (mio_typespec): Transfer deferred characteristic.
3561 * trans-types.c (gfc_get_function_type): New code to generate
3562 hidden typelist, so that those character lengths that are
3563 passed by reference get the right type.
3564 * resolve.c (resolve_contained_fntype): Supress error for
3565 deferred character length functions.
3566 (resolve_function, resolve_fl_procedure) The same.
3567 (check_symbols): Remove the error that support for
3568 entity with deferred type parameter is not yet implemented.
3569 (resolve_fl_derived): The same.
3570 match.c (alloc_opt_list): Allow MOLD for deferred length object.
3571 * trans-decl.c (gfc_get_symbol_decl): For deferred character
3572 length dummies, generate a local variable for string length.
3573 (create_function_arglist): Hidden length can be a pointer.
3574 (gfc_trans_deferred_vars): For deferred character length
3575 results and dummies, assign the string length to the local
3576 variable from the hidden argument on entry and the other way
3577 round on exit, as appropriate.
3578
3579 2011-01-27 Tobias Burnus <burnus@net-b.de>
3580
3581 PR fortran/47474
3582 * trans-decl.c (gfc_generate_function_code): Fix init
3583 of allocatable result variable with allocatable components.
3584
3585 2011-01-27 Tobias Burnus <burnus@net-b.de>
3586
3587 PR fortran/47472
3588 * options.c (gfc_handle_module_path_options): Save
3589 module path without trailing slash as include path.
3590
3591 2011-01-25 Tobias Burnus <burnus@net-b.de>
3592
3593 PR fortran/47448
3594 * interface.c (gfc_check_operator_interface): Fix
3595 defined-assignment check.
3596
3597 2011-01-23 Tobias Burnus <burnus@net-b.de>
3598
3599 PR fortran/47421
3600 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
3601 scalar allocatable dummy arguments.
3602
3603 2011-01-22 Thomas Koenig <tkoenig@gcc.gnu.org>
3604
3605 PR fortran/38536
3606 * resolve.c (gfc_iso_c_func_interface): For C_LOC,
3607 check for array sections followed by component references
3608 which are illegal. Also check for coindexed arguments.
3609
3610 2011-01-22 Tobias Burnus <burnus@net-b.de>
3611
3612 PR fortran/47399
3613 * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
3614 PARAMETER TBP.
3615
3616 2011-01-21 Tobias Burnus <burnus@net-b.de>
3617
3618 PR fortran/47394
3619 * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
3620 Use defined instead of magic number exit status codes.
3621 * scanner.c (include_line, gfc_new_file): Ditto.
3622
3623 2011-01-21 Tobias Burnus <burnus@net-b.de>
3624
3625 PR fortran/47377
3626 * expr.c (gfc_check_pointer_assign): Reject expr data-targets
3627 without pointer attribute.
3628
3629 2011-01-18 Janus Weil <janus@gcc.gnu.org>
3630
3631 PR fortran/47240
3632 * resolve.c (expression_rank): Fix rank of procedure poiner components.
3633 * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
3634 pointer components as actual arguments.
3635
3636 2011-01-17 Jakub Jelinek <jakub@redhat.com>
3637
3638 PR fortran/47331
3639 * gfortran.h (struct gfc_omp_saved_state): New type.
3640 (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
3641 * resolve.c (resolve_global_procedure): Call it around gfc_resolve
3642 call.
3643 * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
3644 functions.
3645
3646 2011-01-17 Tobias Burnus <burnus@net-b.de>
3647
3648 PR fortran/47327
3649 * invoke.texi (Options to request or suppress errors
3650 and warnings): Fix cross link.
3651
3652 2011-01-15 Tobias Burnus <burnus@net-b.de>
3653
3654 * gfortran.texi: Update Fortran 2003 Status section.
3655
3656 PR fortran/47177
3657 * invoke.texi: Add missing "-E" to the -dM example.
3658
3659 2011-01-13 Tobias Burnus <burnus@net-b.de>
3660
3661 PR fortran/47268
3662 * intrinsic.texi (get_command_argument, get_environment_variable):
3663 Mark arguments as optional in the Arguments section.
3664
3665 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
3666 Tobias Burnus <burnus@net-b.de>
3667
3668 PR fortran/47260
3669 * trans-decl.c (gfc_get_extern_function_decl,
3670 build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
3671 calling decl_attributes.
3672
3673 2011-01-13 Tobias Burnus <burnus@net-b.de>
3674 Mikael Morin <mikael@gcc.gnu.org>
3675
3676 PR fortran/45848
3677 PR fortran/47204
3678 * gfortran.h (gfc_code): Move union ext's case_list into
3679 the struct block.
3680 * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
3681 by "block.".
3682 * frontend-passes.c (gfc_code_walker): Ditto.
3683 * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
3684 gfc_match_type_is, gfc_match_class_is): Ditto.
3685 * resolve.c (resolve_select, resolve_select_type): Ditto.
3686 * st.c (gfc_free_statement): Ditto.
3687 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
3688 gfc_trans_character_select): Ditto.
3689 * parse.c (resolve_all_program_units): For error recovery, avoid
3690 segfault is proc_name is NULL.
3691
3692 2011-01-11 Paul Thomas <pault@gcc.gnu.org>
3693
3694 PR fortran/47051
3695 * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
3696 to be standard compliant by testing for shape rather than size
3697 before skipping reallocation. Improve comments.
3698
3699 2011-01-09 Janus Weil <janus@gcc.gnu.org>
3700
3701 PR fortran/47224
3702 * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
3703 of code.
3704
3705 2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
3706
3707 PR fortran/38536
3708 * resolve.c (is_scalar_expr_ptr): For a substring reference,
3709 use gfc_dep_compare_expr to compare start and end expession.
3710 Add FIXME for using gfc_deb_compare_expr elsewhere.
3711
3712 2011-01-09 Janus Weil <janus@gcc.gnu.org>
3713
3714 PR fortran/46313
3715 * class.c (get_unique_type_string): Make type name start with upper
3716 case letter.
3717
3718 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
3719
3720 PR fortran/46405
3721 * invoke.texi: Mention -ffree-line-length-none and
3722 -ffixed-line-length-none for preprocessing.
3723
3724 2011-01-08 Paul Thomas <pault@gcc.gnu.org>
3725
3726 PR fortran/46896
3727 * trans-expr.c (gfc_conv_procedure_call): With a non-copying
3728 procedure argument (eg TRANSPOSE) use a temporary if there is
3729 any chance of aliasing due to host or use association.
3730 (arrayfunc_assign_needs_temporary): Correct logic for function
3731 results and do not use a temporary for implicitly PURE
3732 variables. Use a temporary for Cray pointees.
3733 * symbol.c (gfc_add_save): Explicit SAVE not compatible with
3734 implicit pureness of containing procedure.
3735 * decl.c (match_old_style_init, gfc_match_data): Where decl
3736 would fail in PURE procedure, set implicit_pure to zero.
3737 * gfortran.h : Add implicit_pure to structure symbol_attr and
3738 add prototype for function gfc_implicit_pure.
3739 * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
3740 Where decl would fail in PURE procedure, reset implicit_pure.
3741 * io.c (match_vtag, gfc_match_open, gfc_match_close,
3742 gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
3743 * match.c (gfc_match_critical, gfc_match_stopcode,
3744 sync_statement, gfc_match_allocate, gfc_match_deallocate): The
3745 same.
3746 * parse.c (decode_omp_directive): The same.
3747 (parse_contained): If not PURE, set implicit pure attribute.
3748 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
3749 resolve_function, resolve_ordinary_assign) : The same.
3750 (gfc_implicit_pure): New function.
3751 * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
3752 to ab_attribute enum and use it in this function.
3753
3754 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
3755
3756 PR fortran/45777
3757 * symbol.c (gfc_symbols_could_alias): Strip gfc_ prefix,
3758 make static and move in front of its only caller, to ...
3759 * trans-array.c (symbols_could_alias): ... here.
3760 Pass information about pointer and target status as
3761 arguments. Allocatable arrays don't alias anything
3762 unless they have the POINTER attribute.
3763 (gfc_could_be_alias): Keep track of pointer and target
3764 status when following references. Also check if typespecs
3765 of components match those of other components or symbols.
3766
3767 2011-01-07 Tobias Burnus <burnus@net-b.de>
3768
3769 PR fortran/41580
3770 * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
3771 * intrinsic.c (add_functions): Use simplify functions for
3772 EXTENDS_TYPE_OF and SAME_TYPE_AS.
3773 * intrinsic.h (gfc_simplify_extends_type_of,
3774 gfc_simplify_same_type_as): New prototypes.
3775 * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
3776 gfc_simplify_same_type_as): New functions.
3777
3778 2011-01-07 Janus Weil <janus@gcc.gnu.org>
3779
3780 PR fortran/47189
3781 PR fortran/47194
3782 * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
3783 * class.c (gfc_class_null_initializer): Initialize _vptr to declared
3784 type.
3785 * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
3786 * resolve.c (resolve_deallocate_expr): _data component will be added
3787 at translation stage.
3788 * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
3789 * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
3790
3791 2011-01-06 Daniel Franke <franke.daniel@gmail.com>
3792
3793 PR fortran/33117
3794 PR fortran/46478
3795 * parse.c (parse_interface): Remove check for procedure types.
3796 * interface.c (check_interface0): Verify that procedures are
3797 either all SUBROUTINEs or all FUNCTIONs.
3798
3799 2011-01-05 Janus Weil <janus@gcc.gnu.org>
3800
3801 PR fortran/47180
3802 * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
3803 'vtab' is initialized).
3804
3805 2011-01-05 Janus Weil <janus@gcc.gnu.org>
3806
3807 PR fortran/47180
3808 * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
3809 assignment, set the _vptr component to the declared type.
3810
3811 2011-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
3812
3813 PR fortran/46017
3814 * resolve.c (resolve_allocate_deallocate): Follow references to
3815 check for duplicate occurence of allocation/deallocation objects.
3816
3817 2011-01-05 Janus Weil <janus@gcc.gnu.org>
3818
3819 PR fortran/47024
3820 * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
3821 of polymorphic allocatables according to their declared type.
3822
3823 2011-01-04 Janus Weil <janus@gcc.gnu.org>
3824
3825 PR fortran/46448
3826 * class.c (gfc_find_derived_vtab): Set the module field for the copying
3827 routine to make sure it receives module name mangling.
3828
3829 2011-01-03 Jakub Jelinek <jakub@redhat.com>
3830
3831 * gfortranspec.c (lang_specific_driver): Update copyright notice
3832 dates.
3833
3834 2011-01-03 Janus Weil <janus@gcc.gnu.org>
3835
3836 * intrinsic.texi (LEADZ): Fix example.
3837
3838 2011-01-02 Janus Weil <janus@gcc.gnu.org>
3839
3840 PR fortran/46408
3841 * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
3842 routine.
3843
3844 \f
3845 Copyright (C) 2011 Free Software Foundation, Inc.
3846
3847 Copying and distribution of this file, with or without modification,
3848 are permitted in any medium without royalty provided the copyright
3849 notice and this notice are preserved.