]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/ChangeLog
gcc/ChangeLog:
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
CommitLineData
596981c8 12010-06-28 Steven Bosscher <steven@gcc.gnu.org>
2
3 * Make-lang.in: Update dependencies.
4
cbb21b9f 52010-06-27 Nathan Froyd <froydnj@codesourcery.com>
6
7 * gfortran.h (gfc_code): Split backend_decl field into cycle_label
8 and exit_label fields.
9 * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
10 individually.
11 * trans-stmt.c (gfc_trans_simple_do): Likewise.
12 (gfc_trans_do): Likewise.
13 (gfc_trans_do_while): Likewise.
14 (gfc_trans_cycle): Use cycle_label directly.
15 (gfc_trans_exit): Use exit_label directly.
16
e606c235 172010-06-27 Daniel Kraft <d@domob.eu>
18
19 * dump-parse-tree.c (show_symbol): Dump target-expression for
20 associate names.
21 (show_code_node): Make distinction between BLOCK and ASSOCIATE.
22 (show_namespace): Use show_level for correct indentation of
23 "inner namespaces" (contained procedures or BLOCK).
24
7a2d6403 252010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org>
26
27 PR fortran/44678
28 * dump-parse-tree.c (show_code_node): Show namespace for
29 EXEC_BLOCK.
30
f446fb22 312010-06-26 Tobias Burnus <burnus@net-b.de>
32
33 * decl.c (gfc_match_decl_type_spec): Support
34 TYPE(intrinsic-type-spec).
35
1011a9ca 362010-06-25 Tobias Burnus <burnus@net-b.de>
37
38 * intrinsic.h (gfc_check_selected_real_kind,
39 gfc_simplify_selected_real_kind): Update prototypes.
40 * intrinsic.c (add_functions): Add radix support to
41 selected_real_kind.
42 * check.c (gfc_check_selected_real_kind): Ditto.
43 * simplify.c (gfc_simplify_selected_real_kind): Ditto.
44 * trans-decl.c (gfc_build_intrinsic_function_decls):
45 Change call from selected_real_kind to selected_real_kind2008.
46 * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
47 (PRECISION, RANGE, RADIX): Add cross @refs.
48
a3b81b0f 492010-06-25 Tobias Burnus <burnus@net-b.de>
50
51 * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
52 * gfortran.texi (_gfortran_set_options): Update for
53 GFC_STD_F2008_OBS addition.
54 * libgfortran.h: Add GFC_STD_F2008_OBS.
55 * options.c (set_default_std_flags, gfc_handle_option): Handle
56 GFC_STD_F2008_OBS.
57 io.c (check_format): Fix allow_std check.
58
4b20e9cf 592010-06-25 Tobias Burnus <burnus@net-b.de>
60
61 * decl.c (gfc_match_entry): Allow END besides
62 END SUBROUTINE/END FUNCTION for contained procedures.
63
1b37751e 642010-06-25 Tobias Burnus <burnus@net-b.de>
65
66 * parse.c (next_free, next_fixed): Allow ";" as first character.
67
71c22dfb 682010-06-24 Tobias Burnus <burnus@net-b.de>
69
70 PR fortran/44614
71 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
72
c420ccbb 732010-06-22 Janus Weil <janus@gcc.gnu.org>
74
75 PR fortran/44616
76 * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
77 containers.
78
b3c3927c 792010-06-21 Tobias Burnus <burnus@net-b.de>
80
81 PR fortran/40632
82 * interface.c (compare_parameter): Add gfc_is_simply_contiguous
83 checks.
84 * symbol.c (gfc_add_contiguous): New function.
85 (gfc_copy_attr, check_conflict): Handle contiguous attribute.
86 * decl.c (match_attr_spec): Ditto.
87 (gfc_match_contiguous): New function.
88 * resolve.c (resolve_fl_derived, resolve_symbol): Handle
89 contiguous.
90 * gfortran.h (symbol_attribute): Add contiguous.
91 (gfc_is_simply_contiguous): Add prototype.
92 (gfc_add_contiguous): Add prototype.
93 * match.h (gfc_match_contiguous): Add prototype.
94 * parse.c (decode_specification_statement,
95 decode_statement): Handle contiguous attribute.
96 * expr.c (gfc_is_simply_contiguous): New function.
97 * dump-parse-tree.c (show_attr): Handle contiguous.
98 * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
99 Ditto.
100 * trans-expr.c (gfc_add_interface_mapping): Copy
101 attr.contiguous.
102 * trans-array.c (gfc_conv_descriptor_stride_get,
103 gfc_conv_array_parameter): Handle contiguous arrays.
104 * trans-types.c (gfc_build_array_type, gfc_build_array_type,
105 gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
106 Ditto.
107 * trans.h (gfc_array_kind): Ditto.
108 * trans-decl.c (gfc_get_symbol_decl): Ditto.
109
615ef0bb 1102010-06-20 Joseph Myers <joseph@codesourcery.com>
111
112 * options.c (gfc_handle_option): Don't handle N_OPTS.
113
d839f2a0 1142010-06-19 Janus Weil <janus@gcc.gnu.org>
115
116 PR fortran/44584
117 * resolve.c (resolve_fl_derived): Reverse ordering of conditions
118 to avoid ICE.
119
7e6fae0b 1202010-06-18 Tobias Burnus <burnus@net-b.de>
121
122 PR fortran/44556
123 * resolve.c (resolve_allocate_deallocate): Properly check
124 part-refs in stat=/errmsg= for invalid use.
125
d17bd57e 1262010-06-17 Janus Weil <janus@gcc.gnu.org>
127
128 PR fortran/44558
129 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
130 Return directly in case of an error.
131
4a12b9ba 1322010-06-16 Janus Weil <janus@gcc.gnu.org>
133
134 PR fortran/44549
135 * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
136 * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
137 structure to each procedure in a procedure list.
138 * module.c (mio_typebound_proc): Add NULL argument to
139 'gfc_get_typebound_proc'.
140 * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
141 to initialize the new structure.
142
de622904 1432010-06-15 Janus Weil <janus@gcc.gnu.org>
144
145 PR fortran/43388
146 * gfortran.h (gfc_expr): Add new member 'mold'.
147 * match.c (gfc_match_allocate): Implement the MOLD tag.
148 * resolve.c (resolve_allocate_expr): Ditto.
149 * trans-stmt.c (gfc_trans_allocate): Ditto.
150
4ad75159 1512010-06-15 Jakub Jelinek <jakub@redhat.com>
152
153 PR fortran/44536
154 * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
155 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
156 GFC_DECL_SAVED_DESCRIPTOR set.
157 (gfc_omp_report_decl): New function.
158 * trans.h (gfc_omp_report_decl): New prototype.
159 * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
160
d826a69b 1612010-06-13 Daniel Franke <franke.daniel@gmail.com>
162
163 PR fortran/31588
164 PR fortran/43954
165 * gfortranspec.c (lang_specific_driver): Removed deprecation
166 warning for -M.
167 * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
168 * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
169 * cpp.h (gfc_cpp_makedep): New.
170 (gfc_cpp_add_dep): New.
171 (gfc_cpp_add_target): New.
172 * cpp.c (gfc_cpp_option): Add deps* members.
173 (gfc_cpp_makedep): New.
174 (gfc_cpp_add_dep): New.
175 (gfc_cpp_add_target): New.
176 (gfc_cpp_init_options): Initialize new options.
177 (gfc_cpp_handle_option): Handle new options.
178 (gfc_cpp_post_options): Map new options to libcpp-options.
179 (gfc_cpp_init): Handle deferred -MQ and -MT options.
180 (gfc_cpp_done): If requested, write dependencies to file.
181 * module.c (gfc_dump_module): Add a module filename as target.
182 * scanner.c (open_included_file): New parameter system; add the
183 included file as dependency.
184 (gfc_open_included_file): Add the included file as dependency.
185 (gfc_open_intrinsic_module): Likewise.
186 * invoke.texi: Removed deprecation warning for -M.
187 * gfortran.texi: Removed Makefile-dependencies project.
188
ab0a1ed6 1892010-06-12 Daniel Franke <franke.daniel@gmail.com>
190
191 * resolve.c (resolve_global_procedure): Improved checking if an
192 explicit interface is required.
193
185bc3c7 1942010-06-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
195
196 * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
197 return type.
198 * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
199 (gfc_conv_intrinsic_ttynam): Likewise.
200 (gfc_conv_intrinsic_trim): Likewise.
201
7a3aaef8 2022010-06-12 Janus Weil <janus@gcc.gnu.org>
203
204 PR fortran/40117
205 * decl.c (match_procedure_in_type): Allow procedure lists (F08).
206
7f9b4a7a 2072010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
208
209 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
210
a80ae91c 2112010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
212
213 * mathbuiltins.def: Add builtins that do not directly correspond
214 to a Fortran intrinsic, with new macro OTHER_BUILTIN.
215 * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
216 * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
217 code_{r,c}{4,8,10,16} fields. Add
218 {,complex}{float,double,long_double}_built_in fields.
219 (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
220 DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
221 definition of OTHER_BUILTIN.
222 (real_compnt_info): Remove unused struct.
223 (builtin_decl_for_precision, builtin_decl_for_float_kind): New
224 functions.
225 (build_round_expr): Call builtin_decl_for_precision instead of
226 series of if-else.
227 (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
228 instead of a switch.
229 (gfc_build_intrinsic_lib_fndecls): Match
230 {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
231 (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
232 kinds.
233 (gfc_conv_intrinsic_lib_function): Go through all the extended
234 gfc_intrinsic_map.
235 (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
236 instead of a switch.
237 (gfc_conv_intrinsic_abs): Likewise.
238 (gfc_conv_intrinsic_mod): Likewise.
239 (gfc_conv_intrinsic_sign): Likewise.
240 (gfc_conv_intrinsic_fraction): Likewise.
241 (gfc_conv_intrinsic_nearest): Likewise.
242 (gfc_conv_intrinsic_spacing): Likewise.
243 (gfc_conv_intrinsic_rrspacing): Likewise.
244 (gfc_conv_intrinsic_scale): Likewise.
245 (gfc_conv_intrinsic_set_exponent): Likewise.
246
750b874c 2472010-06-11 Paul Thomas <pault@gcc.gnu.org>
248
249 PR fortran/42051
250 PR fortran/43896
251 * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
252 functions with CLASS formal arguments.
253
ad0fe61d 2542010-06-10 Janus Weil <janus@gcc.gnu.org>
255
256 PR fortran/44207
257 * resolve.c (conformable_arrays): Handle allocatable components.
258
c7b9531f 2592010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
260
261 PR fortran/38273
262 * gfortran.texi: Document that Cray pointers cannot be function
263 results.
264
2652010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
266
267 PR fortran/36234
268 * gfortran.texi: Document lack of support for syntax
269 "complex FUNCTION name*16()", and existence of alternative
270 legacy syntax "complex*16 FUNCTION name()".
271
21e0620a 2722010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
273
274 PR fortran/43032
275 * intrinsic.texi (FLUSH): Note the difference between FLUSH and
276 POSIX's fsync(), and how to call the latter from Fortran code.
277
d1c662df 2782010-06-10 Daniel Franke <franke.daniel@gmail.com>
279
280 PR fortran/44457
281 * interface.c (compare_actual_formal): Reject actual arguments with
282 array subscript passed to ASYNCHRONOUS dummys.
283
d18a512a 2842010-06-10 Daniel Kraft <d@domob.eu>
285
286 PR fortran/38936
287 * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
288 (struct gfc_symbol): New field `assoc'.
289 (struct gfc_association_list): New struct.
290 (struct gfc_code): New struct `block' in union, move `ns' there
291 and add association list.
292 (gfc_free_association_list): New method.
293 (gfc_has_vector_subscript): Made public;
294 * match.h (gfc_match_associate): New method.
295 * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
296 * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
297 * interface.c (gfc_has_vector_subscript): Made public.
298 (compare_actual_formal): Rename `has_vector_subscript' accordingly.
299 * match.c (gfc_match_associate): New method.
300 (gfc_match_select_type): Change reference to gfc_code's `ns' field.
301 * primary.c (match_variable): Don't allow names associated to expr here.
302 * parse.c (decode_statement): Try matching ASSOCIATE statement.
303 (case_exec_markers, case_end): Add ASSOCIATE statement.
304 (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
305 (parse_associate): New method.
306 (parse_executable): Handle ST_ASSOCIATE.
307 (parse_block_construct): Change reference to gfc_code's `ns' field.
308 * resolve.c (resolve_select_type): Ditto.
309 (resolve_code): Ditto.
310 (resolve_block_construct): Ditto and add comment.
311 (resolve_select_type): Set association list in generated BLOCK to NULL.
312 (resolve_symbol): Resolve associate names.
313 * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
314 and free association list.
315 (gfc_free_association_list): New method.
316 * symbol.c (gfc_new_symbol): NULL new field `assoc'.
317 * trans-stmt.c (gfc_trans_block_construct): Change reference to
318 gfc_code's `ns' field.
319
7c9ed47a 3202010-06-10 Kai Tietz <kai.tietz@onevision.com>
321
322 * error.c (error_print): Pre-initialize loc by NULL.
323 * openmp.c (resolve_omp_clauses): Add explicit
324 braces to avoid ambigous else.
325 * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
326
2d0c81dc 3272010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
328
329 * gfc-internals.texi: Move to GFDL 1.3.
330 * gfortran.texi: Ditto.
331 * intrinsic.texi: Ditto.
332 * invoke.texi: Ditto.
333
0d290c9d 3342010-06-09 Daniel Franke <franke.daniel@gmail.com>
335
336 PR fortran/44347
337 * check.c (gfc_check_selected_real_kind): Verify that the
338 actual arguments are scalar.
339
a1a2dd69 3402010-06-09 Daniel Franke <franke.daniel@gmail.com>
341
342 PR fortran/44359
343 * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
344
335c0cea 3452010-06-09 Janus Weil <janus@gcc.gnu.org>
346
347 PR fortran/44430
348 * dump-parse-tree.c (show_symbol): Avoid infinite loop.
349
c8f6f57c 3502010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
351
352 * fortran/symbol.c (check_conflict): Remove an invalid conflict check.
353
f1d241cc 3542010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
355
356 * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
357 gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
358 * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
359 gfc_check_ibclr, and gfc_check_ibset. Add prototype for
360 gfc_check_bitfcn.
361 * fortran/check.c (nonnegative_check, less_than_bitsize1,
362 less_than_bitsize2): New functions.
363 (gfc_check_btest): Renamed to gfc_check_bitfcn. Use
364 nonnegative_check and less_than_bitsize1.
365 (gfc_check_ibclr, gfc_check_ibset): Removed.
366 (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
367 less_than_bitsize1.
368
ae44f506 3692010-06-09 Janus Weil <janus@gcc.gnu.org>
370
371 PR fortran/44211
372 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
373 Resolve references.
374
40af37bd 3752010-06-09 Kai Tietz <kai.tietz@onevision.com>
376
377 * resolve.c (resolve_deallocate_expr): Avoid warning
378 about possible use of iunitialized sym.
379 (resolve_allocate_expr): Pre-initialize sym by NULL.
380
9e0a5037 3812010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
382
383 PR fortran/43040
384 * f95-lang.c (gfc_init_builtin_functions): Remove comment.
385
ba72912a 3862010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
387
388 * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
389 allocation.
390 (gfc_get_array_type_bounds): Likewise.
391
392 * trans-decl.c (gfc_allocate_lang_decl): Likewise.
393 (gfc_find_module): Likewise.
394
395 * f95-lang.c (pushlevel): Likewise.
396
397 * trans.h (struct lang_type): Add variable_size GTY option.
398 (struct lang_decl): Likewise.
399
4e1f7cdd 4002010-06-08 Tobias Burnus <burnus@net-b.de>
401
402 PR fortran/44446
403 * symbol.c (check_conflict): Move protected--external/procedure check ...
404 * resolve.c (resolve_select_type): ... to the resolution stage.
405
1684aeab 4062010-06-07 Tobias Burnus <burnus@net-b.de>
407
408 * options.c (gfc_handle_option): Fix -fno-recursive.
409
60d6fff4 4102010-06-07 Tobias Burnus <burnus@net-b.de>
411
412 * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
413 * gfortran.texi (copyrights-gfortran): Ditto.
414
4aafe913 4152010-06-07 Joseph Myers <joseph@codesourcery.com>
416
417 * lang.opt (fshort-enums): Define using Var and VarExists.
418 * options.c (gfc_handle_option): Don't set flag_short_enums here.
419
89132055 4202010-06-05 Paul Thomas <pault@gcc.gnu.org>
421 Janus Weil <janus@gcc.gnu.org>
422
423 PR fortran/43945
424 * resolve.c (get_declared_from_expr): Move to before
425 resolve_typebound_generic_call. Make new_ref and class_ref
426 ignorable if set to NULL.
427 (resolve_typebound_generic_call): Once we have resolved the
428 generic call, check that the specific instance is that which
429 is bound to the declared type.
430 (resolve_typebound_function,resolve_typebound_subroutine): Avoid
431 freeing 'class_ref->next' twice.
432
76e5b0d8 4332010-06-05 Paul Thomas <pault@gcc.gnu.org>
434
435 PR fortran/43895
436 * trans-array.c (structure_alloc_comps): Dereference scalar
437 'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
438 TREE_TYPE (decl).
439
a8c464ac 4402010-06-04 Joseph Myers <joseph@codesourcery.com>
441
442 * gfortranspec.c (append_arg, lang_specific_driver): Use
443 GCC-specific formats in diagnostics.
444
765cd02a 4452010-06-02 Tobias Burnus <burnus@net-b.de>
446
447 PR fortran/44360
448 * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
449 symbols.
450
f3a9b510 4512010-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
452
453 PR fortran/44371
454 * match.c (gfc_match_stopcode): Move gfc_match_eos call inside
455 condition block.
456
ae72f813 4572010-05-31 Steven G. Kargl <kargl@gcc.gnu.org>
458
459 * fortran/gfortran.texi: Fix typos in description of variable-format-
460 expressions.
461
55f066ca 4622010-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
463
464 PR fortran/36928
465 * dependency.c (gfc_check_section_vs_section): Check
466 for interleaving array assignments without conflicts.
467
50b4b37b 4682010-05-30 Janus Weil <janus@gcc.gnu.org>
469
470 * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
471 $data component of a class container.
472 * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
473 * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
474 gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
475 * gcc/fortran/interface.c (matching_typebound_op): Ditto.
476 * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
477 * gcc/fortran/parse.c (parse_derived): Ditto.
478 * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
479 gfc_expr_attr): Ditto.
480 * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
481 resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
482 resolve_fl_var_and_proc, resolve_typebound_procedure,
483 resolve_fl_derived): Ditto.
484 * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
485 * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
486 CLASS_DATA.
487 * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
488 gfc_trans_deferred_vars): Ditto.
489 * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
490
a5fe80bd 4912010-05-28 Tobias Burnus <burnus@net-b.de>
492
493 * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
494
a922df2e 4952010-05-28 Joseph Myers <joseph@codesourcery.com>
496
497 * gfortranspec.c (append_arg, lang_specific_driver): Use
498 fatal_error instead of fatal. Use warning instead of fprintf for
499 warnings.
500
8fb69344 5012010-05-28 Joseph Myers <joseph@codesourcery.com>
502
503 * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
504 * module.c (write_char, gfc_dump_module, gfc_use_module): Use
505 xstrerror instead of strerror.
506
3c6a9715 5072010-05-26 Joseph Myers <joseph@codesourcery.com>
508
509 * cpp.c (cb_cpp_error): Save and restore
510 global_dc->warn_system_headers, not variable warn_system_headers.
511
c7580612 5122010-05-26 Steven Bosscher <steven@gcc.gnu.org>
513
514 * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
515
cb4070e0 5162010-05-26 Steven Bosscher <steven@gcc.gnu.org>
517
518 * trans-common.c: Do not include rtl.h, include output.h instead.
519 * trans-decl.c: Likewise.
520
7e33d332 5212010-05-26 Paul Thomas <pault@gcc.gnu.org>
522
523 PR fortran/40011
524 * resolve.c (resolve_global_procedure): Resolve the gsymbol's
525 namespace before trying to reorder the gsymbols.
526
d5156c99 5272010-05-25 Daniel Franke <franke.daniel@gmail.com>
528
529 PR fortran/30668
530 PR fortran/31346
531 PR fortran/34260
532 * resolve.c (resolve_global_procedure): Add check for global
533 procedures with implicit interfaces and assumed-shape or optional
534 dummy arguments. Verify that function return type, kind and string
535 lengths match.
536
dca58d21 5372010-05-21 Tobias Burnus <burnus@net-b.de>
538
539 * gfortran.h: Do not include system.h.
540 * bbt.c: Include system.h.
541 * data.c: Ditto.
542 * dependency.c: Ditto.
543 * dump-parse-tree.c: Ditto.
544 * arith.h: Do not include gfortran.h.
545 * constructor.h: Do not include gfortran.h and splay-tree.h.
546 * match.h: Do not include gfortran.h.
547 * parse.h: Ditto.
548 * target-memory.h: Ditto.
549 * openmp.c: Do not include toplev.h and target.h.
550 * trans-stmt.c: Ditto not include toplev.h.
551 * primary.c: Ditto.
552 * trans-common.c: Tell why toplev.h is needed. And
553 do not include target.h.
554 * trans-expr.c: Tell why toplev.h is needed.
555 * trans-array.c: Ditto.
556 * trans-openmp.c: Ditto.
557 * trans-const.c: Ditto.
558 * trans.c: Ditto.
559 * trans-types.c: Ditto.
560 * trans-io.c: Ditto.
561 * trans-decl.c: Ditto.
562 * scanner.c: Ditto.
563 * convert.c: Ditto.
564 * trans-intrinsic.c: Ditto.
565 * options.c: Ditto.
566
51de2e31 5672010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
568
569 PR fortran/43851
570 * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
571 before returning MATCH_ERROR. Add check for scalar. Add check for
572 default integer kind.
573
ebdf1a90 5742010-05-22 Janus Weil <janus@gcc.gnu.org>
575
576 PR fortran/44212
577 * match.c (gfc_match_select_type): On error jump back out of the local
578 namespace.
579 * parse.c (parse_derived): Defer creation of vtab symbols to resolution
580 stage, more precisely to ...
581 * resolve.c (resolve_fl_derived): ... this place.
582
a96bd516 5832010-05-22 Janus Weil <janus@gcc.gnu.org>
584
585 PR fortran/44213
586 * resolve.c (ensure_not_abstract): Allow abstract types with
587 non-abstract ancestors.
588
dae0b5cb 5892010-05-21 Steven Bosscher <steven@gcc.gnu.org>
590
591 * trans-const.c: Include realmpfr.h.
592 * Make-lang.in: Update dependencies.
593
a7a46268 5942010-05-21 Steven Bosscher <steven@gcc.gnu.org>
595
596 * trans-const.c, trans-types.c, trans-intrinsic.c:
597 Clean up redundant includes.
598
4acad347 5992010-05-20 Daniel Franke <franke.daniel@gmail.com>
600
601 PR fortran/38407
602 * lang.opt (Wunused-dummy-argument): New option.
603 * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
604 * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
605 (set_Wall): Enable warn_unused_dummy_argument.
606 (gfc_handle_option): Set warn_unused_dummy_argument according to
607 command line.
608 * trans-decl.c (generate_local_decl): Separate warnings about
609 unused variables and unused dummy arguments.
610 * invoke.texi: Documented new option.
611
989adef3 6122010-05-20 Steven Bosscher <steven@gcc.gnu.org>
613
614 * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
615 (gfc_conv_string_tmp): Do not assert type comparibilty.
616 * trans-array.c: Do not include gimple.h, ggc.h, and real.h.
617 (gfc_conv_expr_descriptor): Remove assert.
618 * trans-common.c: Clarify why rtl.h and tm.h are included.
619 * trans-openmp.c: Do not include ggc.h and real.h.
620 Explain why gimple.h is included.
621 * trans-const.c: Do not include ggc.h.
622 * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
623 * trans.c: Do not include ggc.h and real.h.
624 Explain why gimple.h is included.
625 * trans-types.c: Do not include tm.h. Explain why langhooks.h
626 and dwarf2out.h are included.
627 * trans-io.c: Do not include gimple.h and real.h.
628 * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
629 * trans-intrinsic.c: Do not include gimple.h. Explain why tm.h
630 is included.
631
fb063c92 6322010-05-20 Tobias Burnus <burnus@net-b.de>
633
634 * options.c (gfc_init_options,gfc_post_options): Enable
635 flag_associative_math by default.
636
070cc790 6372010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
638
639 PR fortran/43851
640 * trans-stmt.c (gfc_trans_stop): Add generation of call to
641 gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
642 blank STOP, handling a null expression. (gfc_trans_pause): Use
643 pause_string for blank PAUSE.
644 * trans.h: Add external function declaration for error_stop_numeric.
645 * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
646 the declaration for the library call. Adjust whitespaces.
647 * match.c (gfc_match_stopcode): Remove use of the actual stop code to
648 signal no stop code. Match the expression following the stop and pass
649 that to the translators. Remove the old use of digit matching. Add
650 checks that the stop_code expression is INTEGER or CHARACTER, constant,
651 and if CHARACTER, default character KIND.
652
721f64bf 6532010-05-19 Daniel Franke <franke.daniel@gmail.com>
654
655 PR fortran/44055
656 * lang.opt (Wconversion-extra): New option.
657 * gfortran.h (gfc_option_t): Add warn_conversion_extra.
658 * options.c (gfc_init_options): Disable -Wconversion-extra by default.
659 (set_Wall): Enable -Wconversion.
660 (gfc_handle_option): Set warn_conversion_extra.
661 * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
662 introduced for -Wconversion if -Wconversion-extra is present.
663 * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
664 -Wconversion; document -Wconversion-extra.
665
08262510 6662010-05-19 Daniel Franke <franke.daniel@gmail.com>
667
668 PR fortran/42360
669 * gfortran.h (gfc_has_default_initializer): New.
670 * expr.c (gfc_has_default_initializer): New.
671 * resolve.c (has_default_initializer): Removed, use
672 gfc_has_default_initializer() instead. Updated all callers.
673 * trans-array.c (has_default_initializer): Removed, use
674 gfc_has_default_initializer() instead. Updated all callers.
675 * trans-decl.c (generate_local_decl): Do not check the
676 first component only to check for initializers, but use
677 gfc_has_default_initializer() instead.
678
4a67dea4 6792010-05-19 Daniel Franke <franke.daniel@gmail.com>
680
681 PR fortran/38404
682 * primary.c (match_string_constant): Move start_locus just inside
683 the string.
684 * data.c (create_character_intializer): Clarified truncation warning.
685
b53b53b4 6862010-05-19 Daniel Franke <franke.daniel@gmail.com>
687
688 PR fortran/34505
689 * intrinsic.h (gfc_check_float): New prototype.
690 (gfc_check_sngl): New prototype.
691 * check.c (gfc_check_float): New.
692 (gfc_check_sngl): New.
693 * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
694 to be a specific for REAL. Added check routines for FLOAT, DFLOAT
695 and SNGL.
696 * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
697 added them to the list of specifics of REAL instead.
698
7c75339c 6992010-05-17 Janus Weil <janus@gcc.gnu.org>
700
701 PR fortran/43990
702 * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
703 This is now handled via 'gfc_class_null_initializer'.
704
b823b0c6 7052010-05-17 Janus Weil <janus@gcc.gnu.org>
706
707 * class.c (gfc_add_component_ref,gfc_class_null_initializer,
708 gfc_build_class_symbol,add_proc_component,add_proc_comps,
709 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
710 add_procs_to_declared_vtab,add_generic_specifics,
711 add_generics_to_declared_vtab,gfc_find_derived_vtab,
712 find_typebound_proc_uop,gfc_find_typebound_proc,
713 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
714 gfc_get_tbp_symtree): Moved here from other places.
715 * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
716 class.c.
717 * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
718 gfc_find_typebound_proc,gfc_find_typebound_user_op,
719 gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
720 gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
721 * Make-lang.in: Add class.o.
722 * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
723 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
724 add_procs_to_declared_vtab,add_generic_specifics,
725 add_generics_to_declared_vtab,gfc_find_derived_vtab,
726 find_typebound_proc_uop,gfc_find_typebound_proc,
727 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
728 gfc_get_tbp_symtree): Move to class.c.
729
47aacdf9 7302010-05-17 Nathan Froyd <froydnj@codesourcery.com>
e1036019 731
732 * trans-types.c (gfc_init_types): Use build_function_type_list.
733 (gfc_get_ppc_type): Likewise.
734 * trans-decl.c (gfc_generate_constructors): Likewise.
735 * f95-lang.c (build_builtin_fntypes): Likewise.
736 (gfc_init_builtin_functions): Likewise.
737 (DEF_FUNCTION_TYPE_0): Likewise.
738 (DEF_FUNCTION_TYPE_1): Likewise.
739 (DEF_FUNCTION_TYPE_2): Likewise.
740 (DEF_FUNCTION_TYPE_3): Likewise.
741 (DEF_FUNCTION_TYPE_4): Likewise.
742 (DEF_FUNCTION_TYPE_5): Likewise.
743 (DEF_FUNCTION_TYPE_6): Likewise.
744 (DEF_FUNCTION_TYPE_7): Likewise. Use ARG7.
745 (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
746
a46ea0bc 7472010-05-17 Nathan Froyd <froydnj@codesourcery.com>
06f13dc1 748
749 * trans-array.c (gfc_trans_array_constructor_value): Use
750 build_constructor instead of build_constructor_from_list.
751 (gfc_build_constant_array_constructor): Likewise.
752 * trans-decl.c (create_main_function): Likewise.
753 * trans-stmt.c (gfc_trans_character_select): Likewise.
754
1e4299bb 7552010-05-17 Janus Weil <janus@gcc.gnu.org>
756
757 PR fortran/44044
758 * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
759 (resolve_fl_variable_derived): ... this place.
760 (resolve_symbol): Make sure function symbols (and their result
761 variables) are not resolved twice.
762
95773d67 7632010-05-16 Daniel Franke <franke.daniel@gmail.com>
764
fb063c92 765 PR fortran/35779
95773d67 766 * array.c (match_array_list): Revert change from 2010-05-13.
767
8f1e8e0e 7682010-05-16 Richard Guenther <rguenther@suse.de>
769
770 * trans-decl.c (module_htab_decls_hash): Revert last change.
771
4bdd2942 7722010-05-16 Richard Guenther <rguenther@suse.de>
773
774 * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
775
6bda7b34 7762010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
777
778 * options.c (set_Wall): Remove special logic for Wuninitialized
779 without -O.
780
fabc1fc9 7812010-05-15 Janus Weil <janus@gcc.gnu.org>
782
783 PR fortran/44154
784 PR fortran/42647
785 * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
786 if branches.
787
bcc41e51 7882010-05-15 Janus Weil <janus@gcc.gnu.org>
789
790 PR fortran/43207
791 PR fortran/43969
792 * gfortran.h (gfc_class_null_initializer): New prototype.
793 * expr.c (gfc_class_null_initializer): New function to build a NULL
794 initializer for CLASS pointers.
795 * symbol.c (gfc_build_class_symbol): Modify internal naming of class
796 containers. Remove default NULL initialization of $data component.
797 * trans.c (gfc_allocate_array_with_status): Fix wording of an error
798 message.
799 * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
800 Use new function 'gfc_class_null_initializer'.
801 * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
802 class variables.
803
3e2de00f 8042010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
805
806 PR fortran/44135
807 * fortran/interface.c (get_sym_storage_size): Use signed instead of
808 unsigned mpz_get_?i routines.
809
1e71b314 8102010-05-14 Jakub Jelinek <jakub@redhat.com>
811
812 * trans.c (trans_code): Set backend locus early.
813 * trans-decl.c (gfc_get_fake_result_decl): Use source location
814 of the function instead of current input_location.
815
148aaa7f 8162010-05-13 Daniel Franke <franke.daniel@gmail.com>
817
fb063c92 818 PR fortran/35779
819 * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
820 Updated all usages.
821 * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
822 * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
823 iterators.
148aaa7f 824
bb348f68 8252010-05-13 Jakub Jelinek <jakub@redhat.com>
826
827 PR fortran/44036
828 * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
829 variable lists.
830 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
831 by reference dummy procedures or non-dummy procedure pointers.
832 (gfc_omp_predetermined_sharing): Return
833 OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
834
44dde2f3 8352010-05-11 Daniel Franke <franke.daniel@gmail.com>
836
fb063c92 837 PR fortran/43711
838 * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
839 after OMP statement.
840 (gfc_match_omp_critical): Likewise.
841 (gfc_match_omp_flush): Likewise.
842 (gfc_match_omp_workshare): Likewise.
843 (gfc_match_omp_master): Likewise.
844 (gfc_match_omp_ordered): Likewise.
845 (gfc_match_omp_atomic): Likewise.
846 (gfc_match_omp_barrier): Likewise.
847 (gfc_match_omp_end_nowait): Likewise.
44dde2f3 848
c58db196 8492010-05-11 Daniel Franke <franke.daniel@gmail.com>
850
851 PR fortran/31820
852 * resolve.c (validate_case_label_expr): Removed FIXME.
853 (resolve_select): Raise default warning on case labels out of range
854 of the case expression.
855
d7dbc787 8562010-05-10 Daniel Franke <franke.daniel@gmail.com>
857
858 PR fortran/27866
859 PR fortran/35003
860 PR fortran/42809
c58db196 861 * intrinsic.c (gfc_convert_type_warn): Be more discriminative
d7dbc787 862 about conversion warnings.
863
f0ea8570 8642010-05-10 Janus Weil <janus@gcc.gnu.org>
865
866 PR fortran/44044
867 * match.c (gfc_match_select_type): Move error message to
868 resolve_select_type.
869 * resolve.c (resolve_select_type): Error message moved here from
870 gfc_match_select_type. Correctly set type of temporary.
871
8ce86007 8722010-05-10 Richard Guenther <rguenther@suse.de>
873
874 * trans-decl.c (gfc_build_library_function_decl): Split out
875 worker to ...
876 (build_library_function_decl_1): ... this new function.
877 Set a fnspec attribute if a specification was provided.
878 (gfc_build_library_function_decl_with_spec): New function.
879 (gfc_build_intrinsic_function_decls): Annotate internal_pack
880 and internal_unpack.
881
99bb7509 8822010-05-07 Daniel Franke <franke.daniel@gmail.com>
883
884 PR fortran/40728
885 * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
fb063c92 886 as external.
99bb7509 887
99178f8c 8882010-05-07 Jason Merrill <jason@redhat.com>
889
890 * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
891 to avoid -Wc++-compat warning.
892
1f3db819 8932010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
894
895 PR 40989
896 * options.c (gfc_handle_option): Add argument kind.
897 * gfortran.h (gfc_handle_option): Update declaration.
898
8992010-05-06 Tobias Burnus <burnus@net-b.de>
f039ec37 900
901 PR fortran/43985
902 * trans-types.c (gfc_sym_type): Mark Cray pointees as
903 GFC_POINTER_TYPE_P.
904
8ae2b304 9052010-05-05 Daniel Franke <franke.daniel@gmail.com>
906
99bb7509 907 PR fortran/32331
f039ec37 908 * resolve.c (traverse_data_list): Rephrase error message for
909 non-constant bounds in data-implied-do.
8ae2b304 910
53ee5847 9112010-05-05 Daniel Franke <franke.daniel@gmail.com>
912
913 PR fortran/24978
914 * gfortran.h: Removed repeat count from constructor, removed
915 all usages.
916 * data.h (gfc_assign_data_value_range): Changed return value from
917 void to gfc_try.
918 * data.c (gfc_assign_data_value): Add location to constructor element.
919 (gfc_assign_data_value_range): Call gfc_assign_data_value()
920 for each element in range. Return early if an error was generated.
921 * resolve.c (check_data_variable): Stop early if range assignment
922 generated an error.
923
35820014 9242010-05-05 Janus Weil <janus@gcc.gnu.org>
925
926 PR fortran/43696
927 * resolve.c (resolve_fl_derived): Some fixes for class variables.
928 * symbol.c (gfc_build_class_symbol): Add separate class container for
929 class pointers.
930
501acd87 9312010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
932
933 PR fortran/43592
934 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
935
746a1b37 9362010-05-02 Tobias Burnus <burnus@net-b.de>
937
938 PR fortran/18918
939 * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
940 for lcobound, ucobound, image_index and this_image.
941 * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
942 gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
943 * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
944 gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
945 functions.
946 (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
947
9482010-04-30 Tobias Burnus <burnus@net-b.de>
2efec227 949
950 PR fortran/18918
951 PR fortran/43931
952 * trans-types.c (gfc_get_array_descriptor_base): Fix index
953 calculation for array descriptor types.
954
09c509ed 9552010-04-29 Janus Weil <janus@gcc.gnu.org>
956
957 PR fortran/43896
958 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
959 initializers for PPC members of the vtabs.
960
9612010-04-29 Janus Weil <janus@gcc.gnu.org>
962
963 PR fortran/42274
964 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
965 attribute for all PPC members of the vtypes.
966 (copy_vtab_proc_comps): Copy the correct interface.
967 * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
968 * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
969 a dummy argument and make sure all PPC members of the vtab are
970 initialized correctly.
971 (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
972 in call to gfc_trans_assign_vtab_procs.
973 * trans-stmt.c (gfc_trans_allocate): Ditto.
974
9752010-04-29 Paul Thomas <pault@gcc.gnu.org>
976
977 PR fortran/43326
978 * resolve.c (resolve_typebound_function): Renamed
979 resolve_class_compcall.Do all the detection of class references
980 here.
981 (resolve_typebound_subroutine): resolve_class_typebound_call
982 renamed. Otherwise same as resolve_typebound_function.
983 (gfc_resolve_expr): Call resolve_typebound_function.
984 (resolve_code): Call resolve_typebound_subroutine.
985
9862010-04-29 Janus Weil <janus@gcc.gnu.org>
987
988 PR fortran/43492
989 * resolve.c (resolve_typebound_generic_call): For CLASS methods
990 pass back the specific symtree name, rather than the target
991 name.
992
9932010-04-29 Paul Thomas <pault@gcc.gnu.org>
994
995 PR fortran/42353
996 * resolve.c (resolve_structure_cons): Make the initializer of
997 the vtab component 'extends' the same type as the component.
998
9992010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1000
1001 PR fortran/42680
1002 * interface.c (check_interface1): Pass symbol name rather than NULL to
1003 gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
1004 trap MULL. (gfc_compare_derived_types): Revert previous change
1005 incorporated incorrectly during merge from trunk, r155778.
1006 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
1007 than NULL to gfc_compare_interfaces.
1008 * symbol.c (add_generic_specifics): Likewise.
1009
10102010-02-29 Janus Weil <janus@gcc.gnu.org>
1011
1012 PR fortran/42353
1013 * interface.c (gfc_compare_derived_types): Add condition for vtype.
1014 * symbol.c (gfc_find_derived_vtab): Sey access to private.
1015 (gfc_find_derived_vtab): Likewise.
1016 * module.c (ab_attribute): Add enumerator AB_VTAB.
1017 (mio_symbol_attribute): Use new attribute, AB_VTAB.
1018 (check_for_ambiguous): Likewise.
1019
10202010-04-29 Paul Thomas <pault@gcc.gnu.org>
1021 Janus Weil <janus@gcc.gnu.org>
1022
1023 PR fortran/41829
1024 * trans-expr.c (select_class_proc): Remove function.
1025 (conv_function_val): Delete reference to previous.
1026 (gfc_conv_derived_to_class): Add second argument to the call to
1027 gfc_find_derived_vtab.
1028 (gfc_conv_structure): Exclude proc_pointer components when
1029 accessing $data field of class objects.
1030 (gfc_trans_assign_vtab_procs): New function.
1031 (gfc_trans_class_assign): Add second argument to the call to
1032 gfc_find_derived_vtab.
1033 * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
1034 implement holding off searching for the vptr derived type.
1035 (add_proc_component): New function.
1036 (add_proc_comps): New function.
1037 (add_procs_to_declared_vtab1): New function.
1038 (copy_vtab_proc_comps): New function.
1039 (add_procs_to_declared_vtab): New function.
1040 (void add_generic_specifics): New function.
1041 (add_generics_to_declared_vtab): New function.
1042 (gfc_find_derived_vtab): Add second argument to the call to
1043 gfc_find_derived_vtab. Add the calls to
1044 add_procs_to_declared_vtab and add_generics_to_declared_vtab.
1045 * decl.c (build_sym, build_struct): Use new arg in calls to
1046 gfc_build_class_symbol.
1047 * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
1048 definition of struct gfc_class_esym_list. Modify prototypes
1049 of gfc_build_class_symbol and gfc_find_derived_vtab.
1050 * trans-stmt.c (gfc_trans_allocate): Add second argument to the
1051 call to gfc_find_derived_vtab.
1052 * module.c : Add the vtype attribute.
1053 * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
1054 * resolve.c (resolve_typebound_generic_call): Add second arg
1055 to pass along the generic name for class methods.
1056 (resolve_typebound_call): The same.
1057 (resolve_compcall): Use the second arg to carry the generic
1058 name from the above. Remove the reference to class_esym.
1059 (check_members, check_class_members, resolve_class_esym,
1060 hash_value_expr): Remove functions.
1061 (resolve_class_compcall, resolve_class_typebound_call): Modify
1062 to use vtable rather than member by member calls.
1063 (gfc_resolve_expr): Modify second arg in call to
1064 resolve_compcall.
1065 (resolve_select_type): Add second arg in call to
1066 gfc_find_derived_vtab.
1067 (resolve_code): Add second arg in call resolve_typebound_call.
1068 (resolve_fl_derived): Exclude vtypes from check for late
1069 procedure definitions. Likewise for checking of explicit
1070 interface and checking of pass arg.
1071 * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
1072 calls to gfc_find_derived_vtab.
1073 * match.c (select_type_set_tmp): Use new arg in call to
1074 gfc_build_class_symbol.
1075 * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
1076 necessary.
1077 * parse.c (endType): Finish incomplete classes.
1078
2c38838a 10792010-04-28 Tobias Burnus <burnus@net-b.de>
1080
1081 PR fortran/18918
1082 PR fortran/43919
1083 * simplify.c (simplify_cobound): Handle scalar coarrays.
1084
b7657a45 10852010-04-27 Tobias Burnus <burnus@net-b.de>
1086
1087 * gfc-internals.texi: Update copyright year.
1088 * gfortran.texi: Ditto.
1089 * invoke.texi: Ditto.
1090
6ddcd499 10912010-04-27 Tobias Burnus <burnus@net-b.de>
1092
1093 PR fortran/18918
1094 * resolve.c (resolve_allocate_expr): Allow array coarrays.
1095 * trans-types.h (gfc_get_array_type_bounds): Update prototype.
1096 * trans-types.c (gfc_get_array_type_bounds,
1097 gfc_get_array_descriptor_base): Add corank argument.
1098 * trans-array.c (gfc_array_init_size): Handle corank.
1099 (gfc_trans_create_temp_array, gfc_array_allocate,
1100 gfc_conv_expr_descriptor): Add corank argument to call.
1101 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
1102
7f14c1e0 11032010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
1104
1105 PR fortran/30073
1106 PR fortran/43793
1107 * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
1108 of mucking with a tree directly.
1109
bea8073c 11102010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1111
1112 PR fortran/43832
1113 * io.c (gfc_match_open): Remove branch to syntax error. Add call to
1114 gfc_error with new error message.
1115
4abd9760 11162010-04-24 Paul Thomas <pault@gcc.gnu.org>
1117
1118 PR fortran/43841
1119 PR fortran/43843
1120 * trans-expr.c (gfc_conv_expr): Supply an address expression for
1121 GFC_SS_REFERENCE.
1122 (gfc_conv_expr_reference): Call gfc_conv_expr and return for
1123 GFC_SS_REFERENCE.
1124 * trans-array.c (gfc_add_loop_ss_code): Store the value rather
1125 than the address of a GFC_SS_REFERENCE.
1126 * trans.h : Change comment on GFC_SS_REFERENCE.
1127
e2ab564d 11282010-04-22 Richard Guenther <rguenther@suse.de>
1129
1130 PR fortran/43829
1131 * resolve.c (gfc_resolve_index): Wrap around ...
1132 (gfc_resolve_index_1): ... this. Add parameter to allow
1133 any integer kind index type.
1134 (resolve_array_ref): Allow any integer kind for the start
1135 index of an array ref.
1136
2cdf5987 11372010-04-21 Jakub Jelinek <jakub@redhat.com>
1138
1139 PR fortran/43836
1140 * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
1141 the decl.
1142
6ff06d36 11432010-04-20 Harald Anlauf <anlauf@gmx.de>
1144
1145 * intrinsic.c (sort_actual): Remove 'is' in error message.
1146
cf4b41d8 11472010-04-20 Paul Thomas <pault@gcc.gnu.org>
1148
1149 PR fortran/43227
1150 * resolve.c (resolve_fl_derived): If a component character
1151 length has not been resolved, do so now.
1152 (resolve_symbol): The same as above for a symbol character
1153 length.
1154 * trans-decl.c (gfc_create_module_variable): A 'length' decl is
1155 not needed for a character valued, procedure pointer.
1156
1157 PR fortran/43266
1158 * resolve.c (ensure_not_abstract_walker): If 'overriding' is
1159 not found, return FAILURE rather than ICEing.
1160
3c17d7b1 11612010-04-19 Jakub Jelinek <jakub@redhat.com>
1162
1163 PR fortran/43339
1164 * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
1165 sequential loops private in the innermost containing task region.
1166
ad086ed4 11672010-04-18 Eric Botcazou <ebotcazou@adacore.com>
1168
1169 * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
1170 to build_common_tree_nodes.
1171
f10ca8ea 11722010-04-17 Steven G. Kargl <kargl@gcc.gnu.org>
1173
ad086ed4 1174 PR fortran/31538
1175 * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
1176 gfc_msg_bounds by using 'Array bound mismatch' directly.
1177 (gfc_trans_dummy_array_bias): Remove the use of gfc_msg_bounds. Reword
1178 error message to include the mismatch in the extent of array bound.
1179 * fortran/trans.c: Remove gfc_msg_bounds. It is only used in one place.
1180 * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
f10ca8ea 1181
205a2b68 11822010-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1183
1184 * gfortran.texi: Update information on temporary file locations.
1185
7130ec9d 11862010-04-16 Jakub Jelinek <jakub@redhat.com>
1187
1188 * trans-decl.c (gfc_build_qualified_array): Ensure
1189 ubound.N and lbound.N artificial variable names don't appear
1190 in debug info.
1191
26b20b07 11922010-04-15 Steven G. Kargl <kargl@gcc.gnu.org>
1193
1194 PR fortran/30073
1195 * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
1196 block of code. Set name to the variable associated with the descriptor.
1197
3c8f1d7e 11982010-04-15 Jakub Jelinek <jakub@redhat.com>
1199
1200 * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
1201 on VAR_DECL LBOUND and/or UBOUND, even for -O1.
1202
2100808e 12032010-04-14 Steven G. Kargl <kargl@gcc.gnu.org>
1204
3c8f1d7e 1205 * intrinsic.texi: Add the missing specific name of intrinsic
2100808e 1206 procedure where the specific name is identical to the generic name.
1207 Fix inconsistent or mismatch in the argument names in intrinsic
1208 procedure descriptions. Add the SCALAR allocatable description to
1209 ALLOCATED.
1210
a250d560 12112010-04-14 Tobias Burnus <burnus@net-b.de>
1212
1213 PR fortran/18918
1214 * array.c (gfc_find_array_ref): Handle codimensions.
1215 (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
1216 * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
1217 gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
1218 New functions.
1219 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
1220 GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
1221 GFC_ISYM_UCOBOUND.
1222 * intrinsic.h (add_functions): Add this_image, image_index,
1223 lcobound and ucobound intrinsics.
1224 * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
1225 gfc_check_image_index, gfc_check_this_image,
1226 gfc_simplify_image_index, gfc_simplify_lcobound,
1227 gfc_simplify_this_image, gfc_simplify_ucobound):
1228 New function prototypes.
1229 * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
1230 IMAGE_INDEX): Document new intrinsic functions.
1231 * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
1232 error fatal.
1233 * simplify.c (simplify_bound_dim): Handle coarrays.
1234 (simplify_bound): Update simplify_bound_dim call.
1235 (gfc_simplify_num_images): Add -fcoarray=none check.
1236 (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
1237 gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
1238
ee8fe25b 12392010-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1240
1241 PR fortran/43747
1242 * constructor.c: Fix typo in comment.
1243 * expr.c (find_array_section): Add check for max array limit.
1244
ae66030b 12452010-04-13 Iain Sandoe <iains@gcc.gnu.org>
1246
1247 PR bootstrap/31400
1248 * gfortranspec.c (lookup_option): Check for -static and return
1249 OPTION_static.
1250 (lang_specific_driver): Break when OPTION_static is discovered.
1251
126387b5 12522010-04-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1253
1254 * array.c (extract_element): Restore function from trunk.
1255 (gfc_get_array_element): Restore function from trunk.
1256 (gfc_expand_constructor): Restore check against
1257 flag_max_array_constructor.
1258 * constructor.c (node_copy_and_append): Delete unused.
1259 * gfortran.h: Delete comment and extra include.
1260 * constructor.h: Bump copyright and clean up TODO comments.
1261 * resolve.c: Whitespace.
1262
12632010-04-12 Daniel Franke <franke.daniel@gmail.com>
1264
1265 * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
1266 with direct access access to elements. Adjusted prototype, fixed all
1267 callers.
1268 (gfc_simplify_dot_product): Removed duplicate check for zero-sized
1269 array.
1270 (gfc_simplify_matmul): Removed usage of ADVANCE macro.
1271 (gfc_simplify_spread): Removed workaround, directly insert elements
1272 at a given array position.
1273 (gfc_simplify_transpose): Likewise.
1274 (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
1275 function calls.
1276 (gfc_simplify_unpack): Likewise.
1277
12782010-04-12 Daniel Franke <franke.daniel@gmail.com>
1279
1280 * simplify.c (only_convert_cmplx_boz): Renamed to ...
1281 (convert_boz): ... this and moved to start of file.
1282 (gfc_simplify_abs): Whitespace fix.
1283 (gfc_simplify_acos): Whitespace fix.
1284 (gfc_simplify_acosh): Whitespace fix.
1285 (gfc_simplify_aint): Whitespace fix.
1286 (gfc_simplify_dint): Whitespace fix.
1287 (gfc_simplify_anint): Whitespace fix.
1288 (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
1289 (gfc_simplify_dnint): Whitespace fix.
1290 (gfc_simplify_asin): Whitespace fix.
1291 (gfc_simplify_asinh): Moved creation of result-expr out of switch.
1292 (gfc_simplify_atan): Likewise.
1293 (gfc_simplify_atanh): Whitespace fix.
1294 (gfc_simplify_atan2): Whitespace fix.
1295 (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
1296 (gfc_simplify_bessel_j1): Likewise.
1297 (gfc_simplify_bessel_jn): Likewise.
1298 (gfc_simplify_bessel_y0): Likewise.
1299 (gfc_simplify_bessel_y1): Likewise.
1300 (gfc_simplify_bessel_yn): Likewise.
1301 (gfc_simplify_ceiling): Reorderd statements.
1302 (simplify_cmplx): Use convert_boz(), check for constant arguments.
1303 Whitespace fix.
1304 (gfc_simplify_cmplx): Use correct default kind. Removed check for
1305 constant arguments.
1306 (gfc_simplify_complex): Replaced if-gate. Removed check for
1307 constant arguments.
1308 (gfc_simplify_conjg): Whitespace fix.
1309 (gfc_simplify_cos): Whitespace fix.
1310 (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
1311 (gfc_simplify_dcmplx): Removed check for constant arguments.
1312 (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
1313 (gfc_simplify_digits): Whitespace fix.
1314 (gfc_simplify_dim): Whitespace fix.
1315 (gfc_simplify_dprod): Reordered statements.
1316 (gfc_simplify_erf): Whitespace fix.
1317 (gfc_simplify_erfc): Whitespace fix.
1318 (gfc_simplify_epsilon): Whitespace fix.
1319 (gfc_simplify_exp): Whitespace fix.
1320 (gfc_simplify_exponent): Use convert_boz().
1321 (gfc_simplify_floor): Reorderd statements.
1322 (gfc_simplify_gamma): Whitespace fix.
1323 (gfc_simplify_huge): Whitespace fix.
1324 (gfc_simplify_iand): Whitespace fix.
1325 (gfc_simplify_ieor): Whitespace fix.
1326 (simplify_intconv): Use gfc_convert_constant().
1327 (gfc_simplify_int): Use simplify_intconv().
1328 (gfc_simplify_int2): Reorderd statements.
1329 (gfc_simplify_idint): Reorderd statements.
1330 (gfc_simplify_ior): Whitespace fix.
1331 (gfc_simplify_ishftc): Removed duplicate type check.
1332 (gfc_simplify_len): Use range_check() instead of manual range check.
1333 (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
1334 (gfc_simplify_log): Whitespace fix.
1335 (gfc_simplify_log10): Whitespace fix.
1336 (gfc_simplify_minval): Whitespace fix.
1337 (gfc_simplify_maxval): Whitespace fix.
1338 (gfc_simplify_mod): Whitespace fix.
1339 (gfc_simplify_modulo): Whitespace fix.
1340 (simplify_nint): Reorderd statements.
1341 (gfc_simplify_not): Whitespace fix.
1342 (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
1343 (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
1344 (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
1345 (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
1346 (gfc_simplify_realpart): Whitespace fix.
1347 (gfc_simplify_selected_char_kind): Removed unused result-variable.
1348 (gfc_simplify_selected_int_kind): Removed unused result-variable.
1349 (gfc_simplify_selected_real_kind): Removed unused result-variable.
1350 (gfc_simplify_sign): Whitespace fix.
1351 (gfc_simplify_sin): Whitespace fix.
1352 (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
1353 (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
1354 (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
1355 (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
1356 (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
1357
13582010-04-12 Daniel Franke <franke.daniel@gmail.com>
1359
1360 * gfortran.h (gfc_start_constructor): Removed.
1361 (gfc_get_array_element): Removed.
1362 * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr
1363 instead. Fixed all callers.
1364 (extract_element): Removed.
1365 (gfc_expand_constructor): Temporarily removed check for
1366 max-array-constructor. Will be re-introduced later if still required.
1367 (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
1368 instead. Fixed all callers.
1369 * expr.c (find_array_section): Replaced manual lookup of elements
1370 by gfc_constructor_lookup.
1371
13722010-04-12 Daniel Franke <franke.daniel@gmail.com>
1373
fb063c92 1374 * gfortran.h (gfc_get_null_expr): New prototype.
1375 (gfc_get_operator_expr): New prototype.
1376 (gfc_get_character_expr): New prototype.
1377 (gfc_get_iokind_expr): New prototype.
1378 * expr.c (gfc_get_null_expr): New.
1379 (gfc_get_character_expr): New.
1380 (gfc_get_iokind_expr): New.
1381 (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
1382 * matchexp.c (build_node): Renamed and moved to
1383 expr.c (gfc_get_operator_expr). Reordered arguments to match
1384 other functions. Fixed all callers.
1385 (gfc_get_parentheses): Use specific function to build expr.
1386 * array.c (gfc_match_array_constructor): Likewise.
1387 * arith.c (eval_intrinsic): Likewise.
1388 (gfc_hollerith2int): Likewise.
1389 (gfc_hollerith2real): Likewise.
1390 (gfc_hollerith2complex): Likewise.
1391 (gfc_hollerith2logical): Likewise.
1392 * data.c (create_character_intializer): Likewise.
1393 * decl.c (gfc_match_null): Likewise.
1394 (enum_initializer): Likewise.
1395 * io.c (gfc_match_format): Likewise.
1396 (match_io): Likewise.
1397 * match.c (gfc_match_nullify): Likewise.
1398 * primary.c (match_string_constant): Likewise.
1399 (match_logical_constant): Likewise.
1400 (build_actual_constructor): Likewise.
1401 * resolve.c (build_default_init_expr): Likewise.
1402 * symbol.c (generate_isocbinding_symbol): Likewise.
1403 (gfc_build_class_symbol): Likewise.
1404 (gfc_find_derived_vtab): Likewise.
1405 * simplify.c (simplify_achar_char): Likewise.
1406 (gfc_simplify_adjustl): Likewise.
1407 (gfc_simplify_adjustr): Likewise.
1408 (gfc_simplify_and): Likewise.
1409 (gfc_simplify_bit_size): Likewise.
1410 (gfc_simplify_is_iostat_end): Likewise.
1411 (gfc_simplify_is_iostat_eor): Likewise.
1412 (gfc_simplify_isnan): Likewise.
1413 (simplify_bound): Likewise.
1414 (gfc_simplify_leadz): Likewise.
1415 (gfc_simplify_len_trim): Likewise.
1416 (gfc_simplify_logical): Likewise.
1417 (gfc_simplify_maxexponent): Likewise.
1418 (gfc_simplify_minexponent): Likewise.
1419 (gfc_simplify_new_line): Likewise.
1420 (gfc_simplify_null): Likewise.
1421 (gfc_simplify_or): Likewise.
1422 (gfc_simplify_precision): Likewise.
1423 (gfc_simplify_repeat): Likewise.
1424 (gfc_simplify_scan): Likewise.
1425 (gfc_simplify_size): Likewise.
1426 (gfc_simplify_trailz): Likewise.
1427 (gfc_simplify_trim): Likewise.
1428 (gfc_simplify_verify): Likewise.
1429 (gfc_simplify_xor): Likewise.
1430 * trans-io.c (build_dt): Likewise.
1431 (gfc_new_nml_name_expr): Removed.
126387b5 1432
14332010-04-12 Daniel Franke <franke.daniel@gmail.com>
1434
1435 * arith.h (gfc_constant_result): Removed prototype.
1436 * constructor.h (gfc_build_array_expr): Removed prototype.
1437 (gfc_build_structure_constructor_expr): Removed prototype.
1438 * gfortran.h (gfc_int_expr): Removed prototype.
1439 (gfc_logical_expr): Removed prototype.
1440 (gfc_get_array_expr): New prototype.
1441 (gfc_get_structure_constructor_expr): New prototype.
1442 (gfc_get_constant_expr): New prototype.
1443 (gfc_get_int_expr): New prototype.
1444 (gfc_get_logical_expr): New prototype.
1445 * arith.c (gfc_constant_result): Moved and renamed to
1446 expr.c (gfc_get_constant_expr). Fixed all callers.
1447 * constructor.c (gfc_build_array_expr): Moved and renamed to
1448 expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
1449 and kind. Fixed all callers.
1450 (gfc_build_structure_constructor_expr): Moved and renamed to
1451 expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
1452 to type and kind. Fixed all callers.
1453 * expr.c (gfc_logical_expr): Renamed to ...
1454 (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
1455 (gfc_int_expr): Renamed to ...
1456 (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
1457 callers.
1458 (gfc_get_constant_expr): New.
1459 (gfc_get_array_expr): New.
1460 (gfc_get_structure_constructor_expr): New.
1461 * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
1462 instead.
1463
14642010-04-12 Daniel Franke <franke.daniel@gmail.com>
1465
1466 * constructor.h: New.
1467 * constructor.c: New.
1468 * Make-lang.in: Add new files to F95_PARSER_OBJS.
1469 * arith.c (reducy_unary): Use constructor API.
1470 (reduce_binary_ac): Likewise.
1471 (reduce_binary_ca): Likewise.
1472 (reduce_binary_aa): Likewise.
1473 * check.c (gfc_check_pack): Likewise.
1474 (gfc_check_reshape): Likewise.
1475 (gfc_check_unpack): Likewise.
1476 * decl.c (add_init_expr_to_sym): Likewise.
1477 (build_struct): Likewise.
1478 * dependency.c (gfc_check_dependency): Likewise.
1479 (contains_forall_index_p): Likewise.
1480 * dump-parse-tree.c (show_constructor): Likewise.
1481 * expr.c (free_expr0): Likewise.
1482 (gfc_copy_expr): Likewise.
1483 (gfc_is_constant_expr): Likewise.
1484 (simplify_constructor): Likewise.
1485 (find_array_element): Likewise.
1486 (find_component_ref): Likewise.
1487 (find_array_section): Likewise.
1488 (find_substring_ref): Likewise.
1489 (simplify_const_ref): Likewise.
1490 (scalarize_intrinsic_call): Likewise.
1491 (check_alloc_comp_init): Likewise.
1492 (gfc_default_initializer): Likewise.
1493 (gfc_traverse_expr): Likewise.
1494 * iresolve.c (check_charlen_present): Likewise.
1495 (gfc_resolve_reshape): Likewise.
1496 (gfc_resolve_transfer): Likewise.
1497 * module.c (mio_constructor): Likewise.
1498 * primary.c (build_actual_constructor): Likewise.
1499 (gfc_match_structure_constructor): Likewise.
1500 * resolve.c (resolve_structure_cons): Likewise.
1501 * simplify.c (is_constant_array_expr): Likewise.
1502 (init_result_expr): Likewise.
1503 (transformational_result): Likewise.
1504 (simplify_transformation_to_scalar): Likewise.
1505 (simplify_transformation_to_array): Likewise.
1506 (gfc_simplify_dot_product): Likewise.
1507 (simplify_bound): Likewise.
1508 (simplify_matmul): Likewise.
1509 (simplify_minval_maxval): Likewise.
1510 (gfc_simplify_pack): Likewise.
1511 (gfc_simplify_reshape): Likewise.
1512 (gfc_simplify_shape): Likewise.
1513 (gfc_simplify_spread): Likewise.
1514 (gfc_simplify_transpose): Likewise.
1515 (gfc_simplify_unpack): Likewise.q
1516 (gfc_convert_constant): Likewise.
1517 (gfc_convert_char_constant): Likewise.
1518 * target-memory.c (size_array): Likewise.
1519 (encode_array): Likewise.
1520 (encode_derived): Likewise.
1521 (interpret_array): Likewise.
1522 (gfc_interpret_derived): Likewise.
1523 (expr_to_char): Likewise.
1524 (gfc_merge_initializers): Likewise.
1525 * trans-array.c (gfc_get_array_constructor_size): Likewise.
1526 (gfc_trans_array_constructor_value): Likewise.
1527 (get_array_ctor_strlen): Likewise.
1528 (gfc_constant_array_constructor_p): Likewise.
1529 (gfc_build_constant_array_constructor): Likewise.
1530 (gfc_trans_array_constructor): Likewise.
1531 (gfc_conv_array_initializer): Likewise.
1532 * trans-decl.c (check_constant_initializer): Likewise.
1533 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
1534 (gfc_apply_interface_mapping_to_cons): Likewise.
1535 (gfc_trans_structure_assign): Likewise.
1536 (gfc_conv_structure): Likewise.
1537 * array.c (check_duplicate_iterator): Likewise.
1538 (match_array_list): Likewise.
1539 (match_array_cons_element): Likewise.
1540 (gfc_match_array_constructor): Likewise.
1541 (check_constructor_type): Likewise.
1542 (check_constructor): Likewise.
1543 (expand): Likewise.
1544 (expand_constructor): Likewise.
1545 (extract_element): Likewise.
1546 (gfc_expanded_ac): Likewise.
1547 (resolve_array_list): Likewise.
1548 (gfc_resolve_character_array_constructor): Likewise.
1549 (copy_iterator): Renamed to ...
1550 (gfc_copy_iterator): ... this.
1551 (gfc_append_constructor): Removed.
1552 (gfc_insert_constructor): Removed unused function.
1553 (gfc_get_constructor): Removed.
1554 (gfc_free_constructor): Removed.
1555 (qgfc_copy_constructor): Removed.
1556 * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
1557 Removed all references. Replaced constructor list by splay-tree.
1558 (struct gfc_constructor): Removed member 'next', moved 'offset' from
1559 the inner struct, added member 'base'.
1560 (gfc_append_constructor): Removed prototype.
1561 (gfc_insert_constructor): Removed prototype.
1562 (gfc_get_constructor): Removed prototype.
1563 (gfc_free_constructor): Removed prototype.
1564 (qgfc_copy_constructor): Removed prototype.
1565 (gfc_copy_iterator): New prototype.
1566 * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
1567
21d5f487 15682010-04-10 Tobias Burnus <burnus@net-b.de>
1569
1570 PR fortran/43591
1571 * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
1572 proc-pointers and type-bound procedures.
1573 (gfc_specification_expr): Check proc-pointers for pureness.
1574
5fe33912 15752010-04-09 Iain Sandoe <iains@gcc.gnu.org>
1576
1577 PR bootstrap/43684
1578 * gfortranspec.c (lang_specific_driver): Do not expose vars
1579 only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
1580 for such.
1581
e97ac7c0 15822010-04-09 Tobias Burnus <burnus@net-b.de>
1583
1584 PR fortran/18918
1585 * decl.c (variable_decl, match_attr_spec): Fix setting the array
1586 spec.
1587 * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
1588 * data.c (gfc_assign_data_value): Ditto.
1589 * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
1590 (gfc_traverse_expr): Traverse also through codimension expressions.
1591 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
1592 gfc_has_ultimate_pointer): New functions.
1593 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
1594 (gfc_array_ref): Add codimen.
1595 (gfc_array_ref): Add in_allocate.
1596 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
1597 gfc_has_ultimate_pointer): Add prototypes.
1598 * interface.c (compare_parameter, compare_actual_formal,
1599 check_intents): Add coarray constraints.
1600 * match.c (gfc_match_iterator): Add coarray constraint.
1601 * match.h (gfc_match_array_ref): Update interface.
1602 * primary.c (gfc_match_varspec): Handle codimensions.
1603 * resolve.c (coarray_alloc, inquiry_argument): New static variables.
1604 (check_class_members): Return gfc_try instead for error recovery.
1605 (resolve_typebound_function,resolve_typebound_subroutine,
1606 check_members): Handle return value of check_class_members.
1607 (resolve_structure_cons, resolve_actual_arglist, resolve_function,
1608 check_dimension, compare_spec_to_ref, resolve_array_ref,
1609 resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
1610 resolve_allocate_expr, resolve_ordinary_assign): Add coarray
1611 support.
1612 * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
1613 Skip over coarray refs.
1614 (gfc_array_allocate) Add support for references containing coindexes.
1615 * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
1616 (gfc_map_intrinsic_function): Ignore codimensions.
1617
d276e820 16182010-04-08 Bud Davis <bdavis9659@sbcglobal.net>
1619
1620 PR fortran/28039
1621 * io.c (check_format_string): Added check for additional non
1622 blank characters after the format string was successfully
1623 parsed.
1624 * io.c (check_format): Changed the error messages for positive
1625 int required and period required to drop through the error logic
1626 and report with gfc_error instead of gfc_error_now. Corrected
1627 format postion for hollerith strings.
1628
d1da324d 16292010-04-08 Tobias Burnus <burnus@net-b.de>
1630
1631 * module.c (use_iso_fortran_env_module): Fix standard check.
1632
4081d362 16332010-04-07 Jakub Jelinek <jakub@redhat.com>
1634
1635 * parse.c (parse_derived, parse_enum): Avoid set but not used
1636 warning.
1637
bc81a609 16382010-04-07 Janne Blomqvist <jb@gcc.gnu.org>
1639
1640 PR fortran/40539
1641 * gfortran.texi: Add section about representation of
d1da324d 1642 LOGICAL variables.
bc81a609 1643
3a79f5da 16442010-04-07 Simon Baldwin <simonb@google.com>
1645
1646 * cpp.c (cb_cpp_error): Add warning reason argument, set a value
1647 for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
1648
e190b18a 16492010-04-07 Richard Guenther <rguenther@suse.de>
1650
1651 * options.c (gfc_init_options): Do not set.
1652
76daec3c 16532010-04-06 Tobias Burnus <burnus@net-b.de>
1654
1655 PR fortran/18918
1656 * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
1657 * match.c (gfc_match_critical, sync_statement): Ditto.
1658 * gfortran.h (gfc_fcoarray): New enum.
1659 (gfc_option_t): Use it.
1660 * lang.opt (fcoarray): Add new flag.
1661 * invoke.texi (fcoarray): Document it.
1662 * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
1663 (gfc_handle_coarray_option): New function.
1664
2d640d61 16652010-04-06 Tobias Burnus <burnus@net-b.de>
1666
1667 PR fortran/18918
1668 * gfortran.h (gfc_array_spec): Add cotype.
1669 * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
1670 and defer error diagnostic.
1671 * resolve.c (resolve_fl_derived): Add missing check.
1672 (resolve_symbol): Add cotype/type check.
1673 * parse.c (parse_derived): Fix setting of coarray_comp.
1674
aff518b0 16752010-04-06 Tobias Burnus <burnus@net-b.de>
1676
1677 PR fortran/18918
1678 * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
1679 match_array_element_spec,gfc_copy_array_spec,
1680 gfc_compare_array_spec): Include corank.
1681 (match_array_element_spec,gfc_set_array_spec): Support codimension.
1682 * decl.c (build_sym,build_struct,variable_decl,
1683 match_attr_spec,attr_decl1,cray_pointer_decl,
1684 gfc_match_volatile): Add codimension.
1685 (gfc_match_codimension): New function.
1686 * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
1687 * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
1688 (gfc_add_codimension): New function prototype.
1689 * match.h (gfc_match_codimension): New function prototype.
1690 (gfc_match_array_spec): Update prototype
1691 * match.c (gfc_match_common): Update gfc_match_array_spec call.
1692 * module.c (MOD_VERSION): Bump.
1693 (mio_symbol_attribute): Support coarray attributes.
1694 (mio_array_spec): Add corank support.
1695 * parse.c (decode_specification_statement,decode_statement,
1696 parse_derived): Add coarray support.
1697 * resolve.c (resolve_formal_arglist, was_declared,
1698 is_non_constant_shape_array, resolve_fl_variable,
1699 resolve_fl_derived, resolve_symbol): Add coarray support.
1700 * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
1701 gfc_build_class_symbol): Add coarray support.
1702 (gfc_add_codimension): New function.
1703
e1eea5a7 17042010-04-06 Tobias Burnus <burnus@net-b.de>
1705
1706 PR fortran/18918
1707 * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
1708 atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
1709 stat_locked_other_image, stat_stopped_image and stat_unlocked of
1710 Fortran 2008.
1711 * intrinsic.texi (iso_fortran_env): Ditto.
1712 * libgfortran.h (libgfortran_stat_codes): New enum.
1713 * module.c (use_iso_fortran_env_module): Honour -std= when loading
1714 constants from the intrinsic module.
1715
c6cd3066 17162010-04-06 Tobias Burnus <burnus@net-b.de>
1717
1718 PR fortran/39997
1719 * intrinsic.c (add_functions): Add num_images.
1720 * decl.c (gfc_match_end): Handle END CRITICAL.
1721 * intrinsic.h (gfc_simplify_num_images): Add prototype.
1722 * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
1723 and SYNC.
1724 * gfortran.h (gfc_statement): Add enum items for those.
1725 (gfc_exec_op) Ditto.
1726 (gfc_isym_id): Add num_images.
1727 * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
1728 (gfc_trans_sync,gfc_trans_critical): New functions.
1729 * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
1730 gfc_trans_critical): Add/update prototypes.
1731 * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
1732 and SYNC statements.
1733 * trans.h (gfor_fndecl_error_stop_string) Add variable.
1734 * resolve.c (resolve_sync): Add function.
1735 (gfc_resolve_blocks): Handle CRITICAL.
1736 (resolve_code): Handle CRITICAL, ERROR STOP,
1737 (resolve_branch): Add CRITICAL constraint check.
1738 and SYNC statements.
1739 * st.c (gfc_free_statement): Add new statements.
1740 * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
1741 (gfc_build_builtin_function_decls): Initialize it.
1742 * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
1743 (gfc_match_critical, gfc_match_error_stop, sync_statement,
1744 gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
1745 New functions.
1746 (match_exit_cycle): Handle CRITICAL constraint.
1747 (gfc_match_stopcode): Handle ERROR STOP.
1748 * match.h (gfc_match_critical, gfc_match_error_stop,
1749 gfc_match_sync_all, gfc_match_sync_images,
1750 gfc_match_sync_memory): Add prototype.
1751 * parse.c (decode_statement, gfc_ascii_statement,
1752 parse_executable): Handle new statements.
1753 (parse_critical_block): New function.
1754 * parse.h (gfc_compile_state): Add COMP_CRITICAL.
1755 * intrinsic.texi (num_images): Document new function.
1756 * simplify.c (gfc_simplify_num_images): Add function.
1757
a545a8f8 17582010-04-06 Tobias Burnus <burnus@net-b.de>
1759
1760 PR fortran/43178
1761 * trans-array.c (gfc_conv_expr_descriptor): Update
1762 gfc_trans_scalar_assign call.
1763 (has_default_initializer): New function.
1764 (gfc_trans_deferred_array): Nullify less often.
1765 * trans-expr.c (gfc_conv_subref_array_arg,
1766 gfc_trans_subcomponent_assign): Update call to
1767 gfc_trans_scalar_assign.
1768 (gfc_trans_scalar_assign): Add parameter and pass it on.
1769 (gfc_trans_assignment_1): Optionally, do not dealloc before
1770 assignment.
1771 * trans-openmp.c (gfc_trans_omp_array_reduction): Update
1772 call to gfc_trans_scalar_assign.
1773 * trans-decl.c (gfc_get_symbol_decl): Do not always apply
1774 initializer to static variables.
1775 (gfc_init_default_dt): Add dealloc parameter and pass it on.
1776 * trans-stmt.c (forall_make_variable_temp,
1777 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
1778 gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
1779 gfc_trans_allocate): Update gfc_trans_assignment call.
1780 * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
1781 gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
1782 parameter to prototype.
1783
c788a00c 17842010-03-31 Paul Thomas <pault@gcc.gnu.org>
1785
1786 * ioparm.def : Update copyright.
1787 * lang.opt : ditto
1788 * trans-array.c : ditto
1789 * trans-array.h : ditto
1790 * expr.c: ditto
1791 * trans-types.c: ditto
1792 * dependency.c : ditto
1793 * gfortran.h : ditto
1794 * options.c : ditto
1795 * trans-io.c : ditto
1796 * trans-intrinsic.c : ditto
1797 * libgfortran.h : ditto
1798 * invoke.texi : ditto
1799 * intrinsic.texi : ditto
1800 * trans.c : ditto
1801 * trans.h : ditto
1802 * intrinsic.c : ditto
1803 * interface.c : ditto
1804 * iresolve.c : ditto
1805 * trans-stmt.c : ditto
1806 * trans-stmt.h : ditto
1807 * parse,c : ditto
1808 * match.h : ditto
1809 * error.c : ditto
1810
9f1470cb 18112010-03-20 Paul Thomas <pault@gcc.gnu.org>
1812
1813 PR fortran/43450
1814 * trans-decl.c (gfc_create_module_variable): With -fwhole-file
1815 do not assert the context of derived types.
1816
f4e9c676 18172010-03-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1818
1819 PR fortran/43409
1820 * ioparm.def: Change inquire size variable to type pointer to
1821 GFC_IO_INT type.
1822
8fcd6158 18232010-03-18 Paul Thomas <pault@gcc.gnu.org>
1824
fb063c92 1825 PR fortran/43039
1826 * trans-expr.c (conv_parent_component_references): Ensure that
8fcd6158 1827 'dt' has a backend_decl.
1828
fb063c92 1829 PR fortran/43043
1830 * trans-expr.c (gfc_conv_structure): Ensure that the derived
8fcd6158 1831 type has a backend_decl.
1832
fb063c92 1833 PR fortran/43044
1834 * resolve.c (resolve_global_procedure): Check that the 'cl'
8fcd6158 1835 structure is not NULL.
1836
eb21bbd2 18372010-03-18 Shujing Zhao <pearly.zhao@oracle.com>
1838
1839 * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
1840 redundant tab.
1841
452695a8 18422010-03-17 Tobias Burnus <burnus@net-b.de>
1843
1844 PR fortran/43331
1845 * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
1846 gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
1847 check.
1848 * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
1849 pointees as having explizit size.
1850 * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
1851 check.
1852 * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
1853 (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
1854 * resolve.c (resolve_symbol): Handle cp_was_assumed.
1855 * trans-decl.c (gfc_trans_deferred_vars): Ditto.
1856 (gfc_finish_var_decl): Don't mark Cray pointees as restricted
1857 pointers.
1858
895e6dfa 18592010-03-14 Tobias Burnus <burnus@net-b.de>
1860
1861 PR fortran/43362
1862 * resolve.c (resolve_structure_cons): Add missing PURE constraint.
1863 (resolve_ordinary_assign): Add check to avoid segfault.
1864
ae925cc0 18652010-03-12 Paul Thomas <pault@gcc.gnu.org>
1866
1867 PR fortran/43291
1868 PR fortran/43326
1869 * resolve.c (resolve_compcall): Add new boolean dummy argument
1870 'class_members'. Only resolve expression at end if false.
1871 Remove redundant, static variable 'class_object'.
1872 (check_class_members): Add extra argument to call of
1873 resolve_compcall.
1874 (resolve_typebound_function): Renamed resolve_class_compcall.
1875 Do all the detection of class references here. Correct calls to
1876 resolve_compcall for extra argument.
1877 (resolve_typebound_subroutine): resolve_class_typebound_call
1878 renamed. Otherwise same as resolve_typebound_function.
1879 (gfc_resolve_expr): Call resolve_typebound_function.
1880 (resolve_code): Call resolve_typebound_subroutine.
1881
372720b0 18822010-03-10 Tobias Burnus <burnus@net-b.de
1883
1884 PR fortran/43303
1885 * symbol.c (get_iso_c_sym): Set sym->result.
1886
b652cb7e 18872010-03-08 Janus Weil <janus@gcc.gnu.org>
1888
1889 PR fortran/43256
1890 * resolve.c (resolve_compcall): Don't set 'value.function.name' here
1891 for TBPs, otherwise they will not be resolved properly.
1892 (resolve_function): Use 'value.function.esym' instead of
372720b0 1893 'value.function.name' to check if we're dealing with a TBP.
b652cb7e 1894 (check_class_members): Set correct type of passed object for all TBPs,
1895 not only generic ones, except if the type is abstract.
1896
519651c1 18972010-03-04 Janus Weil <janus@gcc.gnu.org>
1898
1899 PR fortran/43244
1900 * decl.c (gfc_match_final_decl): Make sure variable names starting with
1901 'final...' are not misinterpreted as FINAL statements.
1902
1fd5778e 19032010-03-03 Paul Thomas <pault@gcc.gnu.org>
1904
1905 PR fortran/43243
1906 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
1907 allocatable ultimate components do not need temporaries, whilst
1908 ultimate pointer components do.
1909
c4cec8b1 19102010-03-03 Janus Weil <janus@gcc.gnu.org>
1911
1912 PR fortran/43169
1913 * resolve.c (resolve_code): Correctly set gfc_current_ns for
1914 EXEC_SELECT_TYPE.
1915 (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
1916 (gfc_pure): Ditto.
1917
34de9f8b 19182010-03-02 Paul Thomas <pault@gcc.gnu.org>
1919
1920 PR fortran/43180
1921 * trans-array.c (gfc_conv_array_parameter): A full array of
1922 derived type need not be restricted to a symbol without an
1923 array spec to use the call to gfc_conv_expr_descriptor.
1924
1925 PR fortran/43173
1926 * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
1927 allocatable arrays do not need temporaries.
1928
9b407bc9 19292010-03-01 Tobias Burnus <burnus@net-b.de>
1930
1931 PR fortran/43199
1932 * resolve.c (find_array_spec): Handle REF_COMPONENT with
1933 CLASS components.
1934
cf5f0e1c 19352010-02-28 Tobias Burnus <burnus@net-b.de>
1936
1937 PR fortran/43205
1938 * trans-expr.c (is_zero_initializer_p): Move up in the file.
1939 (gfc_conv_initializer): Handle zero initializer as special case.
1940
70464669 19412010-02-27 Tobias Burnus <burnus@net-b.de>
1942
1943 PR fortran/43185
1944 * resolve.c (resolve_fl_variable_derived): Imply SAVE
1945 for module variables for Fortran 2008.
1946
5d713e67 19472010-02-25 Jakub Jelinek <jakub@redhat.com>
1948
1949 PR debug/43166
1950 * trans-common.c (build_common_decl): Also update DECL_MODE,
1951 and DECL_SIZE when encountering a larger common block and call
1952 layout_decl.
1953
fb063c92 19542010-02-24 Tobias Burnus <burnus@net-b.de>
70a03b17 1955
1956 PR fortran/43042
1957 * trans-expr.c (gfc_conv_initializer): Call directly
fb063c92 1958 gfc_conv_constant for C_NULL_(FUN)PTR.
70a03b17 1959
9bf78879 19602010-02-22 Paul Thomas <pault@gcc.gnu.org>
1961
1962 PR fortran/43072
1963 * dependency.c (gfc_full_array_ref_p): Check for contiguous by
1964 checking the rest of the dimensions for elements.
1965
54564d01 19662010-02-21 Tobias Burnus <burnus@net-b.de>
1967
1968 PR fortran/35259
1969 * gfortran.h (gfc_option_t): New flag -fprotect-parens.
1970 * lang.opt: Ditto.
1971 * option.c (gfc_init_options,gfc_handle_option): Ditto.
1972 * trans-expr.c (gfc_conv_expr_op): Use the flag.
1973 * invoke.texi: Document new -fno-protect-parens flag.
1974
08803898 19752010-02-20 Paul Thomas <pault@gcc.gnu.org>
1976
1977 PR fortran/36932
1978 PR fortran/36933
1979 PR fortran/43072
1980 PR fortran/43111
1981 * dependency.c (gfc_check_argument_var_dependency): Use enum
1982 value instead of arithmetic vaue for 'elemental'.
1983 (check_data_pointer_types): New function.
1984 (gfc_check_dependency): Call check_data_pointer_types.
1985 * trans-array.h : Change fourth argument of
1986 gfc_conv_array_parameter to boolean.
1987 * trans-array.c (gfc_conv_array_parameter): A contiguous array
1988 can be a dummy but it must not be assumed shape or deferred.
1989 Change fourth argument to boolean. Array constructor exprs will
1990 always be contiguous and do not need packing and unpacking.
1991 * trans-expr.c (gfc_conv_procedure_call): Clean up some white
1992 space and change fourth argument of gfc_conv_array_parameter
1993 to boolean.
1994 (gfc_trans_arrayfunc_assign): Change fourth argument of
1995 gfc_conv_array_parameter to boolean.
1996 * trans-io.c (gfc_convert_array_to_string): The same.
1997 * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
1998
3a60b071 19992010-02-20 Tobias Burnus <burnus@net-b.de>
2000
2001 PR fortran/42958
2002 * libgfortran.h: Add GFC_RTCHECK_MEM.
2003 * invoke.texi (-fcheck=): Document -fcheck=mem.
2004 * tranc.c (gfc_call_malloc): Remove negative-size run-time error
2005 and enable malloc-success check only with -fcheck=mem.
2006 * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
2007
cd584ef8 20082010-02-16 Tobias Burnus <burnus@net-b.de>
2009
2010 PR fortran/43040
2011 * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
2012 * intrinsic.c (add_functions): Ditto.
2013 * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
2014 * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
2015
1e8c7f7a 20162010-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2017
2018 PR fortran/32382
2019 * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
2020 gfc_trans_do prototype.
2021 * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
2022 a loop exit condition. If exit condition is given, build the loop exit
2023 code, checking IO results of implied do loops in READ and WRITE.
2024 (gfc_trans_do): Likewise.
2025 * trans.c (trans_code): New static work function, previously
2026 gfc_trans_code. Passes exit condition to gfc_trans_do.
2027 (gfc_trans_code): Calls trans_code with NULL_TREE condition.
2028 (gfc_trans_code_cond): Calls trans_code with loop exit condition.
2029 * trans-io.c (build_dt): Build an exit condition to allow checking IO
2030 result status bits in the dtparm structure. Use this condition in call
2031 to gfc_trans_code_cond.
2032
d3d55916 20332010-02-13 Paul Thomas <pault@gcc.gnu.org>
2034
2035 PR fortran/41113
2036 PR fortran/41117
2037 * trans-array.c (gfc_conv_array_parameter): Use
2038 gfc_full_array_ref_p to detect full and contiguous variable
2039 arrays. Full array components and contiguous arrays do not need
2040 internal_pack and internal_unpack.
2041
a8beb4f8 20422010-02-11 Jakub Jelinek <jakub@redhat.com>
2043
1fb1e0c8 2044 PR fortran/43030
2045 * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
2046
a8beb4f8 2047 PR fortran/43029
2048 * decl.c (enumerator_decl): Don't call gfc_free_enum_history
2049 here.
2050 (gfc_match_enumerator_def): But here whenever enumerator_decl returns
2051 MATCH_ERROR.
2052
22c1d301 20532010-02-10 Joost VandeVondele <jv244@cam.ac.uk>
2054 Tobias Burnus <burnus@net-b.de>
2055
2056 PR fortran/40823
2057 * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
2058
c1630d65 20592010-02-10 Tobias Burnus <burnus@net-b.de>
2060
2061 PR fortran/43015
2062 * trans-decl.c (gfc_generate_function_code): Only check
2063 actual-vs.-dummy character bounds if not bind(C).
2064
5b0b6156 20652010-02-10 Jakub Jelinek <jakub@redhat.com>
2066
2067 PR fortran/42309
2068 * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
2069 info->dimen after info has been freed.
2070
5a80a58b 20712010-02-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
9640c8e1 2072
2073 PR fortran/42999
2074 * array.c (gfc_constant_ac): Do not prevent expansion of constructors
2075 with iterators.
2076
51672aa8 20772010-02-09 Jakub Jelinek <jakub@redhat.com>
2078
2079 * module.c (fix_mio_expr): Declare sym.
2080
d83f123f 20812010-02-09 Paul Thomas <pault@gcc.gnu.org>
2082
2083 PR fortran/41869
2084 * module.c (fix_mio_expr): Fix for private generic procedures.
2085
7c967940 20862010-02-09 Daniel Kraft <d@domob.eu>
2087
2088 PR fortran/39171
2089 * resolve.c (resolve_charlen): Change warning about negative CHARACTER
2090 length to be correct and issue only with -Wsurprising.
2091 * invoke.texi (Wsurprising): Mention this new warning that is
2092 turned on by -Wsurprising.
2093
38307b08 20942010-02-09 Daniel Kraft <d@domob.eu>
2095
2096 PR fortran/41507
2097 * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
2098 can be CHARACTER type.
2099 (MINVAL), (MAXLOC), (MINLOC): Ditto.
2100
3446c28b 21012010-02-05 Paul Thomas <pault@gcc.gnu.org>
2102
2103 PR fortran/42309
2104 * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
2105 'formal_ptr'. If this is true, give returned descriptor unity
2106 lbounds, in all dimensions, and the appropriate offset.
2107 (gfc_conv_procedure_call); If formal is a pointer, set the last
2108 argument of gfc_conv_subref_array_arg to true.
2109 * trans.h : Add last argument for gfc_conv_subref_array_arg.
2110 * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
2111 new arg of gfc_conv_subref_array_arg to false.
2112 * trans-stmt.c (forall_make_variable_temp): The same.
2113
27635231 21142010-02-03 Tobias Burnus <burnus@net-b.de>
2115
2116 PR fortran/42936
2117 * interface.c (compare_parameter): Disable rank-checking
2118 for NULL().
2119
76d63c82 21202010-02-02 Tobias Burnus <burnus@net-b.de>
2121
2122 PR fortran/42650
2123 * parse.c (decode_specification_statement): Use sym->result not sym.
2124
b3a420c5 21252010-02-01 Tobias Burnus <burnus@net-b.de>
2126
2127 PR fortran/42922
2128 * decl.c (variable_decl): Allow default initializer in
2129 TYPE declarations in PURE functions.
2130
dba1636b 21312010-01-31 Janus Weil <janus@gcc.gnu.org>
2132
2133 PR fortran/42888
2134 * resolve.c (resolve_allocate_expr): Move default initialization code
2135 here from gfc_trans_allocate.
2136 * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
2137 EXEC_INIT_ASSIGN.
2138 * trans-expr.c (gfc_trans_class_assign): Handle default initialization
2139 of CLASS variables via memcpy.
2140 * trans-stmt.c (gfc_trans_allocate): Move default initialization code
2141 to resolve_allocate_expr.
2142
ffc91ac1 21432010-01-31 Paul Thomas <pault@gcc.gnu.org>
2144
b3a420c5 2145 PR fortran/38324
ffc91ac1 2146 * expr.c (gfc_get_full_arrayspec_from_expr): New function.
2147 * gfortran.h : Add prototype for above.
b3a420c5 2148 * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
ffc91ac1 2149 (gfc_trans_subcomponent_assign): Call new function to replace
2150 the code to deal with allocatable components.
2151 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
2152 gfc_get_full_arrayspec_from_expr to replace existing code.
2153
a93489b1 21542010-01-25 Tobias Burnus <burnus@net-b.de>
2155
2156 PR fortran/42858
2157 * array.c (gfc_array_dimen_size): Fix intrinsic procedure
2158 check.
2159
14c92e72 21602010-01-24 Paul Thomas <pault@gcc.gnu.org>
2161
2162 PR fortran/41044
2163 PR fortran/41167
2164 * expr.c (remove_subobject_ref): If the constructor is NULL use
2165 the expression as the source.
2166 (simplify_const_ref): Change the type of expression if
2167 there are component references. Allow for substring to be at
2168 the end of an arbitrarily long chain of references. If an
2169 element is found that is not in an EXPR_ARRAY, assume that this
2170 is scalar initialization of array. Call remove_subobject_ref in
2171 this case with NULL second argument.
2172
e4c32cf4 21732010-01-24 Tobias Burnus <burnus@net-b.de>
2174
2175 PR fortran/39304
2176 * array.c (gfc_array_dimen_size): Use correct specific
2177 function in the check.
2178
17658a1b 21792010-01-21 Paul Thomas <pault@gcc.gnu.org>
2180
2181 PR fortran/42736
2182 * trans-stmt.c (gfc_conv_elemental_dependencies): If temporary
2183 is required, turn any trailing array elements after a range
2184 into ranges so that offsets can be calculated.
2185
6436797c 21862010-01-20 Joern Rennecke <amylaar@spamcop.net>
2187
2188 * module.c (mio_f2k_derived): Use enumerator as initializer of
2189 enum variable.
2190
4fc5fe46 2191 PR bootstrap/42812
2192 * gfortran.h (struct gfc_namespace) <resolved>: Change to signed
2193 bitfield of width 2.
2194
aea8962c 21952010-01-19 Janus Weil <janus@gcc.gnu.org>
2196
2197 PR fortran/42804
2198 * resolve.c (extract_compcall_passed_object): Set locus for
2199 passed-object argument.
2200 (extract_ppc_passed_object): Set locus and correctly remove PPC
2201 reference.
2202
5fa0fdc2 22032010-01-19 Paul Thomas <pault@gcc.gnu.org>
2204
2205 PR fortran/42783
2206 * trans-decl.c (add_argument_checking): Do not use the backend
2207 decl directly to test for the presence of an optional dummy
2208 argument. Use gfc_conv_expr_present, remembering to set the
2209 symbol referenced.
2210
2211 PR fortran/42772
2212 * trans-decl.c (gfc_generate_function_code): Small white space
2213 changes. If 'recurcheckvar' is NULL do not try to reset it.
2214
1b4ad9da 22152010-01-19 Janus Weil <janus@gcc.gnu.org>
2216
2217 PR fortran/42545
2218 * resolve.c (resolve_fl_derived): Set the accessibility of the parent
2219 component for extended types.
2220 * symbol.c (gfc_find_component): Remove a wrongly-worded error message
2221 and take care of parent component accessibility.
2222
b4d11551 22232010-01-17 Janus Weil <janus@gcc.gnu.org>
2224
2225 PR fortran/42677
2226 * gfortran.h (symbol_attribute): Remove 'ambiguous_interfaces'.
2227 * interface.c (check_interface1): Move a warning message here from
2228 resolve_fl_procedure.
2229 (check_sym_interfaces): Removed 'attr.ambiguous_interfaces'.
2230 * module.c (read_module): Remove call to gfc_check_interfaces, since
2231 this comes too early here.
2232 * resolve.c (resolve_fl_procedure): Move warning message to
2233 check_interface1.
2234
ea315504 22352010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2236
2237 PR fortran/42684
2238 * interface.c (check_interface1): Pass symbol name rather than NULL to
2239 gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
2240 trap MULL.
2241 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
2242 than NULL to gfc_compare_interfaces.
2243
64a8f98f 22442010-01-14 Paul Thomas <pault@gcc.gnu.org>
2245
fb063c92 2246 PR fortran/41478
2247 * trans-array.c (duplicate_allocatable): Static version of
64a8f98f 2248 gfc_duplicate_allocatable with provision to handle scalar
2249 components. New boolean argument to switch off call to malloc
2250 if true.
2251 (gfc_duplicate_allocatable): New function to call above with
2252 new argument false.
2253 (gfc_copy_allocatable_data): New function to call above with
2254 new argument true.
2255 (structure_alloc_comps): Do not apply indirect reference to
2256 scalar pointers. Add new section to copy allocatable components
2257 of arrays. Extend copying of allocatable components to include
2258 scalars.
2259 (gfc_copy_only_alloc_comp): New function to copy allocatable
2260 component derived types, without allocating the base structure.
2261 * trans-array.h : Add primitive for gfc_copy_allocatable_data.
2262 Add primitive for gfc_copy_only_alloc_comp.
2263 * trans-expr.c (gfc_conv_procedure_call): After calls to
2264 transformational functions with results that are derived types
2265 with allocatable components, copy the components in the result.
2266 (gfc_trans_arrayfunc_assign): Deallocate allocatable components
2267 of lhs derived types before allocation.
2268
21bdb87e 22692010-01-14 Paul Thomas <pault@gcc.gnu.org>
2270
2271 PR fortran/42481
2272 * module.c (load_generic_interfaces): If a procedure that is
2273 use associated but not generic is given an interface that
2274 includes itself, then make it generic.
2275
fb063c92 22762010-01-11 Joseph Myers <joseph@codesourcery.com>
cf210371 2277 Shujing Zhao <pearly.zhao@oracle.com>
2278
2279 PR translation/42469
2280 * lang.opt (fblas-matmul-limit=, finit-character=, finit-integer=,
2281 finit-logical=, finit-real=, fmax-array-constructor=): Use tab
2282 character between option name and help text.
2283
c315461d 22842010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2285
2286 PR fortran/20923
2287 PR fortran/32489
2288 * trans-array.c (gfc_conv_array_initializer): Change call to
2289 gfc_error_now to call to gfc_fatal_error.
2290 * array.c (count_elements): Whitespace. (extract_element): Whitespace.
2291 (is_constant_element): Changed name from constant_element.
2292 (gfc_constant_ac): Only use expand_construuctor for expression
2293 types of EXPR_ARRAY. If expression type is EXPR_CONSTANT, no need to
2294 call gfc_is_constant_expr.
2295 * expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error
2296 message.
2297 * resolve.c (gfc_is_expandable_expr): New function that determiners if
2298 array expressions should have their constructors expanded.
2299 (gfc_resolve_expr): Use new function to determine whether or not to call
2300 gfc_expand_constructor.
2301
650ee6fb 23022010-01-09 Tobias Burnus <burnus@net-b.de>
2303
2304 PR fortran/41298
2305 * trans-expr.c (gfc_trans_structure_assign): Handle
2306 c_null_(fun)ptr.
2307 * symbol.c (gen_special_c_interop_ptr): Add NULL_EXPR
2308 to the constructor for c_null_(fun)ptr.
2309 * resolve.c (resolve_structure_cons): Add special case
2310 for c_null_(fun)ptr.
2311
60d645bb 23122010-01-09 Jakub Jelinek <jakub@redhat.com>
2313
2314 * gfortranspec.c (lang_specific_driver): Update copyright notice
2315 dates.
2316
23172010-01-08 Tobias Burnus <burnus@net-b.de>
738928be 2318
2319 PR/fortran 25829
2320 * symbol.c (check_conflict, gfc_copy_attr): Add
2321 ASYNCHRONOUS support.
2322 (gfc_add_asynchronous): New function.
2323 * decl.c (match_attr_spec): Add ASYNCHRONOUS support.
2324 (gfc_match_asynchronous): New function.
2325 * dump-parse-tree.c (show_attr): Add ASYNCHRONOUS support.
2326 * gfortran.h (symbol_attribute): New ASYNCHRONOUS bit.
2327 (gfc_add_asynchronous): New Prototype.
2328 * module.c (ab_attribute, mio_symbol_attribute): Add
2329 ASYNCHRONOUS support.
2330 * resolve.c (was_declared): Ditto.
2331 * match.h (gfc_match_asynchronous): New prototype.
2332 * parse.c (decode_specification_statement,decode_statement):
2333 Add ASYNCHRONOUS support.
2334
9c2eafdb 23352010-01-07 Tobias Burnus <burnus@net-b.de>
2336
2337 PR fortran/42597
2338 * trans-decl.c (get_proc_pointer_decl): Fix call to
2339 gfc_conv_initializer for array-valued proc-pointer funcs.
2340
908e9973 23412010-01-07 Tobias Burnus <burnus@net-b.de>
2342
2343 PR fortran/41872
2344 * trans-decl.c (gfc_trans_deferred_vars): Don't initialize
2345 allocatable scalars with SAVE attribute.
2346
a7bdd774 23472010-01-05 Tobias Burnus <burnus@net-b.de>
2348
2349 PR fortran/42517
2350 * options.c (gfc_post_options): Set -frecursion
2351 when -fopenmp is used.
2352
c1de3106 23532010-01-05 Tobias Burnus <burnus@net-b.de>
2354
2355 PR fortran/41872
2356 * trans-expr.c (gfc_conv_procedure_call): Nullify
2357 return value for allocatable-scalar character functions.
2358
c915853f 23592010-01-04 Tobias Burnus <burnus@net-b.de>
2360
2361 PR fortran/36161
2362 * error.c (error_printf, gfc_warning, gfc_notify_std,
2363 gfc_warning_now, gfc_error, gfc_error_now,
2364 gfc_fatal_error): Change argument name from nocmsgid to
2365 gmsgid to enable (x)gettext's % checking.
2366
ea657963 23672010-01-04 Tobias Burnus <burnus@net-b.de>
2368
2369 * trans-decl.c (gfc_trans_deferred_vars): Fix spelling.
2370
53169279 23712010-01-04 Tobias Burnus <burnus@net-b.de>
2372
2373 PR fortran/41872
2374 * trans-expr.c (gfc_conv_procedure_call): Add indirect ref
2375 for functions returning allocatable scalars.
2376 * trans-stmt.c (gfc_trans_allocate): Emmit error when
2377 reallocating an allocatable scalar.
2378 * trans.c (gfc_allocate_with_status): Fix pseudocode syntax
2379 in comment.
2380 * trans-decl.c (gfc_trans_deferred_vars): Nullify local
2381 allocatable scalars.
2382 (gfc_generate_function_code): Nullify result variable for
2383 allocatable scalars.
2384
2385 PR fortran/40849
2386 * module.c (gfc_use_module): Fix warning string to allow
2387 for translation.
2388
2389 PR fortran/42517
2390 * invoke.texi (-fcheck=recursion): Mention that the checking
2391 is also disabled for -frecursive.
2392 * trans-decl.c (gfc_generate_function_code): Disable
2393 -fcheck=recursion when -frecursive is used.
2394
2395 * intrinsic.texi (iso_c_binding): Improve wording.
7dfbd804 2396
2397\f
50d268b3 2398Copyright (C) 2010 Free Software Foundation, Inc.
7dfbd804 2399
2400Copying and distribution of this file, with or without modification,
2401are permitted in any medium without royalty provided the copyright
2402notice and this notice are preserved.