]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/fortran/ChangeLog
re PR fortran/37228 (F2008: Support g0.<d> edit descriptor)
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
CommitLineData
900e887f
JD
12008-09-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2
3 PR fortran/37228
4 * io.c (check_format): Allow specifying precision with g0 format.
5
52f49934
DK
62008-09-02 Daniel Kraft <d@domob.eu>
7
8 * gfortran.h (struct gfc_namespace): New member `implicit_loc'.
9 (gfc_add_abstract): New method.
10 * decl.c (gfc_get_type_attr_spec): Match ABSTRACT attribute.
11 (gfc_match_derived_decl): Copy abstract attribute in derived symbol.
12 * dump-parse-tree.c (show_attr): Show ABSTRACT attribute as `ABSTRACT'
13 only to allow for ABSTRACT types.
14 * parse.c (parse_interface): Use new gfc_add_abstract.
15 * primary.c (gfc_match_structure_constructor): Check that no ABSTRACT
16 type is constructed.
17 * resolve.c (resolve_typespec_used): New method.
18 (resolve_fl_derived): Check type in respect to ABSTRACT attribute and
19 check that no component is of an ABSTRACT type.
20 (resolve_symbol): Check that no symbol is of an ABSTRACT type.
21 (resolve_types): Check IMPLICIT declarations for ABSTRACT types.
22 * symbol.c (gfc_merge_new_implicit): Remember loci of IMPLICIT's.
23 (gfc_add_abstract): New method.
24
3e1e5626
DK
252008-09-01 Daniel Kraft <d@domob.eu>
26
27 PR fortran/37193
28 * module.c (read_module): Initialize use_only flag on used symbols.
29
a64a8f2f
DK
302008-09-01 Daniel Kraft <d@domob.eu>
31
32 * gfc-internals.texi (F2003 OOP), (Type-bound Procedures): New chapter
33 and section to document the internals of type-bound procedures.
34 (gfc_expr): Document EXPR_COMPCALL.
35 * gfortran.h (struct gfc_expr): Remove unused `derived' from compcall.
36 * dump-parse-tree.c (show_compcall): New method.
37 (show_expr): Call it for EXPR_COMPCALL.
38 (show_typebound), (show_f2k_derived): New methods.
39 (show_symbol): Call show_f2k_derived.
40 (show_code_node): Handle EXEC_COMPCALL.
41 * primary.c (gfc_match_varspec): Don't initialize removed `derived' in
42 primary->value.compcall.
43
eb829078
RG
442008-08-31 Richard Guenther <rguenther@suse.de>
45
46 * trans-expr.c (gfc_trans_string_copy): Use the correct types
47 to compute slen and dlen.
48
e157f736
DK
492008-08-31 Daniel Kraft <d@domob.eu>
50
51 * gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
52 (struct gfc_tbp_generic): New type.
53 (struct gfc_typebound_proc): Removed `target' and added union with
54 `specific' and `generic' members; new members `overridden',
55 `subroutine', `function' and `is_generic'.
56 (struct gfc_expr): New members `derived' and `name' in compcall union
57 member and changed type of `tbp' to gfc_typebound_proc.
58 (gfc_compare_interfaces), (gfc_compare_actual_formal): Made public.
59 * match.h (gfc_typebound_default_access): New global.
60 (gfc_match_generic): New method.
61 * decl.c (gfc_match_generic): New method.
62 (match_binding_attributes): New argument `generic' and handle it.
63 (match_procedure_in_type): Mark matched binding as non-generic.
64 * interface.c (gfc_compare_interfaces): Made public.
65 (gfc_compare_actual_formal): Ditto.
66 (check_interface_1), (compare_parameter): Use new public names.
67 (gfc_procedure_use), (gfc_search_interface): Ditto.
68 * match.c (match_typebound_call): Set base-symbol referenced.
69 * module.c (binding_generic): New global array.
70 (current_f2k_derived): New global.
71 (mio_typebound_proc): Handle IO of GENERIC bindings.
72 (mio_f2k_derived): Record current f2k-namespace in current_f2k_derived.
73 * parse.c (decode_statement): Handle GENERIC statement.
74 (gfc_ascii_statement): Ditto.
75 (typebound_default_access), (set_typebound_default_access): Removed.
76 (gfc_typebound_default_access): New global.
77 (parse_derived_contains): New default-access implementation and handle
78 GENERIC statements encountered.
79 * primary.c (gfc_match_varspec): Adapted to new gfc_typebound_proc
80 structure and removed check for SUBROUTINE/FUNCTION from here.
81 * resolve.c (extract_compcall_passed_object): New method.
82 (update_compcall_arglist): Use it.
83 (resolve_typebound_static): Adapted to new gfc_typebound_proc structure.
84 (resolve_typebound_generic_call): New method.
85 (resolve_typebound_call): Check target is a SUBROUTINE and handle calls
86 to GENERIC bindings.
87 (resolve_compcall): Ditto (check for target being FUNCTION).
88 (check_typebound_override): Handle GENERIC bindings.
89 (check_generic_tbp_ambiguity), (resolve_typebound_generic): New methods.
90 (resolve_typebound_procedure): Handle GENERIC bindings and set new
91 attributes subroutine, function and overridden in gfc_typebound_proc.
92 (resolve_fl_derived): Ensure extended type is resolved before the
93 extending one is.
94 * st.c (gfc_free_statement): Fix bug with free'ing EXEC_COMPCALL's.
95 * symbol.c (gfc_find_typebound_proc): Adapt for GENERIC changes.
96
041f300d
JH
972008-08-29 Jan Hubicka <jh@suse.cz>
98
8bcf15f6 99 * parse.c (parse_interface): Silence uninitialized var warning.
041f300d 100
a64f5186
JJ
1012008-08-29 Jakub Jelinek <jakub@redhat.com>
102
de870512
JJ
103 * trans.h (struct lang_type): Add span.
104 (GFC_TYPE_ARRAY_SPAN): Define.
105 * trans-decl.c (gfc_get_symbol_decl): For subref array pointers,
106 copy TREE_STATIC from decl to span instead of setting it
107 unconditionally, set DECL_ARTIFICIAL, fix type of initializer
108 and set GFC_TYPE_ARRAY_SPAN on decl's type.
109 * trans-types.c (gfc_get_array_descr_info): If
110 GFC_TYPE_ARRAY_SPAN is non-NULL, use it as element size.
111
bd11e37d
JJ
112 * trans-decl.c (check_constant_initializer,
113 gfc_emit_parameter_debug_info): New functions.
114 (gfc_generate_module_vars, gfc_generate_function_code): Emit
115 PARAMETERs and unreferenced variables with initializers into
116 debug info.
117
9268ba9a
JJ
118 * gfortran.h (gfc_use_list): Add where field.
119 * module.c (use_locus): New static variable.
120 (gfc_match_use): Set it.
121 (gfc_use_module): Copy it to gfc_use_list's where field.
122 * trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts.
123 (gfc_trans_use_stmts): Set backend locus before calling the debug
124 hook. Allow non-VAR_DECLs to be created even for non-external
125 module. Don't emit anything so far for renames from different
126 modules.
127
714495cd
JJ
128 PR fortran/24790
129 * trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
130 PARM_DECLs with pointer or reference type.
131
25c29c56
JJ
132 * trans-decl.c (gfc_build_qualified_array): Build non-flat
133 array type for debug info purposes.
134
a64f5186
JJ
135 PR fortran/29635
136 PR fortran/23057
137 * f95-lang.c (gfc_init_ts): New function.
138 (LANG_HOOKS_INIT_TS): Define.
139 * gfortran.h (gfc_use_rename): New type, moved from module.c.
140 (gfc_get_use_rename): New macro, moved from module.c.
141 (gfc_use_list): New type.
142 (gfc_get_use_list): New macro.
143 (gfc_namespace): Add use_stmts field.
144 (gfc_free_use_stmts): New prototype.
145 * Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
146 * module.c (gfc_use_rename, gfc_get_use_rename): Moved to
147 gfortran.h.
148 (gfc_use_module): Chain the USE statement info to
149 ns->use_stmts.
150 (gfc_free_use_stmts): New function.
151 * symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
152 * trans.h (struct module_htab_entry): New type.
153 (gfc_find_module, gfc_module_add_decl): New functions.
154 * trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
155 the module, adjust DECL_CONTEXTs of module procedures and
156 call gfc_module_add_decl for them.
157 * trans-common.c (build_common_decl): Set DECL_IGNORED_P
158 on the common variable.
159 (create_common): Set DECL_IGNORED_P for use associated vars.
160 * trans-decl.c: Include debug.h.
161 (gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
162 modules.
163 (build_function_decl): Allow current_function_decl's context
164 to be a NAMESPACE_DECL.
165 (module_htab, cur_module): New variables.
166 (module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
167 module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
168 functions.
169 (gfc_create_module_variable): Adjust DECL_CONTEXTs of module
170 variables and types and call gfc_module_add_decl for them.
171 (gfc_generate_module_vars): Temporarily set cur_module.
172 (gfc_trans_use_stmts): New function.
173 (gfc_generate_function_code): Call it.
174 (gfc_generate_block_data): Set DECL_IGNORED_P on decl.
175 * trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
176 and TYPE_CONTEXT of module derived types.
177
8e1f752a
DK
1782008-08-28 Daniel Kraft <d@domob.eu>
179
180 * gfortran.h (enum expr_t): New value `EXPR_COMPCALL'.
181 (gfc_get_typebound_proc): New macro.
182 (struct gfc_expr): New union-member `compcall' for EXPR_COMPCALL.
183 (enum gfc_exec_op): New value `EXEC_COMPCALL'.
184 (gfc_find_typebound_proc): New argument.
185 (gfc_copy_ref), (gfc_match_varspec): Made public.
186 * decl.c (match_procedure_in_type): Use gfc_get_typebound_proc.
187 * expr.c (free_expr0), (gfc_copy_expr): Handle EXPR_COMPCALL.
188 (gfc_copy_ref): Made public and use new name.
189 (simplify_const_ref): Use new name of gfc_copy_ref.
190 (simplify_parameter_variable): Ditto.
191 (gfc_simplify_expr): gcc_unreachable for EXPR_COMPCALL.
192 * match.c (match_typebound_call): New method.
193 (gfc_match_call): Allow for CALL's to typebound procedures.
194 * module.c (binding_passing), (binding_overriding): New variables.
195 (expr_types): Add EXPR_COMPCALL.
196 (mio_expr): gcc_unreachable for EXPR_COMPCALL.
197 (mio_typebound_proc), (mio_typebound_symtree): New methods.
198 (mio_f2k_derived): Handle type-bound procedures.
199 * primary.c (gfc_match_varspec): Made public and parse trailing
200 references to type-bound procedures; new argument `sub_flag'.
201 (gfc_match_rvalue): New name and argument of gfc_match_varspec.
202 (match_variable): Ditto.
203 * resolve.c (update_arglist_pass): New method.
204 (update_compcall_arglist), (resolve_typebound_static): New methods.
205 (resolve_typebound_call), (resolve_compcall): New methods.
206 (gfc_resolve_expr): Handle EXPR_COMPCALL.
207 (resolve_code): Handle EXEC_COMPCALL.
208 (resolve_fl_derived): New argument to gfc_find_typebound_proc.
209 (resolve_typebound_procedure): Ditto and removed not-implemented error.
210 * st.c (gfc_free_statement): Handle EXEC_COMPCALL.
211 * symbol.c (gfc_find_typebound_proc): New argument `noaccess' and
212 implement access-checking.
213 * trans-expr.c (gfc_apply_interface_mapping_to_expr): gcc_unreachable
214 on EXPR_COMPCALL.
215 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Add missing break.
216 * trans-openmp.c (gfc_trans_omp_array_reduction): Add missing
217 intialization of ref->type.
218
b7fdeec9
JW
2192008-08-28 Janus Weil <janus@gcc.gnu.org>
220
221 PR fortran/37253
222 * module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
223 saving attr.procedure and attr.proc_ptr to the module file.
224
9d1210f4
DK
2252008-08-25 Daniel Kraft <d@domob.eu>
226
227 * gfortran.h (gfc_find_component): Add new arguments.
228 * parse.c (parse_derived_contains): Check if the derived-type containing
229 the CONTAINS section is SEQUENCE/BIND(C).
230 * resolve.c (resolve_typebound_procedure): Check for name collision with
231 components.
232 (resolve_fl_derived): Check for name collision with inherited
233 type-bound procedures.
234 * symbol.c (gfc_find_component): New arguments `noaccess' and `silent'.
235 (gfc_add_component): Adapt for new arguments.
236 * primary.c (match_varspec), (gfc_match_structure_constructor): Ditto.
237
8327f9c2
TB
2382008-08-24 Tobias Burnus <burnus@net-b.de>
239
240 PR fortran/37201
241 * decl.c (verify_bind_c_sym): Reject array/string returning
242 functions.
243
3a73a540
TB
2442008-08-24 Tobias Burnus <burnus@net-b.de>
245
246 PR fortran/37201
247 * trans-expr.c (gfc_conv_function_call): Add string_length
248 for character-returning bind(C) functions.
249
30b608eb
DK
2502008-08-24 Daniel Kraft <d@domob.eu>
251
252 * gfortran.h (gfc_typebound_proc): New struct.
253 (gfc_symtree): New member typebound.
254 (gfc_find_typebound_proc): Prototype for new method.
255 (gfc_get_derived_super_type): Prototype for new method.
256 * parse.h (gfc_compile_state): New state COMP_DERIVED_CONTAINS.
257 * decl.c (gfc_match_procedure): Handle PROCEDURE inside derived-type
258 CONTAINS section.
259 (gfc_match_end): Handle new context COMP_DERIVED_CONTAINS.
260 (gfc_match_private): Ditto.
261 (match_binding_attributes), (match_procedure_in_type): New methods.
262 (gfc_match_final_decl): Rewrote to make use of new
263 COMP_DERIVED_CONTAINS parser state.
264 * parse.c (typebound_default_access): New global helper variable.
265 (set_typebound_default_access): New callback method.
266 (parse_derived_contains): New method.
267 (parse_derived): Extracted handling of CONTAINS to new parser state
268 and parse_derived_contains.
269 * resolve.c (resolve_bindings_derived), (resolve_bindings_result): New.
270 (check_typebound_override), (resolve_typebound_procedure): New methods.
271 (resolve_typebound_procedures): New method.
272 (resolve_fl_derived): Call new resolving method for typebound procs.
273 * symbol.c (gfc_new_symtree): Initialize new member typebound to NULL.
274 (gfc_find_typebound_proc): New method.
275 (gfc_get_derived_super_type): New method.
276
d4b7d0f0
JW
2772008-08-23 Janus Weil <janus@gcc.gnu.org>
278
279 * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
280 fields "pointer", "allocatable", "dimension", "access".
281 Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
282 * interface.c (gfc_compare_derived_types): Ditto.
283 * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
284 * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
285 gfc_conv_structure): Ditto.
286 * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
287 gfc_get_component_attr,verify_bind_c_derived_type,
288 generate_isocbinding_symbol): Ditto.
289 * decl.c (build_struct): Ditto.
290 * dump-parse-tree.c (show_components): Ditto.
291 * trans-stmt.c (gfc_trans_deallocate): Ditto.
292 * expr.c (gfc_check_assign,gfc_check_pointer_assign,
293 gfc_default_initializer): Ditto.
294 * module.c (mio_component): Ditto.
295 * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
296 * resolve.c (has_default_initializer,resolve_structure_cons,
297 gfc_iso_c_func_interface,find_array_spec,resolve_ref,
298 resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
299 resolve_equivalence_derived): Ditto.
300 * trans-io.c (transfer_expr): Ditto.
301 * parse.c (parse_derived): Ditto.
302 * dependency.c (gfc_check_dependency): Ditto.
303 * primary.c (gfc_variable_attr): Ditto.
304
3434e9a4
TB
3052008-08-23 Tobias Burnus <burnus@net-b.de>
306
307 PR fortran/37076
308 * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
309
12ba225d
TB
3102008-08-23 Tobias Burnus <burnus@net-b.de>
311
312 PR fortran/37025
313 * target-memory.c (gfc_interpret_character): Support
314 kind=4 characters.
315
fee3292b
DK
3162008-08-22 Daniel Kraft <d@domob.eu>
317
318 PR fortran/30239
319 * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
320 type is re-declared but neither -pedantic nor -std=f* is given and so
321 this is no error.
322 * invoke.texi (-Wsurprising): Document this new behaviour.
323
3df684e2
DK
3242008-08-22 Daniel Kraft <d@domob.eu>
325
326 * gfortran.h (in_prefix): Removed from this header.
327 * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
328 * decl.c (in_prefix): Removed from here.
329 (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
330 * symbol.c (gfc_check_symbol_typed): Ditto.
331 * expr.c (check_typed_ns): New helper variable.
332 (expr_check_typed_help): New helper method.
333 (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
334 work, fixing a minor problem.
335 * match.c (gfc_matching_prefix): New variable.
336
f37e928c
DK
3372008-08-22 Daniel Kraft <d@domob.eu>
338
339 PR fortran/32095
340 PR fortran/34228
341 * gfortran.h (in_prefix): New global.
342 (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
343 * array.c (match_array_element_spec): Check that bounds-expressions
344 don't have symbols not-yet-typed in them.
345 * decl.c (var_element): Check that variable used is already typed.
346 (char_len_param_value): Check that expression does not contain
347 not-yet-typed symbols.
348 (in_prefix): New global.
349 (gfc_match_prefix): Record using `in_prefix' if we're at the moment
350 parsing a prefix or not.
351 * expr.c (gfc_expr_check_typed): New method.
352 * parse.c (verify_st_order): New argument to disable error output.
353 (check_function_result_typed): New helper method.
354 (parse_spec): Check that the function-result declaration, if given in
355 a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
356 parsed.
357 * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
358 a type associated to it, otherwise use the IMPLICIT rules or signal
359 an error.
360
509c9d60
MLI
3612008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
362
363 * f95-lang.c: Update all calls to pedwarn.
364
f34cf28d
DF
3652008-08-18 Daniel Franke <franke.daniel@gmail.com>
366
367 PR fortran/37032
368 * gfortran.texi: Document decision on include file handling in
369 preprocessed files.
370
6c397102
TB
3712008-08-16 Tobias Burnus <burnus@net-b.de>
372
373 PR fortran/36825
374 * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
375
dad80a1b
JD
3762008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
377
378 PR fortran/35863
379 * io.c (gfc_match_open): Enable UTF-8 in checks.
380 * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
381
beb4bd6c
JW
3822008-08-14 Janus Weil <janus@gcc.gnu.org>
383
384 PR fortran/36705
385 * symbol.c (check_conflict): Move conflict checks for (procedure,save)
386 and (procedure,intent) to resolve_fl_procedure.
387 * resolve.c (resolve_fl_procedure): Ditto.
388
71205d17
MLI
3892008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
390
391 PR 36901
392 * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
393 'pedwarn0'.
394
63a3341a
PT
3952008-08-09 Paul Thomas <pault@gcc.gnu.org>
396
397 PR fortran/37011
398 * symbol.c (gfc_add_extension): New function.
399 * decl.c (gfc_get_type_attr_spec): Call it.
400 (gfc_match_derived_decl): Set symbol extension attribute from
401 attr.extension.
402 * gfortran.h : Add prototype for gfc_add_extension.
403
e73f7547
MLI
4042008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
405
406 PR 28875
407 * options.c (set_Wall): Replace set_Wunused by warn_unused.
408
f6fad28e
DK
4092008-08-08 Daniel Kraft <d@domob.eu>
410
411 * gfortran.h (gfc_finalizer): Replaced member `procedure' by two
412 new members `proc_sym' and `proc_tree' to store the symtree after
413 resolution.
414 (gfc_find_sym_in_symtree): Made public.
415 * decl.c (gfc_match_final_decl): Adapted for new member name.
416 * interface.c (gfc_find_sym_in_symtree): Made public.
417 (gfc_extend_expr), (gfc_extend_assign): Changed call accordingly.
418 * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
419 New methods for module-file IO of f2k_derived.
420 (mio_symbol): Do IO of f2k_derived namespace.
421 * resolve.c (gfc_resolve_finalizers): Adapted for new member name and
422 finding the symtree for the symbol here.
423 * symbol.c (gfc_free_finalizer): Adapted for new members.
424
70b1e376
RW
4252008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
426
427 * gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as
428 Invariant Section.
429 * gfortran.texi: Likewise.
430 * intrinsic.texi: Do not list GPL as Invariant Section.
431 * invoke.texi: Likewise. Update copyright years.
432
7d1f1e61
PT
4332008-07-29 Paul Thomas <pault@gcc.gnu.org>
434
435 * trans-expr.c (conv_parent_component_references): New function
436 to build missing parent references.
437 (gfc_conv_variable): Call it
438 * symbol.c (gfc_add_component): Check that component name in a
439 derived type extension does not appear in parent.
440 (gfc_find_component): For a derived type extension, check if
441 the component appears in the parent derived type by calling
442 self. Separate errors for private components and private types.
443 * decl.c (match_data_constant): Add extra arg to call to
444 gfc_match_structure_constructor.
445 (check_extended_derived_type): New function to check that a
446 parent derived type exists and that it is OK for exension.
447 (gfc_get_type_attr_spec): Add extra argument 'name' and return
448 it if extends is specified.
449 (gfc_match_derived_decl): Match derived type extension and
450 build a first component of the parent derived type if OK. Add
451 the f2k namespace if not present.
452 * gfortran.h : Add the extension attribute.
453 * module.c : Handle attribute 'extension'.
454 * match.h : Modify prototypes for gfc_get_type_attr_spec and
455 gfc_match_structure_constructor.
456 * primary.c (build_actual_constructor): New function extracted
457 from gfc_match_structure_constructor and modified to call self
458 iteratively to build derived type extensions, when f2k named
459 components are used.
460 (gfc_match_structure_constructor): Do not throw error for too
461 many components if a parent type is being handled. Use
462 gfc_find_component to generate errors for non-existent or
463 private components. Iteratively call self for derived type
464 extensions so that parent constructor is built. If extension
465 and components left over, throw error.
466 (gfc_match_rvalue): Add extra arg to call to
467 gfc_match_structure_constructor.
468
469 * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
470 are the same symbol, aliassing does not matter.
471
e90acd93
JH
4722008-07-29 Jan Hubicka <jh@suse.cz>
473
474 * options.c (gfc_post_options): Do not set flag_no_inline.
475
1fbfb0e2
DK
4762008-07-29 Daniel Kraft <d@domob.eu>
477
478 PR fortran/36403
479 * trans-intrinsic.c (conv_generic_with_optional_char_arg): New method
480 to append a string-length even if the string argument is missing, e.g.
481 for EOSHIFT.
482 (gfc_conv_intrinsic_function): Call the new method for EOSHIFT, PACK
483 and RESHAPE.
484
17b1d2a0
KG
4852008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
486
487 * gfortran.h (try): Remove macro. Replace try with gfc_try
488 throughout.
489 * array.c: Likewise.
490 * check.c: Likewise.
491 * cpp.c: Likewise.
492 * cpp.h: Likewise.
493 * data.c: Likewise.
494 * data.h: Likewise.
495 * decl.c: Likewise.
496 * error.c: Likewise.
497 * expr.c: Likewise.
498 * interface.c: Likewise.
499 * intrinsic.c: Likewise.
500 * intrinsic.h: Likewise.
501 * io.c: Likewise.
502 * match.h: Likewise.
503 * parse.c: Likewise.
504 * parse.h: Likewise.
505 * resolve.c: Likewise.
506 * scanner.c: Likewise.
507 * simplify.c: Likewise.
508 * symbol.c: Likewise.
509 * trans-openmp.c: Likewise.
510 * trans-types.c: Likewise.
511
8604e2cf
TB
5122008-07-28 Tobias Burnus <burnus@net-b.de>
513
514 * Make-lang.in: Remove -Wno-* from fortran-warn.
515
726a989a
RB
5162008-07-28 Richard Guenther <rguenther@suse.de>
517
518 Merge from gimple-tuples-branch.
519
520 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
521
522 * trans-expr.c: Include gimple.h instead of tree-gimple.h.
523 * trans-array.c: Same.
524 * trans-openmp.c: Same.
525 * trans-stmt.c: Same.
526 * f95-lang.c: Same.
527 * trans-io.c: Same.
528 * trans-decl.c: Same.
529 * trans-intrinsic.c: Same.
530 * trans.c: Same. Include tree-iterator.h.
531 * Make-lang.in (trans.o): Depend on tree-iterator.h
532
533 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
534
535 * trans-array.h (gfc_conv_descriptor_data_set_internal):
536 Rename to gfc_conv_descriptor_data_set.
537 (gfc_conv_descriptor_data_set_tuples): Remove.
538 * trans-array.c (gfc_conv_descriptor_data_get): Rename
539 from gfc_conv_descriptor_data_set_internal.
540 Remove last argument to gfc_add_modify.
541 (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
542 gfc_add_modify.
543 (gfc_trans_create_temp_array): Same.
544 (gfc_conv_array_transpose): Same.
545 (gfc_grow_array): Same.
546 (gfc_put_offset_into_var): Same.
547 (gfc_trans_array_ctor_element): Same.
548 (gfc_trans_array_constructor_subarray): Same.
549 (gfc_trans_array_constructor_value): Same.
550 (gfc_trans_scalarized_loop_end): Same.
551 (gfc_array_init_size): Same.
552 (gfc_array_allocate): Same.
553 (gfc_trans_array_bounds): Same.
554 (gfc_trans_auto_array_allocation): Same.
555 (gfc_trans_g77_array): Same.
556 (gfc_trans_dummy_array_bias): Same.
557 (gfc_conv_expr_descriptor): Same.
558 (structure_alloc_comps): Same.
559 * trans-expr.c: Same.
560 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
561 Rename gfc_conv_descriptor_data_set_tuples to
562 gfc_conv_descriptor_data_set.
563 (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
564 build2_v.
565 (gfc_omp_clause_assign_op): Same.
566 (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
567 gfc_add_modify.
568 (gfc_trans_omp_atomic): Same.
569 (gfc_trans_omp_do): Same. Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
570 Rename gfc_add_modify_stmt to gfc_add_modify.
571 * trans-stmt.c: Rename gfc_add_modify_expr to
572 gfc_add_modify.
573 * trans.c: Rename gfc_add_modify_expr to
574 gfc_add_modify.
575 (gfc_add_modify): Remove last argument.
576 Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
577 * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
578 Add prototype for gfc_add_modify.
579 * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
580 * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
581 * trans-io.c: Same.
582 * trans-intrinsic.c: Same.
583
584 2008-02-25 Aldy Hernandez <aldyh@redhat.com>
585
586 * Make-lang.in (fortran-warn): Add -Wno-format.
587
588 2008-02-19 Diego Novillo <dnovillo@google.com>
589
590 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
591
592 * fortran/Make-lang.in (fortran-warn): Remove.
593
594 2007-11-22 Aldy Hernandez <aldyh@redhat.com>
595
596 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
597 memset.
598
599 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
600
601 * Make-lang.in (fortran-warn): Set to -Wno-format.
602 * trans.c (gfc_trans_code): Update comment to say GENERIC.
603 Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
604
0d52899f
TB
6052008-07-27 Tobias Burnus <burnus@net-b.de>
606
607 PR fortran/36132
608 PR fortran/29952
609 PR fortran/36909
610 * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
611 run-time error.
612 * trans.h (gfc_trans_runtime_check): Update declaration.
613 * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
614 gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
615 Updated gfc_trans_runtime_check calls.
616 (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
617 fix packing/unpacking for nonpresent optional actuals to optional
618 formals.
619 * trans-array.h (gfc_conv_array_parameter): Update declaration.
620 * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
621 gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
622 (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
623 * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
624 calls.
625 * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
626 (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
627 gfc_conv_array_parameter.
628 * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
629 * trans-decl.c (gfc_build_builtin_function_decls): Add
630 gfor_fndecl_runtime_warning_at.
631 * lang.opt: New option fcheck-array-temporaries.
632 * gfortran.h (gfc_options): New flag_check_array_temporaries.
633 * options.c (gfc_init_options, gfc_handle_option): Handle flag.
634 * invoke.texi: New option fcheck-array-temporaries.
635
7e8b322a
JH
6362008-07-24 Jan Hubicka <jh@suse.cz>
637
638 * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
639
c3005b0f
DK
6402008-07-24 Daniel Kraft <d@domob.eu>
641
642 PR fortran/33141
643 * lang.opt (Wnonstd-intrinsics): Removed option.
644 (Wintrinsics-std), (Wintrinsic-shadow): New options.
645 * invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
646 from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
647 (Error and Warning Options): Documented the new options and removed
648 the documentation for -Wnonstd-intrinsics.
649 * gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
650 warn_intrinsics_std, removed warn_nonstd_intrinsics.
651 (gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
652 (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
653 * decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
654 the new name gfc_is_intrinsic.
655 (warn_intrinsic_shadow): New helper method.
656 (gfc_match_function_decl), (gfc_match_subroutine): Call the new method
657 warn_intrinsic_shadow to check the just-parsed procedure.
658 * expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
659 the function called is really an intrinsic in the selected standard.
660 * intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
661 extended to take into account the selected standard settings when trying
662 to find out whether a symbol is an intrinsic or not.
663 (gfc_check_intrinsic_standard): Made public and extended.
664 (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
665 the calls to check_intrinsic_standard, this check now happens inside
666 gfc_is_intrinsic.
667 (gfc_warn_intrinsic_shadow): New method defined.
668 * options.c (gfc_init_options): Initialize new warning flags to false
669 and removed intialization of Wnonstd-intrinsics flag.
670 (gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
671 (set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
672 (gfc_handle_option): Handle the new flags and removed handling of the
673 old Wnonstd-intrinsics flag.
674 * primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
675 the new name gfc_is_intrinsic.
676 * resolve.c (resolve_actual_arglist): Ditto.
677 (resolve_generic_f), (resolve_unknown_f): Ditto.
678 (is_external_proc): Ditto.
679 (resolve_generic_s), (resolve_unknown_s): Ditto.
680 (resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
681 they are really available in the selected standard setting.
682
befdf741
DK
6832008-07-24 Daniel Kraft <d@domob.eu>
684
685 * match.c (gfc_match): Add assertion to catch wrong calls trying to
686 match upper-case characters.
687
bdfd2ff0
TK
6882008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
689
690 PR fortran/29952
691 * gfortran.h: Add "warn_array_temp" to gfc_option_t.
692 * lang.opt: Add -Warray-temporaries.
693 * invoke.texi: Document -Warray-temporaries
694 * trans-array.h (gfc_trans_create_temp_array): Add argument of
695 type *locus.
696 (gfc_conv_loop_setup): Likewise.
697 * trans-array.c (gfc_trans_create_temp_array): If
698 -Warray-temporaries is given and locus is present, warn about
699 creation of array temporaries.
700 (gfc_trans_array_constructor_subarray): Add locus to call
701 of gfc_conv_loop_setup.
702 (gfc_trans_array_constructor): Add where argument. Pass where
703 argument to call of gfc_trans_create_temp_array.
704 (gfc_add_loop_ss_code): Add where argument. Pass where argument
705 to recursive call of gfc_add_loop_ss_code and to call of
706 gfc_trans_array_constructor.
707 (gfc_conv_loop_setup): Add where argument. Pass where argument
708 to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
709 (gfc_conv_expr_descriptor): Pass location to call of
710 gfc_conv_loop_setup.
711 (gfc_conv_array_parameter): If -Warray-temporaries is given,
712 warn about creation of temporary arrays.
713 * trans-expr.c (gfc_conv_subref_array_arg): Add where argument
714 to call to gfc_conv_loop_setup.
715 (gfc_conv_function_call): Add where argument to call to
716 gfc_trans_creat_temp_array.
717 (gfc_trans_subarray_assign): Likewise.
718 (gfc_trans_assignment_1): Add where argument to call to
719 gfc_conv_loop_setup.
720 * trans-stmt.c (gfc_conv_elemental_dependencies): Add where
721 argument to call to gfc_trans_create_temp_array.
722 (gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
723 (generate_loop_for_temp_to_lhs): Likewise.
724 (generate_loop_for_rhs_to_temp): Likewise.
725 (compute_inner_temp_size): Likewise.
726 (gfc_trans-pointer_assign_need_temp): Likewise.
727 (gfc_evaluate_where_mask): Likewise.
728 (gfc_trans_where_assign): Likewise.
729 (gfc_trans_where_3): Likewise.
730 * trans-io.c (transfer_srray_component): Add where argument
731 to function. Add where argument to call to gfc_conv_loop_setup.
732 (transfer_expr): Add where argument to call to
733 transfer_array_component.
734 (gfc_trans_transfer): Add where expression to call to
735 gfc_conv_loop_setup.
736 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
737 where argument to call to gfc_conv_loop_setup.
738 (gfc_conv_intrinsic_count): Likewise.
739 (gfc_conv_intrinsic_arith): Likewise.
740 (gfc_conv_intrinsic_dot_product): Likewise.
741 (gfc_conv_intrinsic_minmaxloc): Likewise.
742 (gfc_conv_intrinsic_minmaxval): Likewise.
743 (gfc_conv_intrinsic_array_transfer): Warn about
744 creation of temporary array.
745 Add where argument to call to gfc_trans_create_temp_array.
746 * options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
747 (gfc_handle_option): Set gfc_option.warn_array_temp.
748
fcf73884
MLI
7492008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
750
751 PR 35058
752 * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
753
9cad01ce
DK
7542008-07-22 Daniel Kraft <d@domob.eu>
755
756 PR fortran/29835
757 * io.c (error_element), (format_locus): New static globals.
758 (unexpected_element): Spelled out this message fully.
759 (next_char): Keep track of locus when not MODE_STRING.
760 (next_char_not_space): Remember last parsed element in error_element.
761 (format_lex): Fix two indentation errors.
762 (check_format): Use format_locus and possibly error_element for a
763 slightly better error message on invalid format.
764 (check_format_string): Set format_locus to start of the string
765 expression used as format.
766
df2fba9e
RW
7672008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
768
769 * expr.c (gfc_check_pointer_assign): Fix typo in string.
770 * io.c (check_format): Fix typo in string. Fix comment typos.
771 * parse.c (gfc_global_used): Likewise.
772 * resolve.c (resolve_allocate_expr): Likewise.
773 * symbol.c (gfc_set_default_type): Likewise.
774 * arith.c: Fix typos in comments.
775 * array.c: Likewise.
776 * data.c: Likewise.
777 * decl.c: Likewise.
778 * dependency.c: Likewise.
779 * f95-lang.c: Likewise.
780 * gfortran.h: Likewise.
781 * matchexp.c: Likewise.
782 * module.c: Likewise.
783 * primary.c: Likewise.
784 * scanner.c: Likewise.
785 * trans-array.c: Likewise.
786 * trans-common.c: Likewise.
787 * trans-decl.c: Likewise.
788 * trans-expr.c: Likewise.
789 * trans-intrinsic.c: Likewise.
790 * trans-types.c: Likewise.
791 * trans.c: Likewise.
792 * trans.h: Likewise.
793
5e2be41f
TB
7942008-07-19 Tobias Burnus <burnus@net-b.de>
795
796 PR fortran/36795
797 * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
798 which caused the generation of wrong code.
799
e513a086
TB
8002008-07-19 Tobias Burnus <burnus@net-b.de>
801
802 PR fortran/36342
803 * scanner.c (load_file): Add argument to destinguish between
804 true filename and displayed filename.
805 (include_line,gfc_new_file): Adapt accordingly.
806
d1a296c1
TB
8072008-07-19 Tobias Burnus <burnus@net-b.de>
808
809 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
810 checks for cshift's shift and eoshift's shift and boundary args.
811 (gfc_check_unpack): Add rank and shape tests for unpack.
812
7b901ac4
KG
8132008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
814
815 * gfortran.h (new): Remove macro.
816 * array.c (gfc_append_constructor, match_array_list,
817 gfc_match_array_constructor): Likewise.
818 * bbt.c (insert, gfc_insert_bbt): Likewise.
819 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
820 get_proc_name): Likewise.
821 * expr.c (gfc_copy_actual_arglist): Likewise.
822 * interface.c (compare_actual_formal, check_new_interface,
823 gfc_add_interface): Likewise.
824 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
825 Likewise.
826 * io.c (match_io_iterator, match_io_list): Likewise.
827 * match.c (match_forall_header): Likewise.
828 * matchexp.c (build_node): Likewise.
829 * module.c (gfc_match_use): Likewise.
830 * scanner.c (load_file): Likewise.
831 * st.c (gfc_append_code): Likewise.
832 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
833 gfc_commit_symbols): Likewise.
834 * trans-common.c (build_field): Likewise.
835 * trans-decl.c (gfc_finish_var_decl): Likewise.
836 * trans-expr.c (gfc_free_interface_mapping,
837 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
838 gfc_finish_interface_mapping,
839 gfc_apply_interface_mapping_to_expr): Likewise.
840 * trans.h (gfc_interface_sym_mapping): Likewise.
841
a1ee985f
KG
8422008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
843
844 * gfortran.h (operator): Remove macro.
845 (gfc_namespace, gfc_expr): Avoid C++ keywords.
846 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
847 Likewise.
848 * decl.c (access_attr_decl): Likewise.
849 * dependency.c (gfc_dep_compare_expr): Likewise.
850 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
851 Likewise.
852 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
853 simplify_intrinsic_op, check_intrinsic_op): Likewise.
854 * interface.c (fold_unary, gfc_match_generic_spec,
855 gfc_match_interface, gfc_match_end_interface,
856 check_operator_interface, check_uop_interfaces,
857 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
858 gfc_add_interface, gfc_current_interface_head,
859 gfc_set_current_interface_head): Likewise.
860 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
861 Likewise.
862 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
863 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
864 number_use_names, mio_expr, load_operator_interfaces, read_module,
865 write_operator, write_module): Likewise.
866 * openmp.c (resolve_omp_atomic): Likewise.
867 * resolve.c (resolve_operator, gfc_resolve_character_operator,
868 gfc_resolve_uops): Likewise.
869 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
870 * trans-expr.c (gfc_conv_expr_op): Likewise.
871 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
872
9aa433c2
KG
8732008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
874
875 * gfortran.h (protected): Remove macro.
876 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
877 * expr.c (gfc_check_pointer_assign): Likewise.
878 * interface.c (compare_parameter_protected): Likewise.
879 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
880 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
881 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
882 add_sym_5s): Likewise.
883 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
884 Likewise.
885 * module.c (mio_symbol_attribute): Likewise.
886 * primary.c (match_variable): Likewise.
887 * resolve.c (resolve_equivalence): Likewise.
888 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
889 Likewise.
890 * trans-types.c (gfc_get_array_type_bounds): Likewise.
891
8b11b59f
KG
8922008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
893
894 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
895 * gfortran.h (try, protected, operator, new): Likewise.
896
bdad0683
TB
8972008-07-17 Tobias Burnus <burnus@net-b.de>
898
899 PR fortran/36825
900 PR fortran/36824
901 * array.c (gfc_match_array_spec): Fix array-rank check.
902 * resolve.c (resolve_fl_derived): Fix constentness check
903 for the array dimensions.
904
e63ea00c
RW
9052008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
906
907 * Make-lang.in (gfortranspec.o): Fix dependencies.
908
41d6f399
JD
9092008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
910
911 PR fortran/36725
912 * io.c: Add error check for g0 edit descriptor followed by '.'.
913
4b156631
DK
9142008-07-12 Daniel Kraft <d@domob.eu>
915
916 * resolve.c (resolve_fl_derived): Allow pointer components to empty
917 derived types fixing a missing part of PR fortran/33221.
918
b1caaefc
DK
9192008-07-10 Daniel Kraft <d@domob.eu>
920
921 * gfc-internals.texi (section gfc_expr): Created documentation about
922 the gfc_expr internal data structure.
923
27696218
TK
9242008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
925
926 PR fortran/36670
927 * iresolve.c (gfc_resolve_product): Set shape of return
928 value from array.
929 (gfc_resolve_sum): Likewise.
930
77092cda
JJ
9312008-07-07 Jakub Jelinek <jakub@redhat.com>
932
933 PR middle-end/36726
934 * f95-lang.c (poplevel): Don't ever add subblocks to
935 global_binding_level.
936
8fb74da4
JW
9372008-07-02 Janus Weil <janus@gcc.gnu.org>
938 Tobias Burnus <burnus@net-b.de>
939 Paul Thomas <pault@gcc.gnu.org>
940
941 PR fortran/32580
942 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
943 * check.c (gfc_check_associated,gfc_check_null): Implement
944 procedure pointers.
945 * decl.c (match_procedure_decl): Ditto.
946 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
947 * interface.c (compare_actual_formal): Ditto.
948 * match.h: Ditto.
949 * match.c (gfc_match_pointer_assignment): Ditto.
950 * parse.c (parse_interface): Ditto.
951 * primary.c (gfc_match_rvalue,match_variable): Ditto.
952 * resolve.c (resolve_fl_procedure): Ditto.
953 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
954 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
955 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
956 create_function_arglist): Ditto.
957 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
958 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
959
04f2b606
TK
9602008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
961
962 PR fortran/36590
963 PR fortran/36681
964 * iresolve.c (resolve_mask_arg): Don't convert mask to
965 kind=1 logical if it is of that type already.
966
986a8d11
TK
9672008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
968
969 PR fortran/36341
970 * iresolve.c (gfc_resolve_matmul): Copy shapes
971 from arguments.
972
082b0571
JD
9732008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
974
975 * invoke.texi: Add documentation for runtime behavior of
976 -fno-range-check.
977
b66c86cb
DK
9782008-06-28 Daniel Kraft <d@domob.eu>
979
980 * gfc-internals.texi (section gfc_code): Extended documentation about
981 gfc_code in the internal datastructures chapter including details about
982 how IF, DO and SELECT blocks look like and an example for how the
983 block-chaining works.
984
811d3cd3
PT
9852008-06-25 Paul Thomas <pault@gcc.gnu.org>
986
987 PR fortran/36526
988 * interface.c (check_intents): Correct error where the actual
989 arg was checked for a pointer argument, rather than the formal.
990
c4e3543d
PT
9912008-06-24 Paul Thomas <pault@gcc.gnu.org>
992
993 PR fortran/34371
994 * expr.c (gfc_check_assign): Change message and locus for
995 error when conform == 0.
996
94b12901
JJ
9972008-06-23 Jakub Jelinek <jakub@redhat.com>
998
999 PR fortran/36597
1000 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
1001
95213750
LB
10022008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1003 Tobias Burnus <burnus@net-b.de>
1004
1005 PR fortran/34908
1006 PR fortran/36276
1007 * scanner.c (preprocessor_line): do not call gfc_free for
1008 current_file->filename if it differs from filename.
1009
ece3f663
KG
10102008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1011
1012 * arith.c (hollerith2representation): Fix for -Wc++-compat.
1013 * array.c (gfc_get_constructor): Likewise.
1014 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
1015 create_enum_history, gfc_match_final_decl): Likewise.
1016 * error.c (error_char): Likewise.
1017 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
1018 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
1019 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
1020 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
1021 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
1022 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
1023 gfc_get_alloc, gfc_get_wide_string): Likewise.
1024 * interface.c (count_types_test): Likewise.
1025 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
1026 Likewise.
1027 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
1028 gfc_match_inquire, gfc_match_wait): Likewise.
1029 * match.c (gfc_match, match_forall_iterator): Likewise.
1030 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
1031 add_true_name, parse_string, write_atom, quote_string,
1032 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
1033 * options.c (gfc_post_options): Likewise.
1034 * primary.c (match_integer_constant, match_hollerith_constant,
1035 match_boz_constant, match_real_constant,
1036 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
1037 * scanner.c (gfc_widechar_to_char, add_path_to_list,
1038 add_file_change, load_line, get_file, preprocessor_line,
1039 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
1040 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
1041 gfc_simplify_ishftc): Likewise.
1042 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
1043 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
1044 Likewise.
1045 * target-memory.c (gfc_target_interpret_expr): Likewise.
1046 * trans-const.c (gfc_build_wide_string_const): Likewise.
1047 * trans-expr.c (gfc_add_interface_mapping): Likewise.
1048 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1049 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
1050 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
1051 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1052 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
1053 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
1054 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
1055 * trans.c (gfc_get_backend_locus): Likewise.
1056 * trans.h (gfc_get_ss): Likewise.
1057
d2848082
DK
10582008-06-18 Daniel Kraft <d@domob.eu>
1059
1060 PR fortran/36517, fortran/36492
1061 * array.c (gfc_resolve_character_array_constructor): Call
1062 gfc_set_constant_character_len with changed length-chec argument.
1063 * decl.c (gfc_set_constant_character_len): Changed array argument to
1064 be a generic length-checking argument that can be used for correct
1065 checking with typespec and in special cases where the should-be length
1066 is different from the target length.
1067 (build_struct): Call gfc_set_constant_character_len with changed length
1068 checking argument and introduced additional checks for exceptional
1069 conditions on invalid code.
1070 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
1071 with changed argument.
1072 * match.h (gfc_set_constant_character_len): Changed third argument to
1073 int for the should-be length rather than bool.
1074
88fec49f
DK
10752008-06-17 Daniel Kraft <d@domob.eu>
1076
1077 PR fortran/36112
1078 * array.c (gfc_resolve_character_array_constructor): Check that all
1079 elements with constant character length have the same one rather than
1080 fixing it if no typespec is given, emit an error if they don't. Changed
1081 return type to "try" and return FAILURE for the case above.
1082 (gfc_resolve_array_constructor): Removed unneeded call to
1083 gfc_resolve_character_array_constructor in this function.
1084 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
1085 * trans-array.c (get_array_ctor_strlen): Return length of first element
1086 rather than last element.
1087 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
1088 gfc_resolve_character_array_constructor.
1089
9d5c21c1
PT
10902008-06-17 Paul Thomas <pault@gcc.gnu.org>
1091
1092 PR fortran/34396
1093 * resolve.c (add_dt_to_dt_list): New function.
1094 (resolve_fl_derived): Call new function for pointer components
1095 and when derived type resolved.
1096
a60658ba
JD
10972008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1098
1099 PR fortran/36515
1100 * trans-decl.c (gfc_generate_function_code): Add range_check to options
1101 array.
1102
6ccde948
RW
11032008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1104
1105 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
1106 * gfortran.texi: Likewise.
1107 * intrinsic.texi: Likewise.
1108 * invoke.texi: Likewise.
1109
8a221914
JD
11102008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1111
1112 PR fortran/35863
1113 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
1114 transfer_character_wide which includes passing in the character kind to
1115 support wide character IO. (transfer_expr): If the kind == 4, create the
1116 argument and build the call.
1117 * gfortran.texi: Fix typo.
1118
357ad64f
TB
11192008-06-13 Tobias Burnus <burnus@net-b.de>
1120
1121 PR fortran/36476
1122 * decl.c (do_parm): Handle init expression for len=*.
1123
f5dce797
TB
11242008-06-12 Tobias Burnus <burnus@net-b.de>
1125
1126 PR fortran/36462
1127 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
1128 Fix passing of the BACK= argument.
1129
a1968bf9
JD
11302008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1131
1132 * cpp.c: Add copyright notice.
1133 * cpp.h: Add copyright notice.
1134
c1db9545
JW
11352008-06-08 Janus Weil <janus@gcc.gnu.org>
1136
1137 PR fortran/36459
1138 * decl.c (match_procedure_decl): Correctly recognize if the interface
1139 is an intrinsic procedure.
1140
2d9bbb6b
TB
11412008-06-08 Tobias Burnus <burnus@net-b.de>
1142
1143 PR fortran/35830
1144 * resolve.c (resolve_symbol): Copy more attributes for
1145 PROCEDUREs with interfaces.
1146
8955a005
JD
11472008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1148
29d3b5ff
JD
1149 PR fortran/36420
1150 PR fortran/36422
8955a005
JD
1151 * io.c (check_format): Add new error message for zero width.
1152 Use new error message for FMT_A and with READ, FMT_G. Allow
1153 FMT_G with WRITE except when -std=F95 and -std=F2003.
1154
8d82b242
TB
11552008-06-07 Tobias Burnus <burnus@net-b.de>
1156
8cec30d3 1157 PR fortran/36437
8d82b242
TB
1158 * intrinsic.c (add_functions): Implement c_sizeof.
1159 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
1160 create unneeded variable in the scalar case.
1161 * intrinsic.texi: Add C_SIZEOF documentation.
1162
41870ac5
TB
11632008-06-06 Tobias Burnus <burnus@net-b.de>
1164
1165 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
1166
a68ab351
JJ
11672008-06-06 Jakub Jelinek <jakub@redhat.com>
1168
1169 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
1170 * parse.c (next_free): Allow tab after !$omp.
1171 (decode_omp_directive): Handle !$omp task, !$omp taskwait
1172 and !$omp end task.
1173 (case_executable): Add ST_OMP_TASKWAIT.
1174 (case_exec_markers): Add ST_OMP_TASK.
1175 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
1176 ST_OMP_TASKWAIT.
1177 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
1178 * gfortran.h (gfc_find_sym_in_expr): New prototype.
1179 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
1180 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
1181 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
1182 untied fields.
1183 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1184 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1185 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
1186 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
1187 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
1188 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1189 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
1190 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
1191 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
1192 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1193 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1194 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
1195 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
1196 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
1197 than boolean_type_node.
1198 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
1199 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
1200 untied and collapse clauses.
1201 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1202 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
1203 EXEC_OMP_TASKWAIT.
1204 * st.c (gfc_free_statement): Likewise.
1205 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
1206 (find_sym_in_expr): Rename to...
1207 (gfc_find_sym_in_expr): ... this. No longer static.
1208 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
1209 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
1210 prototypes.
1211 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
1212 firstprivate, lastprivate, reduction, copyprivate and copyin
1213 clauses.
1214 (omp_current_do_code): Made static.
1215 (omp_current_do_collapse): New variable.
1216 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
1217 clear omp_current_do_code and omp_current_do_collapse on return.
1218 (gfc_resolve_do_iterator): Handle collapsed do loops.
1219 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
1220 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
1221 (gfc_match_omp_clauses): Handle default (firstprivate),
1222 schedule (auto), untied and collapse (n) clauses.
1223 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
1224 (OMP_TASK_CLAUSES): Define.
1225 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
1226 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
1227 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
1228 arrays allocate them with the bounds of the outer var if outer
1229 var is allocated.
1230 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1231 gfc_omp_clause_dtor): New functions.
1232 (gfc_trans_omp_array_reduction): If decl is allocatable array,
1233 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
1234 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
1235 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1236 for assumed-size arrays.
1237 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
1238 present in lastprivate clause and do loop isn't simple,
1239 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
1240 parallel's lastprivate clause, change it to shared and add
1241 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
1242 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
1243 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
1244 OMP_FOR from OMP_PARALLEL.
1245 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
1246 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
1247 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
1248 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
1249 EXEC_OMP_TASKWAIT.
1250
7db5da56
JW
12512008-06-04 Janus Weil <janus@gcc.gnu.org>
1252
1253 PR fortran/36322
1254 PR fortran/36275
1255 * resolve.c (resolve_symbol): Correctly copy the interface for a
1256 PROCEDURE declaration.
1257
e62532af
JW
12582008-06-02 Janus Weil <janus@gcc.gnu.org>
1259
1260 PR fortran/36361
1261 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
1262 gfc_add_explicit_interface): Added checks.
1263 * decl.c (attr_decl1): Added missing "var_locus".
1264 * parse.c (parse_interface): Checking for errors.
1265
34523524
DK
12662008-06-02 Daniel Kraft <d@domob.eu>
1267
1268 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
1269 (struct gfc_symbol): New member f2k_derived.
1270 (struct gfc_namespace): New member finalizers, for use in the above
1271 mentioned f2k_derived namespace.
1272 (struct gfc_finalizer): New type defined for finalizers linked list.
1273 * match.h (gfc_match_final_decl): New function header.
1274 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
1275 constructed symbol node.
1276 (gfc_match_final_decl): New function to match a FINAL declaration line.
1277 * parse.c (decode_statement): match-call for keyword FINAL.
1278 (parse_derived): Parse CONTAINS section and accept FINAL statements.
1279 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
1280 in this case, check) a list of finalizer procedures.
1281 (resolve_fl_derived): Call gfc_resolve_finalizers here.
1282 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
1283 (gfc_free_namespace): Free finalizers list.
1284 (gfc_new_symbol): Initialize new f2k_derived to NULL.
1285 (gfc_free_symbol): Free f2k_derived namespace.
1286 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
1287 (gfc_free_finalizer_list): New function to free a linked list of
1288 gfc_finalizer nodes.
1289
1e60697f
DF
12902008-06-02 Daniel Franke <franke.daniel@gmail.com>
1291
1292 PR fortran/36375
1293 PR fortran/36377
1294 * cpp.c (gfc_cpp_init): Do not initialize builtins if
1295 processing already preprocessed input.
1296 (gfc_cpp_preprocess): Finalize output with newline.
1297
d2d586f9
JD
12982008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1299
1300 * intrinsic.texi: Revert wrong commit.
1301
7306494a
SK
13022008-05-31 Steven G. Kargl <kargls@comcast.net>
1303
1304 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
1305 Cleanup numerical inquiry function initialization.
1306 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
1307 a single mpfr_clears().
1308 (gfc_check_real_range): Re-arrange logic to eliminate multiple
1309 unnecessary branching and assignments.
1310 (gfc_arith_times): Use mpfr_clears() in preference to multiple
1311 mpfr_clear().
1312 (gfc_arith_divide): Ditto.
1313 (complex_reciprocal): Eliminate now unused variables a, re, im.
1314 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
1315 multiple mpfr_clear().
1316 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
1317 preference to multiple mpfr_clear().
1318 * simplify.c (gfc_simplify_and): Remove blank line.
1319 (gfc_simplify_atan2): Move error checking earlier to eliminate
1320 a now unnecessay gfc_free_expr().
1321 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
1322 (gfc_simplify_bessel_j1): Ditto.
1323 (gfc_simplify_bessel_jn): Ditto.
1324 (gfc_simplify_bessel_y0): Ditto.
1325 (gfc_simplify_bessel_y1): Ditto.
1326 (gfc_simplify_bessel_yn): Ditto.
1327 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
1328 combine nested if statement rational expressions.
1329 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
1330 mpfr_clear().
1331 (gfc_simplify_exp): Ditto.
1332 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
1333 special case of 0. Use mpfr_clears() in preference to multiple
1334 mpfr_clear().
1335 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
1336 (gfc_simplify_lgamma): Ditto.
1337 (gfc_simplify_log10): Ditto.
1338 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
1339 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
1340 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
1341 and term. Simplify the mpfr magic.
1342 (gfc_simplify_modulo): Ditto.
1343 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
1344 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
1345 mpfr_clear().
1346 (gfc_simplify_sin): Ditto
1347 (gfc_simplify_sqrt): Ditto
1348 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
1349 special case of 0. Use mpfr_clears() in preference to multiple
1350 mpfr_clear().
1351
c776a6d0
DF
13522008-05-29 Daniel Franke <franke.daniel@gmail.com>
1353
1354 PR target/36348
1355 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
1356
f2f5443c
FXC
13572008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1358
1359 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
1360 (gfc_read_orig_filename): Adjust call to load_line. Don't call
1361 ungetc.
1362 (load_file): Adjust call to load_line.
1363
e6895430
JW
13642008-05-28 Janus Weil <janus@gcc.gnu.org>
1365
1366 PR fortran/36325
1367 PR fortran/35830
1368 * interface.c (gfc_procedure_use): Enable argument checking for
1369 external procedures with explicit interface.
1370 * symbol.c (check_conflict): Fix conflict checking for externals.
1371 (copy_formal_args): Fix handling of arrays.
1372 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
1373 of intrinsics.
1374 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
1375 EXTERNAL attribute.
1376
691da334
FXC
13772008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1378
1379 PR fortran/36319
1380 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
1381 function as pure.
1382 * trans-array.c (gfc_trans_array_ctor_element): Divide element
1383 size by the size of one character to obtain length.
1384 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
1385 appropriate.
1386 (gfc_resolve_eoshift): Likewise.
1387 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
1388 (gfc_conv_intrinsic_fdate): Minor beautification.
1389 (gfc_conv_intrinsic_ttynam): Minor beautification.
1390 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
1391 (size_of_string_in_bytes): New function.
1392 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
1393 character expressions.
1394 (gfc_conv_intrinsic_sizeof): Likewise.
1395 (gfc_conv_intrinsic_array_transfer): Likewise.
1396 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
1397 beautification.
1398 (gfc_conv_intrinsic_repeat): Fix comment typo.
1399 * simplify.c (gfc_convert_char_constant): Take care of conversion
1400 of array constructors.
1401
795dc587
TB
14022008-05-27 Tobias Burnus <burnus@net-b.de>
1403
1404 PR fortran/36316
1405 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
1406 Add missing fold_convert.
1407
3c2a68b3
DF
14082008-05-26 Daniel Franke <franke.daniel@gmail.com>
1409
1410 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
1411 added FIXME instead.
1412
670637ee
DF
14132008-05-26 Daniel Franke <franke.daniel@gmail.com>
1414
1415 PR fortran/18428
1416 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
1417 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
1418 o, undef, v): New options.
1419 * options.c (gfc_init_options): Also initialize preprocessor
1420 options.
1421 (gfc_post_options): Also handle post-initialization of preprocessor
1422 options.
1423 (gfc_handle_option): Check if option is a preprocessor option.
1424 If yes, let gfc_cpp_handle_option() handle the option.
1425 * lang-specs.h: Reorganized to handle new options.
1426 * scanner.c (gfc_new_file): Read temporary file instead of
1427 input source if preprocessing is enabled.
1428 * f95-lang.c (gfc_init): Initialize preprocessor.
1429 (gfc_finish): Clean up preprocessor.
1430 * cpp.c: New.
1431 * cpp.h: New.
1432 * Make-lang.in: Added new objects and dependencies.
1433 * gfortran.texi: Updated section "Preprocessing and
1434 conditional compilation".
1435 * invoke.texi: Added new section "Preprocessing Options",
1436 listed and documented the preprocessing options handled
1437 by gfortran.
1438
5ec81069
TB
14392008-05-25 Tobias Burnus <burnus@net-b.de>
1440
1441 PR fortran/32600
1442 * trans-expr.c (gfc_conv_function_call): Remove library
1443 call for c_f_pointer with scalar Fortran pointers and for
1444 c_f_procpointer.
1445
31579a22
FXC
14462008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1447
1448 PR fortran/36257
1449 * iresolve.c (check_charlen_present): Don't force the rank to 1.
1450
16a55411
FXC
14512008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1452
1453 PR fortran/36265
1454 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
1455 the temporary variable.
1456
9e23c1aa
FXC
14572008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1458
1459 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
1460 result variable to avoid warnings.
1461
d393bbd7
FXC
14622008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1463
1464 * intrinsic.c (char_conversions, ncharconv): New static variables.
1465 (find_char_conv): New function.
1466 (add_functions): Add simplification functions for ADJUSTL and
1467 ADJUSTR. Don't check the kind of their argument. Add checking for
1468 LGE, LLE, LGT and LLT.
1469 (add_subroutines): Fix argument type for SLEEP. Fix argument name
1470 for SYSTEM.
1471 (add_char_conversions): New function.
1472 (gfc_intrinsic_init_1): Call add_char_conversions.
1473 (gfc_intrinsic_done_1): Free char_conversions.
1474 (check_arglist): Use kind == 0 as a signal that we don't want
1475 the kind value to be checked.
1476 (do_simplify): Also simplify character functions.
1477 (gfc_convert_chartype): New function
1478 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
1479 use of default character type.
1480 (gfc_trans_array_constructor_value): Likewise.
1481 (get_array_ctor_var_strlen): Use integer kind to build an integer
1482 instead of a character kind!
1483 (gfc_build_constant_array_constructor): Don't force the use of
1484 default character type.
1485 (gfc_conv_loop_setup): Likewise.
1486 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
1487 default character type. Allocate enough memory for wide strings.
1488 (gfc_conv_concat_op): Make sure operand kind are the same.
1489 (string_to_single_character): Remove gfc_ prefix. Reindent.
1490 Don't force the use of default character type.
1491 (gfc_conv_scalar_char_value): Likewise.
1492 (gfc_build_compare_string): Call string_to_single_character.
1493 (fill_with_spaces): New function
1494 (gfc_trans_string_copy): Add kind arguments. Use them to deal
1495 with wide character kinds.
1496 (gfc_conv_statement_function): Whitespace fix. Call
1497 gfc_trans_string_copy with new kind arguments.
1498 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
1499 instead of using gfc_widechar_to_char.
1500 (gfc_conv_string_parameter): Don't force the use of default
1501 character type.
1502 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
1503 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
1504 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
1505 * decl.c (gfc_set_constant_character_len): Don't assert the
1506 existence of a single character kind.
1507 * trans-array.h (gfc_trans_string_copy): New prototype.
1508 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
1509 New prototypes.
1510 * error.c (print_wide_char_into_buffer): New function lifting
1511 code from gfc_print_wide_char. Fix order to output '\x??' instead
1512 of 'x\??'.
1513 (gfc_print_wide_char): Call print_wide_char_into_buffer.
1514 (show_locus): Call print_wide_char_into_buffer with buffer local
1515 to this function.
1516 * trans-const.c (gfc_build_wide_string_const): New function.
1517 (gfc_conv_string_init): Deal with wide characters strings
1518 constructors.
1519 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
1520 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1521 (gfc_trans_character_select): Deal with wide strings.
1522 * expr.c (gfc_check_assign): Allow conversion between character
1523 kinds on assignment.
1524 * trans-const.h (gfc_build_wide_string_const): New prototype.
1525 * trans-types.c (gfc_get_character_type_len_for_eltype,
1526 gfc_get_character_type_len): Create too variants of the old
1527 gfc_get_character_type_len, one getting kind argument and the
1528 other one directly taking a type tree.
1529 * trans.h (gfor_fndecl_select_string_char4,
1530 gfor_fndecl_convert_char1_to_char4,
1531 gfor_fndecl_convert_char4_to_char1): New prototypes.
1532 * trans-types.h (gfc_get_character_type_len_for_eltype): New
1533 prototype.
1534 * resolve.c (resolve_operator): Exit early when kind mismatches
1535 are detected, because that makes us issue an error message later.
1536 (validate_case_label_expr): Fix wording of error message.
1537 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
1538 functions.
1539 (gfc_resolve_pack): Call _char4 variants of library function
1540 when dealing with wide characters.
1541 (gfc_resolve_reshape): Likewise.
1542 (gfc_resolve_spread): Likewise.
1543 (gfc_resolve_transpose): Likewise.
1544 (gfc_resolve_unpack): Likewise.
1545 * target-memory.c (size_character): Take character kind bit size
1546 correctly into account (not that it changes anything for now, but
1547 it's more generic).
1548 (gfc_encode_character): Added gfc_ prefix. Encoding each
1549 character of a string by calling native_encode_expr for the
1550 corresponding unsigned integer.
1551 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
1552 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
1553 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
1554 and gfor_fndecl_convert_char4_to_char1.
1555 * target-memory.h (gfc_encode_character): New prototype.
1556 * arith.c (gfc_check_character_range): New function.
1557 (eval_intrinsic): Allow non-default character kinds.
1558 * check.c (gfc_check_access_func): Only allow default
1559 character kind arguments.
1560 (gfc_check_chdir): Likewise.
1561 (gfc_check_chdir_sub): Likewise.
1562 (gfc_check_chmod): Likewise.
1563 (gfc_check_chmod_sub): Likewise.
1564 (gfc_check_lge_lgt_lle_llt): New function.
1565 (gfc_check_link): Likewise.
1566 (gfc_check_link_sub): Likewise.
1567 (gfc_check_symlnk): Likewise.
1568 (gfc_check_symlnk_sub): Likewise.
1569 (gfc_check_rename): Likewise.
1570 (gfc_check_rename_sub): Likewise.
1571 (gfc_check_fgetputc_sub): Likewise.
1572 (gfc_check_fgetput_sub): Likewise.
1573 (gfc_check_stat): Likewise.
1574 (gfc_check_stat_sub): Likewise.
1575 (gfc_check_date_and_time): Likewise.
1576 (gfc_check_ctime_sub): Likewise.
1577 (gfc_check_fdate_sub): Likewise.
1578 (gfc_check_gerror): Likewise.
1579 (gfc_check_getcwd_sub): Likewise.
1580 (gfc_check_getarg): Likewise.
1581 (gfc_check_getlog): Likewise.
1582 (gfc_check_hostnm): Likewise.
1583 (gfc_check_hostnm_sub): Likewise.
1584 (gfc_check_ttynam_sub): Likewise.
1585 (gfc_check_perror): Likewise.
1586 (gfc_check_unlink): Likewise.
1587 (gfc_check_unlink_sub): Likewise.
1588 (gfc_check_system_sub): Likewise.
1589 * primary.c (got_delim): Perform correct character range checking
1590 for all kinds.
1591 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
1592 calls to library functions convert_char4_to_char1 and
1593 convert_char1_to_char4 for character conversions.
1594 (gfc_conv_intrinsic_char): Allow all character kings.
1595 (gfc_conv_intrinsic_strcmp): Fix whitespace.
1596 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
1597 * intrinsic.texi: For all GNU intrinsics accepting character
1598 arguments, mention that they're restricted to the default kind.
1599 * simplify.c (simplify_achar_char): New function.
1600 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
1601 gfc_simplify_ichar): Don't error out for wide characters.
1602 (gfc_convert_char_constant): New function.
1603
e7bff0d1
TB
16042008-05-18 Steven G. Kargl <kargls@comcast.net>
1605
1606 PR fortran/36251
1607 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
1608 and BIND(C).
1609 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
1610
16112008-05-17 Tobias Burnus <burnus@net-b.de>
7d4cf3d9
TB
1612
1613 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
1614 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
1615 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
1616 Move LOG_GAMMA after LOG10.
1617
e7bff0d1 16182008-05-17 Tobias Burnus <burnus@net-b.de>
ca41838c
TB
1619
1620 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
1621 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
1622 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
1623 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
1624
ae772c2d
PT
16252008-05-16 Paul Thomas <pault@gcc.gnu.org>
1626
1627 PR fortran/35756
1628 PR fortran/35759
1629 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
1630 check for calling gfc_trans_where_3.
1631
1632 PR fortran/35743
1633 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
1634 if it is calculated to be negative.
1635
1636 PR fortran/35745
1637 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
1638 ss->where for scalar right hand sides.
1639 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
1640 not evaluate scalars outside the loop. Clean up whitespace.
1641 * trans.h : Add a bitfield 'where' to gfc_ss.
1642
a4cd1610
TB
16432008-05-16 Tobias Burnus <burnus@net-b.de>
1644
1645 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
1646 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
1647
c03fc95d
DK
16482008-04-16 Daniel Kraft <d@domob.eu>
1649
1650 PR fortran/27997
1651 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
1652 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
1653 (check_element_type, check_constructor_type, gfc_check_constructor_type):
1654 Extended to support explicit typespec on constructor.
1655 (gfc_resolve_character_array_constructor): Pad strings correctly for
1656 explicit, constant character length.
1657 * trans-array.c: New static global variable "typespec_chararray_ctor"
1658 (gfc_trans_array_constructor): New code to support explicit but dynamic
1659 character lengths.
1660
acb388a0
JD
16612008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1662
c03fc95d
DK
1663 PR fortran/34325
1664 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
1665 * expr.c (gfc_specification_expr): Supplement the error message with the
1666 type that was found.
1667 * resolve.c (gfc_resolve_index): Likewise.
1668 * match.c (gfc_match_parens): Clarify error message with "at or before".
1669 (gfc_match_do): Check for matching pairs of parenthesis.
acb388a0 1670
d1325932
TB
16712008-05-16 Tobias Burnus <burnus@net-b.de
1672
1673 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
1674 add missing KIND argument to ACHAR and NINT; and state that
1675 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
1676 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
1677
fa9290d3
DK
16782008-05-16 Daniel Kraft <d@domob.eu>
1679
1680 * primary.c: New private structure "gfc_structure_ctor_component".
1681 (gfc_free_structure_ctor_component): New helper function.
1682 (gfc_match_structure_constructor): Extended largely to support named
1683 arguments and default initialization for structure constructors.
1684
d93712d9
SK
16852008-05-15 Steven G. Kargl <kargls@comcast.net>
1686
1687 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
1688 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
1689 possible memory leaks.
1690 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
1691 of NULL pointers.
1692
16932008-05-15 Steven G. Kargl <kargls@comcast.net>
1694
1695 PR fortran/36239
1696 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
1697 rolled integer conversion with gfc_int2int, gfc_real2int, and
1698 gfc_complex2int.
1699 (gfc_simplify_intconv): Renamed to simplify_intconv.
1700
17012008-05-15 Steven G. Kargl, <kargl@comcast.net>
1702 * gfortran.dg/and_or_xor.f90: New test
1703
1704 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
1705 gfc_simplify_xor): Don't range check logical results.
1706
374929b2
FXC
17072008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1708
1709 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
1710 character kinds.
1711 (gfc_build_compare_string): Add kind argument and use it.
1712 (gfc_conv_statement_function): Fix indentation.
1713 * gfortran.h (gfc_character_info): New structure.
1714 (gfc_character_kinds): New array.
1715 * trans-types.c (gfc_character_kinds, gfc_character_types,
1716 gfc_pcharacter_types): New array.
1717 (gfc_init_kinds): Fill character kinds array.
1718 (validate_character): Take care of nondefault character kinds.
1719 (gfc_build_uint_type): New function.
1720 (gfc_init_types): Take care of nondefault character kinds.
1721 (gfc_get_char_type, gfc_get_pchar_type): New functions.
1722 (gfc_get_character_type_len): Use gfc_get_char_type.
1723 * trans.h (gfc_build_compare_string): Adjust prototype.
1724 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
1725 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1726 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1727 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1728 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
1729 prototypes.
1730 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
1731 prototypes.
1732 * trans-decl.c (gfor_fndecl_compare_string_char4,
1733 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1734 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1735 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1736 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
1737 gfor_fndecl_concat_string_char4): New function decls.
1738 (gfc_build_intrinsic_function_decls): Define new *_char4 function
1739 decls.
1740 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
1741 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
1742 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
1743 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
1744
d06abff5
SL
17452008-05-15 Sa Liu <saliu@de.ibm.com>
1746
1747 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
1748 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
1749 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
1750 GNU extensions.
1751 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
1752 to macro NAMED_INTCST.
1753 * symbol.c (std_for_isocbinding_symbol): New helper function to
1754 return the standard that supports this isocbinding symbol.
1755 (generate_isocbinding_symbol): Do not generate GNU extension symbols
1756 if std=f2003. Add new parameter to NAMED_INTCST.
1757 * module.c (use_iso_fortran_env_module): Add new parameter to
1758 NAMED_INTCST and new field standard to struct intmod_sym.
1759 * gfortran.h: Add new parameter to NAMED_INTCST.
1760 * trans-types.c (init_c_interop_kinds): Add new parameter to
1761 NAMED_INTCST.
1762 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
1763 and C_INT_FAST128_T.
1764
1c3339af
FXC
17652008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1766
1767 PR fortran/36059
1768 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
1769 arrays that have the TARGET attribute.
1770
6401bf9c
FXC
17712008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1772
1773 PR fortran/36186
1774 * simplify.c (only_convert_cmplx_boz): New function.
1775 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
1776 Call only_convert_cmplx_boz.
1777
16f2a7a4
PT
17782008-05-14 Paul Thomas <pault@gcc.gnu.org>
1779
6401bf9c
FXC
1780 PR fortran/36233
1781 * interface.c (compare_actual_formal): Do not check sizes if the
1782 actual is BT_PROCEDURE.
16f2a7a4 1783
4c7382bb
FXC
17842008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1785
1786 PR fortran/35682
1787 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
1788 the same as zero size.
1789 (gfc_conv_loop_setup): Fix size calculation.
1790
f10827b1
FXC
17912008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1792
1793 PR fortran/35685
1794 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
1795 handle zero-size sections.
1796
b0b14c7b
FXC
17972008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1798
1799 PR fortran/36215
1800 * scanner.c (preprocessor_line): Allocate enough memory for a
1801 wide string.
1802
b7d36ea3
FXC
18032008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1804
1805 PR fortran/36176
1806 * target-memory.c (gfc_target_expr_size): Correctly treat
1807 substrings.
1808 (gfc_target_encode_expr): Likewise.
1809 (gfc_interpret_complex): Whitespace change.
1810
8f0aaee5
TK
18112008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1812
1813 PR fortran/35719
1814 * trans.c (gfc_call_malloc): If size equals zero, allocate one
1815 byte; don't return a null pointer.
1816
1ed5323b
FXC
18172008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1818
1819 PR fortran/36197
1820 * module.c (quote_string): Fix sprintf format.
1821
3ee6cb3f
FXC
18222008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1823
1824 PR fortran/36162
1825 * module.c (quote_string, unquote_string,
1826 mio_allocated_wide_string): New functions.
1827 (mio_expr): Call mio_allocated_wide_string where needed.
1828
becfd6e5
KZ
18292008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1830
1831 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
1832 Rename DECL_IS_PURE to DECL_PURE_P.
1833
00660189
FXC
18342008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1835
1836 * arith.c: (gfc_arith_concat, gfc_compare_string,
1837 gfc_compare_with_Cstring, hollerith2representation,
1838 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
1839 gfc_hollerith2character, gfc_hollerith2logical): Use wide
1840 characters for character constants.
1841 * data.c (create_character_intializer): Likewise.
1842 * decl.c (gfc_set_constant_character_len): Likewise.
1843 * dump-parse-tree.c (show_char_const): Correctly dump wide
1844 character strings.
1845 error.c (print_wide_char): Rename into gfc_print_wide_char.
1846 (show_locus): Adapt to new prototype of gfc_print_wide_char.
1847 expr.c (free_expr0): Representation is now disjunct from
1848 character string value, so we always free it.
1849 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
1850 to wide character strings.
1851 * gfortran.h (gfc_expr): Make value.character.string a wide string.
1852 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
1853 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
1854 (gfc_get_wide_string): New macro.
1855 (gfc_print_wide_char): New prototype.
1856 * io.c (format_string): Make a wide string.
1857 (next_char, gfc_match_format, compare_to_allowed_values,
1858 gfc_match_open): Deal with wide strings.
1859 * module.c (mio_expr): Convert between wide strings and ASCII ones.
1860 * primary.c (match_hollerith_constant, match_charkind_name):
1861 Handle wide strings.
1862 * resolve.c (build_default_init_expr): Likewise.
1863 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
1864 gfc_char_to_widechar): New functions.
1865 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
1866 Changes in prototypes.
1867 (gfc_define_undef_line, load_line, preprocessor_line,
1868 include_line, load_file, gfc_read_orig_filename): Handle wide
1869 strings.
1870 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
1871 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
1872 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
1873 gfc_simplify_repeat): Handle wide strings.
1874 (wide_strspn, wide_strcspn): New helper functions.
1875 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
1876 Handle wide strings.
1877 * symbol.c (generate_isocbinding_symbol): Likewise.
1878 * target-memory.c (size_character, gfc_target_expr_size,
1879 encode_character, gfc_target_encode_expr, gfc_interpret_character,
1880 gfc_target_interpret_expr): Handle wide strings.
1881 * trans-const.c (gfc_conv_string_init): Lower wide strings to
1882 narrow ones.
1883 (gfc_conv_constant_to_tree): Likewise.
1884 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
1885 * trans-io.c (gfc_new_nml_name_expr): Likewise.
1886 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1887
1b38192d
FXC
18882008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1889
1890 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1891 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1892 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
1893 with ATTRIBUTE_UNUSED.
1894
37a2dc42
FXC
18952008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1896
1897 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
1898 * simplify.c (gfc_simplify_lgamma): Likewise.
1899
19002008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8fc541d3
FXC
1901
1902 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
1903 gfc_peek_ascii_char.
1904 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
1905 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
1906 match_string_p, match_attr_spec, gfc_match_suffix,
1907 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
1908 Likewise.
1909 * gfortran.h (gfc_char_t): New type.
1910 (gfc_linebuf): Make line member a gfc_char_t.
1911 (locus): Make nextc member a gfc_char_t.
1912 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
1913 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
1914 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
1915 * error.c (print_wide_char): New function.
1916 (show_locus): Use print_wide_char and gfc_wide_strlen.
1917 * io.c (next_char): Use gfc_char_t type.
1918 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
1919 * match.c (gfc_match_parens, gfc_match_eos,
1920 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
1921 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
1922 gfc_match_common): Likewise.
1923 * match.h (gfc_match_special_char): Change prototype.
1924 * parse.c (decode_specification_statement, decode_statement,
1925 decode_omp_directive, next_free, next_fixed): Use
1926 gfc_peek_ascii_char and gfc_next_ascii_char.
1927 * primary.c (gfc_check_digit): Change name.
1928 (match_digits, match_hollerith_constant, match_boz_constant,
1929 match_real_constant, next_string_char, match_charkind_name,
1930 match_string_constant, match_logical_constant_string,
1931 match_complex_constant, match_actual_arg, match_varspec,
1932 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
1933 gfc_next_ascii_char.
1934 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
1935 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
1936 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
1937 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
1938 gfc_next_ascii_char, gfc_peek_ascii_char):
1939 New functions.
1940 (next_char, gfc_define_undef_line, skip_free_comments,
1941 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
1942 gfc_error_recovery, load_line, preprocessor_line, include_line,
1943 load_file, gfc_read_orig_filename): Use gfc_char_t for source
1944 characters and the {gfc_,}wide_* functions to manipulate wide
1945 strings.
1946
3c3f4265
TB
19472008-05-06 Tobias Burnus <burnus@net-b.de>
1948
1949 PR fortran/36117
1950 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
1951 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
1952 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1953 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1954 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
1955
ed54a884
JW
19562008-05-03 Janus Weil <jaydub66@gmail.com>
1957
1958 * misc.c (gfc_clear_ts): Set interface to NULL.
1959
ad7ee6f8
JD
19602008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1961
1962 PR fortran/33268
1963 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
1964 gfc_expr value union. Add io_kind enum to here from io.c.
1965 * io.c (gfc_free_dt): Free extra_comma.
1966 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
1967 BT_CHARACTER, resolve to format_expr and set default unit. Error if
1968 io_kind is M_WRITE. (match_io): Match the extra comma and set new
1969 pointer, extra_comma.
1970
00113de8
BD
19712008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
1972
1973 PR35940/Fortran
1974 * simplify.c (gfc_simplify_index): Check for direction argument
1975 being a constant.
1976
32d99e68
JW
19772008-05-01 Janus Weil <jaydub66@gmail.com>
1978
1979 * gfortran.h (struct gfc_symbol): Moving "interface" member to
1980 gfc_typespec (plus fixing a small docu error).
1981 * interface.c (gfc_procedure_use): Ditto.
1982 * decl.c (match_procedure_decl): Ditto.
1983 * resolve.c (resolve_specific_f0,
1984 resolve_specific_f0, resolve_symbol): Ditto.
1985
a39fafac
FXC
19862008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1987
1988 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
1989 * intrinsic.h (gfc_check_selected_char_kind,
1990 gfc_simplify_selected_char_kind): New prototypes.
1991 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
1992 * trans.h (gfor_fndecl_sc_kind): New function decl.
1993 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
1994 * arith.c (gfc_compare_with_Cstring): New function.
1995 * arith.h (gfc_compare_with_Cstring): New prototype.
1996 * check.c (gfc_check_selected_char_kind): New function.
1997 * primary.c (match_string_constant, match_kind_param): Mark
1998 symbols used as literal constant kind param as referenced.
1999 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
2000 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
2001 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
2002 * simplify.c (gfc_simplify_selected_char_kind): New function.
2003
29d40637
PT
20042008-04-28 Paul Thomas <pault@gcc.gnu.org>
2005
a39fafac
FXC
2006 PR fortran/35997
2007 * module.c (find_symbol): Do not return a result for a symbol
2008 that has been renamed in another module.
29d40637 2009
da69cc91
GH
20102008-04-26 George Helffrich <george@gcc.gnu.org>
2011
2012 PR fortran/35892
2013 PR fortran/35154
2014 * trans-common.c (create_common): Add decl to function
2015 chain (if inside one) to preserve identifier scope in debug output.
2016
e3b5732b
JH
20172008-04-25 Jan Hubicka <jh@suse.cz>
2018
2019 * trans-decl.c (trans_function_start): Update.
2020
ccc2ed87
TB
20212008-04-25 Tobias Burnus <burnus@net-b.de>
2022 Daniel Franke <franke.daniel@gmail.com>
2023
2024 PR fortran/35156
2025 * gfortranspec.c (lang_specific_driver): Deprecate
2026 -M option; fix ICE when "-M" is last argument and
2027 make "-M<dir>" work.
2028 * options.c (gfc_handle_module_path_options):
2029 Use -J instead of -M in error messages.
2030 * invoke.texi: Mark -M as depecated.
2031
4e77ad24
JD
20322008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2033 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2034
2035 PR fortran/35994
2036 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
2037 loop counter offset.
2038
51eed280
PB
20392008-04-23 Paolo Bonzini <bonzini@gnu.org>
2040
2041 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
2042 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
2043 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
2044 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
2045 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
2046 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
2047 (create_common): Don't set TREE_INVARIANT.
2048 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
2049 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
2050
6384205f
SE
20512008-04-21 Steve Ellcey <sje@cup.hp.com>
2052
2053 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
2054
3d4cb550
DF
20552008-04-21 Daniel Franke <franke.daniel@gmail.com>
2056
2057 PR fortran/35019
2058 * gfortranspec.c (lookup_option): Properly handle separated arguments
2059 in -J option, print missing argument message when necessary.
2060
f449022d
JD
20612008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2062
2063 PR fortran/35882
2064 * scanner.c (skip_fixed_comments): Update continue_line when comment is
2065 detected. (gfc_next_char_literal): Likewise.
2066
f40eccb0
PT
20672008-04-19 Paul Thomas <pault@gcc.gnu.org>
2068
2069 PR fortran/35944
2070 PR fortran/35946
2071 PR fortran/35947
2072 * trans_array.c (gfc_trans_array_constructor): Temporarily
2073 realign loop, if loop->from is not zero, before creating
2074 the temporary array and provide an offset.
2075
2076 PR fortran/35959
2077 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
2078 and allow for NULL body. Change all references from
2079 init_default_dt to gfc_init_default_dt.
2080 * trans.h : Add prototype for gfc_init_default_dt.
2081 * trans-array.c (gfc_trans_deferred_vars): After nullification
2082 call gfc_init_default_dt for derived types with allocatable
2083 components.
2084
6c0c6ecc
JD
20852008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2086
766cb661 2087 PR fortran/35892
6c0c6ecc
JD
2088 * trans-common.c (create_common): Revert patch causing regression.
2089
554ef027
JD
20902008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2091
2092 PR fortran/35724
2093 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
2094 optional argument attribute.
2095
c2408681
PT
20962008-04-16 Paul Thomas <pault@gcc.gnu.org>
2097
2098 PR fortran/35932
2099 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
2100 is not used, the argument must be converted.
2101
fc207c37
JJ
21022008-04-16 Jakub Jelinek <jakub@redhat.com>
2103
2104 PR target/35662
2105 * f95-lang.c (gfc_init_builtin_functions): Make sure
2106 BUILT_IN_SINCOS{,F,L} types aren't varargs.
2107
05e6ff80
PT
21082008-04-15 Paul Thomas <pault@gcc.gnu.org>
2109
2110 PR fortran/35864
2111 * expr.c (scalarize_intrinsic_call): Reorder identification of
2112 array argument so that if one is not found a segfault does not
2113 occur. Return FAILURE if all scalar arguments.
2114
dfbfb630
JD
21152008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2116 Tobias Burnus <burnus@net-b.de>
2117
2118 PR fortran/35882
2119 * options.c (gfc_init_options): Set the default maximum continuation
2120 lines to 255 for both free and fixed form source for warnings.
2121 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
2122 the -std=f95 free form max continuations to 39 for warnings.
2123 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
2124 if it is less than the current locus.
2125
d06b3496
JD
21262008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2127
2128 PR fortran/25829 28655
2129 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
2130 round, sign, and id. (match_open_element): Match new tags.
2131 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
2132 for DEFAULT only. Update error messages. (match_dt_element): Fix match
2133 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
2134 new expressions. (match_inquire_element): Match new tags.
2135 (gfc_match_inquire): Add constraint for ID and PENDING.
2136 (gfc_resolve_inquire): Resolve new tags.
2137 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
2138 mask for ID parameter.
2139 * ioparm.def: Fix order of parameters for pending, round, and sign.
2140 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
2141 things don't work.
2142
679d9637
PT
21432008-04-06 Paul Thomas <pault@gcc.gnu.org>
2144
2145 PR fortran/35780
2146 * expr.c (scalarize_intrinsic_call): Identify which argument is
2147 an array and use that as the template.
2148 (check_init_expr): Remove tests that first argument is an array
2149 in the call to scalarize_intrinsic_call.
2150
95213750 21512008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
9b8d1901
TS
2152
2153 PR fortran/35832
2154 * io.c (io_tag): Add field 'value'. Split 'spec' field in
2155 existing io_tags.
2156 (match_etag, match_vtag, match_ltag): Split parsing in two steps
2157 to give better error messages.
2158
fbe88ffa
TB
21592008-04-06 Tobias Burnus <burnus@net-b.de>
2160
2161 * io.c (check_io_constraints): Add constrains. ID= requires
2162 asynchronous= and asynchronous= must be init expression.
2163
3135ce84
FXC
21642008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2165
2166 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
2167
6c1abb5c
FXC
21682008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2169
2170 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
2171 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
2172 functions and make them static. Add new gfc_dump_parse_tree
2173 function.
2174 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
2175 (gfc_status, gfc_status_char): Delete prototypes.
2176 * error.c (gfc_status, gfc_status_char): Remove functions.
2177 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
2178 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
2179 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
2180 gfc_status and exit.
2181 (gfc_handle_option): Rename verbose into dump_parse_tree.
daf5afd4 2182 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
6c1abb5c 2183
6f0f0b2e
JD
21842008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2185 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2186
2187 PR fortran/25829 28655
2188 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
2189 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
2190 (gfc_open): Add pointers for decimal, encoding, round, sign,
2191 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
2192 encoding, pending, round, sign, size, id.
2193 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
2194 asynchronous, blank, decimal, delim, pad, round, sign.
2195 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
2196 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
2197 * trans-stmt.h (gfc_trans_wait): New function prototype.
2198 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
2199 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
2200 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
2201 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
2202 tags. (gfc_resolve_open): Remove comment around check for allowed
2203 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
2204 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
2205 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
2206 (match_wait_element): New function. (gfc_match_wait): New function.
2207 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
2208 (resolve_code): Add case for EXEC_WAIT.
2209 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
2210 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
2211 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
2212 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
2213 (gfc_trans_open): Add mask bits for new I/O tags.
2214 (gfc_trans_inquire): Add mask bits for new I/O tags.
2215 (gfc_trans_wait): New translation function.
2216 (build_dt): Add mask bits for new I/O tags.
2217 * match.c (gfc_match_if) Add matcher for "wait".
2218 * match.h (gfc_match_wait): Prototype for new function.
2219 * ioparm.def: Add new I/O parameter definitions.
2220 * parse.c (decode_statement): Add match for "wait" statement.
2221 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
2222
637b5a8e
JJ
22232008-04-03 Jakub Jelinek <jakub@redhat.com>
2224
2225 PR fortran/35786
2226 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
2227 isn't a variable.
2228
6cba282a
TT
22292008-04-03 Tom Tromey <tromey@redhat.com>
2230
2231 * Make-lang.in (fortran_OBJS): New variable.
2232
9ff420f1
PB
22332008-04-03 Paolo Bonzini <bonzini@gnu.org>
2234
6c1abb5c 2235 * f95-lang.c (insert_block): Kill.
9ff420f1 2236
7151ffbe
GH
22372008-04-01 George Helffrich <george@gcc.gnu.org>
2238
623f8e39 2239 PR fortran/35154, fortran/23057
7151ffbe
GH
2240 * trans-common.c (create_common): Add decl to function
2241 chain to preserve identifier scope in debug output.
2242
7f9766e4
JM
22432008-04-01 Joseph Myers <joseph@codesourcery.com>
2244
2245 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
2246 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
2247 gpl.texi.
2248
23d1b451
PT
22492008-03-30 Paul Thomas <pault@gcc.gnu.org>
2250
2251 PR fortran/35740
2252 * resolve.c (resolve_function, resolve_call): If the procedure
2253 is elemental do not look for noncopying intrinsics.
2254
067feae3
PT
22552008-03-29 Paul Thomas <pault@gcc.gnu.org>
2256
2257 PR fortran/35698
2258 * trans-array.c (gfc_array_init_size): Set 'size' zero if
2259 negative in one dimension.
2260
2261 PR fortran/35702
2262 * trans-expr.c (gfc_trans_string_copy): Only assign a char
2263 directly if the lhs and rhs types are the same.
2264
01d2a7d7
DF
22652008-03-28 Daniel Franke <franke.daniel@gmail.com>
2266 Paul Richard Thomas <paul.richard.thomas@gmail.com>
2267
2268 PR fortran/34714
2269 * primary.c (match_variable): Improved matching of function
2270 result variables.
2271 * resolve.c (resolve_allocate_deallocate): Removed checks if
2272 the actual argument for STAT is a variable.
2273
b0be8e5c
TB
22742008-03-28 Tobias Burnus <burnus@net-b.de>
2275
2276 * symbol.c (gfc_get_default_type): Fix error message; option
2277 -fallow_leading_underscore should be -fallow-leading-underscore
2278
97d650cc
JD
22792008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2280
2281 PR fortran/35724
2282 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
2283 optional argument attribute.
2284
e980df8e
TT
22852008-03-27 Tom Tromey <tromey@redhat.com>
2286
2287 * Make-lang.in: Revert automatic dependency patch.
2288
2fe3178b
TT
22892008-03-25 Tom Tromey <tromey@redhat.com>
2290
2291 * Make-lang.in: Remove .o targets.
2292 (fortran_OBJS): New variable.
2293 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
2294 setting.
2295 (GFORTRAN_D_OBJS): Update.
2296 (GFORTRAN_TRANS_DEPS): Remove.
2297
c1203a70
PT
22982008-03-24 Paul Thomas <pault@gcc.gnu.org>
2299
2300 PR fortran/34813
2301 * resolve.c (resolve_structure_cons): It is an error to assign
2302 NULL to anything other than a pointer or allocatable component.
2303
2304 PR fortran/33295
2305 * resolve.c (resolve_symbol): If the symbol is a derived type,
2306 resolve the derived type. If the symbol is a derived type
2307 function, ensure that the derived type is visible in the same
2308 namespace as the function.
2309
95213750 23102008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
47056774
TS
2311
2312 * trans.h: Use fold_build in build1_v, build2_v and build3_v
2313 macros.
2314 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
2315 Don't use build2_v macro.
2316
ac05557c
DF
23172008-03-19 Daniel Franke <franke.daniel@gmail.com>
2318
2319 PR fortran/35152
2320 * interface.c (gfc_procedure_use): Check for keyworded arguments in
2321 procedures without explicit interfaces.
2322
c52938ec
PT
23232008-03-16 Paul Thomas <pault@gcc.gnu.org>
2324
2325 PR fortran/35470
2326 * resolve.c (check_assumed_size_reference): Only visit the
2327 first reference and look directly at the highest dimension.
2328
db5cf0c7
JD
23292008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2330
2331 PR fortran/35184
2332 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
2333 assert.
2334
ab551054
DF
23352008-03-15 Daniel Franke <franke.daniel@gmail.com>
2336
2337 PR fortran/35584
2338 * resolve.c (resolve_branch): Less strict and pessimistic warning
2339 message.
2340
30e257e5
PB
23412008-03-11 Paolo Bonzini <bonzini@gnu.org>
2342
ab551054
DF
2343 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
2344 (gfc_be_parse_file): Call clear_binding_stack from here.
30e257e5
PB
2345 (gfc_clear_binding_stack): Rename to clear_binding_stack.
2346
81c10953
PT
23472008-03-09 Paul Thomas <pault@gcc.gnu.org>
2348
2349 PR fortran/35474
2350 * module.c (mio_symtree_ref): After providing a symbol for a
2351 missing equivalence member, resolve and NULL the fixups.
2352
802e3f8c
RW
23532008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2354
2355 * invoke.texi (Error and Warning Options): Document
2356 -Wline-truncation.
2357
ba4698e1
FXC
23582008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2359
2360 PR fortran/34956
2361 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
2362 checking bounds of absent optional arguments.
2363
fdc54e88
FXC
23642008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2365
2366 PR fortran/33197
2367 * intrinsic.c (add_functions): Add simplification routines for
2368 ERF, DERF, ERFC and DERFC.
2369 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
2370 extensions into Fortran 2008 features.
2371 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
2372 prototypes.
2373 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
2374
f489fba1
FXC
23752008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2376
2377 PR fortran/33197
2378 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
2379 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
2380 ERFC_SCALED, LOG_GAMMA and HYPOT.
2381 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
2382 gfc_resolve_hypot): New prototypes.
2383 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
2384 ACOSH, ASINH and ATANH available.
2385 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
2386 * lang.opt: Add -std=f2008 option.
2387 * libgfortran.h: Define GFC_STD_F2008.
2388 * lang-specs.h: Add .f08 and .F08 file suffixes.
2389 * iresolve.c (gfc_resolve_hypot): New function.
2390 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
2391 * check.c (gfc_check_hypot): New function.
2392 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
2393 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
2394 (form_from_filename): Add .f08 suffix.
2395 (gfc_handle_option): Handle -std=f2008 option.
2396 * simplify.c (gfc_simplify_hypot): New function.
2397 * gfortran.texi: Document Fortran 2008 status and file extensions.
2398 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
2399 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
2400 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
2401 * invoke.texi: Document the new -std=f2008 option.
2402
0e5997c0
JJ
24032008-03-02 Jakub Jelinek <jakub@redhat.com>
2404
2405 * gfortranspec.c (lang_specific_driver): Update copyright notice
2406 dates.
2407
44000dbb
JD
24082008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2409
2410 PR fortran/35059
2411 * expr.c (find_array_element): Modify traversing the constructor to
2412 avoid trying to access NULL memory pointed to by next for the
2413 last element. (find_array_section): Exit while loop if cons->next is
2414 NULL.
2415 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
2416 (gfc_conv_function_call): Same.
2417 * decl.c (gfc_match_implicit): Same.
2418 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
2419
766d0c8c
DF
24202008-02-28 Daniel Franke <franke.daniel@gmail.com>
2421
2422 PR fortran/31463
2423 PR fortran/33950
2424 PR fortran/34296
2425 * lang.opt: Added -Wreturn-type.
2426 * options.c (gfc_handle_option): Recognize -Wreturn-type.
2427 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
2428 where the result value is not set.
2429 (gfc_generate_function_code): Likewise.
2430 (generate_local_decl): Emit warnings for funtions whose RESULT
2431 variable is not set.
2432
43e7fd21
FXC
24332008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2434
2435 PR fortran/34868
2436 * trans-expr.c (gfc_conv_variable): Don't build indirect
2437 references when explicit interface is mandated.
2438 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
2439 on the result symbol as well as the procedure symbol.
2440
b5a4419c
FXC
24412008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2442
2443 PR fortran/33387
2444 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
2445 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2446 gfor_fndecl_math_exponent16.
2447 * f95-lang.c (build_builtin_fntypes): Add new function types.
2448 (gfc_init_builtin_functions): Add new builtins for nextafter,
2449 frexp, ldexp, fabs, scalbn and inf.
2450 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
2451 (gfc_resolve_scale): Don't convert type of second argument.
2452 (gfc_resolve_set_exponent): Likewise.
2453 (gfc_resolve_size): Don't add hidden arguments.
2454 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
2455 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
2456 gfor_fndecl_math_exponent16.
2457 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
2458 for scalbn, fraction, nearest, rrspacing, set_exponent and
2459 spacing.
2460 (gfc_conv_intrinsic_exponent): Directly call frexp.
2461 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
2462 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
2463 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
2464 functions.
2465 (gfc_conv_intrinsic_function): Use the new functions above.
2466
e19bb186
TB
24672008-02-26 Tobias Burnus <burnus@net-b.de>
2468
2469 PR fortran/35033
2470 * interface.c (check_operator_interface): Show better line for error
2471 messages; fix constrains for user-defined assignment operators.
2472 (gfc_extend_assign): Fix constrains for user-defined assignment
2473 operators.
2474
2d593c86
TT
24752008-02-26 Tom Tromey <tromey@redhat.com>
2476
2477 * trans-io.c (set_error_locus): Remove old location code.
2478 * trans-decl.c (gfc_set_decl_location): Remove old location code.
2479 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
2480 * scanner.c (gfc_gobble_whitespace): Remove old location code.
2481 (get_file): Likewise.
2482 (preprocessor_line): Likewise.
2483 (load_file): Likewise.
2484 (gfc_new_file): Likewise.
2485 * trans.c (gfc_trans_runtime_check): Remove old location code.
2486 (gfc_get_backend_locus): Likewise.
2487 (gfc_set_backend_locus): Likewise.
2488 * data.c (gfc_assign_data_value): Remove old location code.
2489 * error.c (show_locus): Remove old location code.
2490 * gfortran.h (gfc_linebuf): Remove old location code.
2491 (gfc_linebuf_linenum): Remove old-location variant.
2492
ee37d2f5
FXC
24932008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2494
2495 PR fortran/34729
2496 * trans-const.c (gfc_build_string_const): Don't call gettext.
2497 (gfc_build_localized_string_const): New function.
2498 * trans-const.h (gfc_build_localized_string_const): New prototype.
2499 * trans.c (gfc_trans_runtime_check): Use
2500 gfc_build_localized_string_const instead of gfc_build_string_const.
2501 (gfc_call_malloc): Likewise.
2502 (gfc_allocate_with_status): Likewise.
2503 (gfc_allocate_array_with_status): Likewise.
2504 (gfc_deallocate_with_status): Likewise.
2505 (gfc_call_realloc): Likewise.
2506 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
2507
95213750 25082008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
835aac92
TS
2509
2510 * arith.c: Update copyright years.
2511 * arith.h: Likewise.
2512 * array.c: Likewise.
2513 * bbt.c: Likewise.
2514 * check.c: Likewise.
2515 * data.c: Likewise.
2516 * data.h: Likewise.
2517 * decl.c: Likewise.
2518 * dependency.c: Likewise.
2519 * dependency.h: Likewise.
2520 * dump-parse-tree.c: Likewise.
2521 * error.c: Likewise.
2522 * expr.c: Likewise.
2523 * gfc-internals.texi: Likewise.
2524 * gfortran.h: Likewise.
2525 * gfortran.texi: Likewise.
2526 * gfortranspec.c: Likewise.
2527 * interface.c: Likewise.
2528 * intrinsic.c: Likewise.
2529 * intrinsic.h: Likewise.
2530 * intrinsic.texi: Likewise.
2531 * invoke.texi: Likewise.
2532 * io.c: Likewise.
2533 * iresolve.c: Likewise.
2534 * iso-c-binding.def: Likewise.
2535 * iso-fortran-env.def: Likewise.
2536 * lang-specs.h: Likewise.
2537 * lang.opt: Likewise.
2538 * libgfortran.h: Likewise.
2539 * match.c: Likewise.
2540 * match.h: Likewise.
2541 * matchexp.c: Likewise.
2542 * misc.c: Likewise.
2543 * module.c: Likewise.
2544 * openmp.c: Likewise.
2545 * options.c: Likewise.
2546 * parse.c: Likewise.
2547 * parse.h: Likewise.
2548 * primary.c: Likewise.
2549 * resolve.c: Likewise.
2550 * scanner.c: Likewise.
2551 * simplify.c: Likewise.
2552 * st.c: Likewise.
2553 * symbol.c: Likewise.
2554 * target-memory.c: Likewise.
2555 * target-memory.h: Likewise.
2556 * trans-array.h: Likewise.
2557 * trans-const.h: Likewise.
2558 * trans-stmt.h: Likewise.
2559 * trans-types.c: Likewise.
2560 * trans-types.h: Likewise.
2561 * types.def: Likewise.
2562
c05800b6
JD
25632008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2564
2565 PR fortran/35223
2566 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
2567 (gfc_simplify_ibset): Remove call to range_check.
2568 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
2569 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
2570 temporary gfc_typspec variable.
2571
95213750 25722008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
0418b811
TS
2573
2574 * trans-array.c (gfc_conv_descriptor_data_get,
2575 gfc_conv_descriptor_data_set_internal,
2576 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
2577 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
2578 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
2579 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
2580 gfc_conv_array_transpose, gfc_grow_array,
2581 gfc_trans_array_constructor_subarray,
2582 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
2583 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
2584 gfc_conv_array_initializer, gfc_trans_array_bounds,
2585 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
2586 gfc_get_dataptr_offset, gfc_conv_array_parameter,
2587 gfc_trans_dealloc_allocated, get_full_array_size,
2588 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
2589 instead of buildN.
2590 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
2591 gfc_conv_component_ref, gfc_conv_cst_int_power,
2592 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
2593 * trans-common.c (create_common): Likewise.
2594 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
2595 Likewise.
2596 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
2597 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
2598 gfc_trans_integer_select, gfc_trans_character_select,
2599 gfc_trans_forall_loop, compute_overall_iter_number,
2600 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
2601 gfc_trans_deallocate): Likewise.
2602 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
2603 gfc_allocate_with_status, gfc_allocate_array_with_status,
2604 gfc_deallocate_with_status): Likewise.
2605 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
2606 * trans-io.c (set_parameter_const, set_parameter_value,
2607 set_parameter_ref, set_string, set_internal_unit, io_result,
2608 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
2609 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
2610 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
2611 gfc_generate_function_code): Likewise.
2612 * convert.c (convert): Likewise.
2613 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
2614 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
2615 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
2616 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
2617 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2618 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
2619 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
2620 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
2621 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
2622 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
2623 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2624 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
2625 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2626 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
2627 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
2628 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
2629 gfc_conv_intrinsic_repeat): Likewise.
2630
37a2dc42 26312008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
fb220235
FXC
2632
2633 PR target/25477
2634 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
2635 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
2636 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
2637 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
2638 * trans-decl.c: Likewise.
2639
c05800b6
JD
26402008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2641
2642 PR fortran/35059
2643 * expr.c (find_array_element): Modify traversing the constructor to
2644 avoid trying to access NULL memory pointed to by next for the
2645 last element. (find_array_section): Exit while loop if cons->next is
2646 NULL.
2647
26482008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4af63337
JD
2649
2650 PR fortran/34907
2651 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
2652 structure.
2653 (gfc_resolve_aint): Likewise.
2654 (gfc_resolve_anint): Likewise.
2655 (gfc_resolve_besn): Likewise.
2656 (gfc_resolve_cshift): Likewise.
2657 (gfc_resolve_ctime): Likewise.
2658 (gfc_resolve_eoshift): Likewise.
2659 (gfc_resolve_index_func): Likewise.
2660 (gfc_resolve_isatty): Likewise.
2661 (gfc_resolve_malloc): Likewise.
2662 (gfc_resolve_rrspacing): Likewise.
2663 (gfc_resolve_scale): Likewise.
2664 (gfc_resolve_set_exponent): Likewise.
2665 (gfc_resolve_spacing): Likewise.
2666 (gfc_resolve_spacing): Likewise.
2667 (gfc_resolve_fgetc): Likewise.
2668 (gfc_resolve_fputc): Likewise.
2669 (gfc_resolve_ftell): Likewise.
2670 (gfc_resolve_ttynam): Likewise.
2671 (gfc_resolve_alarm_sub): Likewise.
2672 (gfc_resolve_mvbits): Likewise.
2673 (gfc_resolve_getarg): Likewise.
2674 (gfc_resolve_signal_sub): Likewise.
2675 (gfc_resolve_exit): Likewise.
2676 (gfc_resolve_flush): Likewise.
2677 (gfc_resolve_free): Likewise.
2678 (gfc_resolve_ctime_sub): Likewise.
2679 (gfc_resolve_fgetc_sub): Likewise.
2680 (gfc_resolve_fputc_sub): Likewise.
2681 (gfc_resolve_fseek_sub): Likewise.
2682 (gfc_resolve_ftell_sub): Likewise.
2683 (gfc_resolve_ttynam_sub): Likewise.
2684
24219f12
RW
26852008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2686
2687 * gfc-internals.texi: Fix typos and markup nits.
2688 * gfortran.texi: Likewise.
2689 * intrinsic.texi: Likewise.
2690
dedd42d5
RG
26912008-02-21 Richard Guenther <rguenther@suse.de>
2692
2693 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
2694 as unary PAREN_EXPR for real and complex typed expressions.
2695 (gfc_conv_unary_op): Fold the built tree.
2696
89a5afda
TB
26972008-02-20 Tobias Burnus <burnus@net-b.de>
2698
2699 PR fortran/34997
2700 * match.c (gfc_match_name): Improve error message for '$'.
2701
606c2c03
DF
27022008-02-19 Daniel Franke <franke.daniel@gmail.com>
2703
2704 PR fortran/35030
2705 * expr.c (gfc_check_pointer_assign): Add type and kind information
2706 to type-mismatch message.
2707 (gfc_check_assign): Unify error messages.
2708
49309826
FXC
27092008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2710
2711 PR fortran/34952
2712 * gfortran.texi: Create new section for unimplemented extensions.
2713 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
2714 Remove "smaller projects" list. Fix a few typos.
2715
6b45fd61
FXC
27162008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2717
2718 * intrinsic.texi: Rename INDEX node to avoid clashing with
2719 index.html on case-insensitive systems.
2720
750606c6
FXC
27212008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2722
2723 PR fortran/35150
2724 * trans-expr.c (gfc_conv_function_call): Force evaluation of
2725 se->expr.
2726
3d39d415
DF
27272008-02-10 Daniel Franke <franke.daniel@gmail.com>
2728
606c2c03 2729 PR fortran/35019
3d39d415
DF
2730 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
2731 likewise '-I <dir>' and '-I<dir>'.
2732
72fb133f
KG
27332008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2734
2735 PR other/35107
2736 * Make-lang.in (f951): Add $(GMPLIBS).
2737
e3ac9b24
FXC
27382008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2739
2740 PR fortran/35037
2741 * trans-common.c (build_field): Mark fields as volatile when needed.
2742
da36ba27
TB
27432008-02-05 Tobias Burnus <burnus@net-b.de>
2744
2745 PR fortran/35093
2746 * data.c (gfc_assign_data_value): Only free "size" if
2747 it has not already been freed.
2748
52f56431
PT
27492008-02-05 Paul Thomas <pault@gcc.gnu.org>
2750
2751 PR fortran/34945
2752 * array.c (match_array_element_spec): Remove check for negative
2753 array size.
2754 (gfc_resolve_array_spec): Add check for negative size.
2755
3969f765
PT
27562008-02-05 Paul Thomas <pault@gcc.gnu.org>
2757
2758 PR fortran/32315
2759 * data.c (gfc_assign_data_value): Add bounds check for array
2760 references.
2761
ba6e57ba
DF
27622008-02-04 Daniel Franke <franke.daniel@gmail.com>
2763
2764 * resolve.c (resolve_where): Fix typo.
2765 (gfc_resolve_where_code_in_forall): Likewise.
2766
b9332b09
PT
27672008-02-03 Paul Thomas <pault@gcc.gnu.org>
2768
2769 PR fortran/32760
2770 * resolve.c (resolve_allocate_deallocate): New function.
2771 (resolve_code): Call it for allocate and deallocate.
2772 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
2773 the checking of the STAT tag and put in above new function.
2774 * primary,c (match_variable): Do not fix flavor of host
2775 associated symbols yet if the type is not known.
2776
db39d0c2
PT
27772008-01-31 Paul Thomas <pault@gcc.gnu.org>
2778
2779 PR fortran/34910
2780 * expr.c (gfc_check_assign): It is an error to assign
2781 to a sibling procedure.
2782
a99d95a2
PT
27832008-01-30 Paul Thomas <pault@gcc.gnu.org>
2784
2785 PR fortran/34975
2786 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
2787 delete_symtree to gfc_delete_symtree.
2788 * gfortran.h : Add prototype for gfc_delete_symtree.
2789 * module.c (load_generic_interfaces): Transfer symbol to a
2790 unique symtree and delete old symtree, instead of renaming.
2791 (read_module): The rsym and the found symbol are the same, so
2792 the found symtree can be deleted.
2793
2794 PR fortran/34429
2795 * decl.c (match_char_spec): Remove the constraint on deferred
2796 matching of functions and free the length expression.
2797 delete_symtree to gfc_delete_symtree.
2798 (gfc_match_type_spec): Whitespace.
2799 (gfc_match_function_decl): Defer characteristic association for
2800 all types except BT_UNKNOWN.
2801 * parse.c (decode_specification_statement): Only derived type
2802 function matching is delayed to the end of specification.
2803
64a96f5b
TB
28042008-01-28 Tobias Burnus <burnus@net-b.de>
2805
2806 PR libfortran/34980
2807 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
2808
938f31f1
JD
28092008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2810
2811 PR fortran/34990
2812 * array.c (gfc_check_constructor_type): Revert clearing the expression.
2813
2c80cb0e
TB
28142008-01-26 Tobias Burnus <burnus@net-b.de>
2815
2816 PR fortran/34848
2817 * trans-expr.c (gfc_conv_function_call): Don't call
2818 gfc_add_interface_mapping if the expression is NULL.
2819
bdfc46af
JD
28202008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2821
2822 PR fortran/31610
2823 * trans-array.c (gfc_trans_create_temp_array): Remove call to
2824 gcc_assert (integer_zerop (loop->from[n])).
2825
42cd23cb
DF
28262008-01-25 Daniel Franke <franke.daniel@gmail.com>
2827
2828 PR fortran/34661
2829 * resolve.c (resolve_where): Added check if user-defined assignment
2830 operator is an elemental subroutine.
2831 (gfc_resolve_where_code_in_forall): Likewise.
2832
79f40de6
DF
28332008-01-24 Daniel Franke <franke.daniel@gmail.com>
2834
2835 PR fortran/33375
2836 PR fortran/34858
2837 * gfortran.h: Revert changes from 2008-01-17.
2838 * match.c: Likewise.
2839 * symbol.c: Likewise.
2840 (gfc_undo_symbols): Undo namespace changes related to common blocks.
2841
7c8d2703
DF
28422008-01-24 Daniel Franke <franke.daniel@gmail.com>
2843
2844 PR fortran/34202
2845 * data.c (formalize_structure_cons): Skip formalization on
2846 empty structures.
2847
3b303683
DF
28482008-01-24 Daniel Franke <franke.daniel@gmail.com>
2849
2850 * gfortran.texi (OpenMP): Extended existing documentation.
2851 (contributors): Added major contributors of 2008 that were
2852 not listed yet.
2853 (proposed extensions): Removed implemented items.
2854
28552008-01-24 Paul Thomas <pault@gcc.gnu.org>
2856
2857 PR fortran/34872
2858 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
2859 seen, check for a statement label and, if present, delete it
2860 and set the locus to the start of the statement.
2861
c63173dd
PT
28622008-01-22 Paul Thomas <pault@gcc.gnu.org>
2863
2864 PR fortran/34875
2865 * trans-io.c (gfc_trans_transfer): If the array reference in a
2866 read has a vector subscript, use gfc_conv_subref_array_arg to
2867 copy back the temporary.
2868
b5ca4fd2
TB
28692008-01-22 Tobias Burnus <burnus@net-b.de>
2870
2871 PR fortran/34848
2872 * interface.c (compare_actual_formal): Fix adding type
2873 to missing_arg_type for absent optional arguments.
2874
2ddd2871
TB
28752008-01-22 Tobias Burnus <burnus@net-b.de>
2876
2877 PR fortran/34907
2878 * parse.c (parse_spec): Change = into ==.
2879
c2916401
DF
28802008-01-22 Daniel Franke <franke.daniel@gmail.com>
2881
2882 PR fortran/34915
2883 * expr.c (check_elemental): Fix check for valid data types.
2884
fd1935d5
TB
28852008-01-22 Tobias Burnus <burnus@net-b.de>
2886
2887 PR fortran/34899
2888 * scanner.c (load_line): Support <tab><digit> continuation lines.
2889 * invoke.texi (-Wtabs): Document this.
2890
87a64f53
PT
28912008-01-22 Paul Thomas <pault@gcc.gnu.org>
2892
2893 PR fortran/34896
2894 * module.c (read_module): Set use_rename attribute.
2895
d68e117b
TB
28962007-01-21 Tobias Burnus <burnus@net-b.de>
2897
2898 PR fortran/34901
2899 * interface.c (compare_parameter): Improved error message
2900 for arguments of same type and mismatched kinds.
2901
f5d67ede
PT
29022008-01-20 Paul Thomas <pault@gcc.gnu.org>
2903
2904 PR fortran/34861
2905 * resolve.c (resolve_entries): Do not do an array bounds check
2906 if the result symbols are the same.
2907
2908 PR fortran/34854
2909 * module.c (read_module) : Hide the symtree of the previous
2910 version of the symbol if this symbol is renamed.
2911
f2d3cb25
PT
29122008-01-20 Paul Thomas <pault@gcc.gnu.org>
2913
2914 PR fortran/34784
2915 * array.c (gfc_check_constructor_type): Clear the expression ts
2916 so that the checking starts from the deepest level of array
2917 constructor.
2918 * primary.c (match_varspec): If an unknown type is changed to
2919 default character and the attempt to match a substring fails,
2920 change it back to unknown.
2921
2922 PR fortran/34785
2923 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
2924 NULL for an array constructor, use the cl.length expression to
2925 build it.
2926 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
2927 a tree assignment.
2928
c613d540
TK
29292008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2930
2931 PR fortran/34817
2932 PR fortran/34838
2933 * iresolve.c (gfc_resolve_all): Remove conversion of mask
2934 argument to kind=1 by removing call to resolve_mask_arg().
2935 (gfc_resolve_any): Likewise.
2936
d7e2fcd0
TB
29372008-01-19 Tobias Burnus <burnus@net-b.de>
2938
2939 PR fortran/34760
2940 * primary.c (match_variable): Handle FL_UNKNOWN without
2941 uneducated guessing.
2942 (match_variable): Improve error message.
2943
a0710c29
TB
29442008-01-18 Tobias Burnus <burnus@net-b.de>
2945
2946 PR fortran/32616
2947 * interface.c (get_expr_storage_size): Return storage size
2948 for array element designators.
2949 (compare_actual_formal): Reject unequal string sizes for
2950 assumed-shape dummy arguments. And fix error message for
2951 array-sections with vector subscripts.
2952
207bde5f
JD
29532008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2954
2955 PR fortran/34556
2956 * simplify.c (is_constant_array_expr): New static function that returns
2957 true if the given expression is an array and is constant.
2958 (gfc_simplify_reshape): Use new function.
2959
c0184444
L
29602008-01-17 H.J. Lu <hongjiu.lu@intel.com>
2961
2962 PR fortran/33375
2963 * symbol.c (free_common_tree): Renamed to ...
2964 (gfc_free_common_tree): This. Remove static.
2965 (gfc_free_namespace): Updated.
2966
2967 * gfortran.h (gfc_free_common_tree): New.
2968
2969 * match.c (gfc_match_common): Call gfc_free_common_tree () with
2970 gfc_current_ns->common_root and set gfc_current_ns->common_root
2971 to NULL on syntax error.
2972
5cc5439e
RS
29732008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
2974
2975 PR fortran/34686
2976 * trans-expr.c (gfc_conv_function_call): Use proper
2977 type for returned character pointers.
2978
1c8bcdf7
PT
29792008-01-17 Paul Thomas <pault@gcc.gnu.org>
2980
2981 PR fortran/34429
2982 PR fortran/34431
2983 PR fortran/34471
2984 * decl.c : Remove gfc_function_kind_locus and
2985 gfc_function_type_locus. Add gfc_matching_function.
2986 (match_char_length): If matching a function and the length
2987 does not match, return MATCH_YES and try again later.
2988 (gfc_match_kind_spec): The same.
2989 (match_char_kind): The same.
2990 (gfc_match_type_spec): The same for numeric and derived types.
2991 (match_prefix): Rename as gfc_match_prefix.
2992 (gfc_match_function_decl): Except for function valued character
2993 lengths, defer applying kind, type and charlen info until the
2994 end of specification block.
2995 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
2996 parse.c (decode_specification_statement): New function.
2997 (decode_statement): Call it when a function has kind = -1. Set
2998 and reset gfc_matching function, as function statement is being
2999 matched.
3000 (match_deferred_characteristics): Simplify with a single call
3001 to gfc_match_prefix. Do appropriate error handling. In any
3002 case, make sure that kind = -1 is reset or corrected.
3003 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
3004 Throw an error if kind = -1 after last specification statement.
3005 parse.h : Prototype for gfc_match_prefix.
3006
6da0839a
TB
30072008-01-16 Tobias Burnus <burnus@net-b.de>
3008
3009 PR fortran/34796
3010 * interface.c (compare_parameter): Allow AS_DEFERRED array
3011 elements and reject attr.pointer array elemenents.
3012 (get_expr_storage_size): Return storage size of elements of
3013 assumed-shape and pointer arrays.
3014
e0e8ce7a
SP
30152008-01-15 Sebastian Pop <sebastian.pop@amd.com>
3016
3017 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
3018 for flag_tree_parallelize_loops.
3019
90469382
TK
30202008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
3021
3022 PR libfortran/34671
3023 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
3024 (gfc_resolve_any): Likewise.
3025 (gfc_resolve_count): Likewise. Don't append kind of
3026 argument to function name.
3027
5ad6345e
TB
30282008-01-13 Tobias Burnus <burnus@net-b.de>
3029
3030 PR fortran/34665
3031 * resolve.c (resolve_actual_arglist): For expressions,
3032 also check for assume-sized arrays.
3033 * interface.c (compare_parameter): Move F2003 character checks
3034 here, print error messages here, reject elements of
3035 assumed-shape array as argument to dummy arrays.
3036 (compare_actual_formal): Update for the changes above.
3037
083de129
TB
30382008-01-13 Tobias Burnus <burnus@net-b.de>
3039
3040 PR fortran/34763
3041 * decl.c (contained_procedure): Only check directly preceeding state.
3042
86288ff0
TB
30432008-01-13 Tobias Burnus <burnus@net-b.de>
3044
3045 PR fortran/34759
3046 * check.c (gfc_check_shape): Accept array ranges of
3047 assumed-size arrays.
3048
9a528648
JD
30492008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3050
9a27aa90 3051 PR fortran/34432
9a528648
JD
3052 * match.c (gfc_match_name): Don't error if leading character is a '(',
3053 just return MATCH_NO.
3054
bc9d9552
JD
30552008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3056
3057 PR fortran/34722
3058 * trans-io.c (create_dummy_iostat): Commit the symbol.
3059
d9183bb7
PT
30602008-01-11 Paul Thomas <pault@gcc.gnu.org>
3061
3062 PR fortran/34537
3063 * simplify.c (gfc_simplify_transfer): Return NULL if the size
3064 of the element is unavailable and only assign character length
3065 to the result, if 'mold' is constant.
3066
32be9f94
PT
30672008-01-10 Paul Thomas <pault@gcc.gnu.org>
3068
3069 PR fortran/34396
3070 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
3071 to assign strings and perform bounds checks on the string length.
3072 (get_array_ctor_strlen): Remove bounds checking.
3073 (gfc_trans_array_constructor): Initialize string length checking.
3074 * trans-array.h : Add prototype for gfc_trans_string_copy.
3075
416a8af4
RG
30762008-01-08 Richard Guenther <rguenther@suse.de>
3077
3078 PR fortran/34706
3079 PR tree-optimization/34683
3080 * trans-types.c (gfc_get_array_type_bounds): Use an array type
3081 with known size for accesses if that is known.
3082
0c6ce8b0
PT
30832008-01-08 Paul Thomas <pault@gcc.gnu.org>
3084
3085 PR fortran/34476
3086 * expr.c (find_array_element): Check that the array bounds are
3087 constant before using them. Use lower, as well as upper bound.
3088 (check_restricted): Allow implied index variable.
3089
3672065a
PT
30902008-01-08 Paul Thomas <pault@gcc.gnu.org>
3091
3092 PR fortran/34681
3093 * trans_array.c (gfc_trans_deferred_array): Do not null the
3094 data pointer on entering scope, nor deallocate it on leaving
3095 scope, if the symbol has the 'save' attribute.
3096
3097 PR fortran/34704
3098 * trans_decl.c (gfc_finish_var_decl): Derived types with
3099 allocatable components and an initializer must be TREE_STATIC.
3100
3a7b9fda
PT
31012008-01-07 Paul Thomas <pault@gcc.gnu.org>
3102
3103 PR fortran/34672
3104 * module.c (write_generic): Rewrite completely.
3105 (write_module): Change call to write_generic.
3106
bd5db9de
JD
31072008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3108
3109 PR fortran/34659
3110 * scanner.c (load_line): Do not count ' ' as printable when checking for
3111 continuations.
3112
5989df83 31132008-01-06 Paul Thomas <pault@gcc.gnu.org>
ac61ba6a 3114
5989df83
PT
3115 PR fortran/34545
3116 * module.c (load_needed): If the namespace has no proc_name
3117 give it the module symbol.
ac61ba6a 3118
9b09c4de
JD
31192008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3120
3121 PR fortran/34387
3122 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
3123 the dummy variable expression, test for NULL, and pass the variable
3124 address to the called function.
3125
346ecba8
TB
31262007-01-06 Tobias Burnus <burnus@net-b.de>
3127
3128 PR fortran/34658
3129 * match.c (gfc_match_common): Remove blank common in
3130 DATA BLOCK warning.
3131 * resolve.c (resolve_common_vars): New function.
3132 (resolve_common_blocks): Move checks to resolve_common_vars
3133 and invoke that function.
3134 (resolve_types): Call resolve_common_vars for blank commons.
3135
cddcf0d4
TB
31362008-01-06 Tobias Burnus <burnus@net-b.de>
3137
3138 PR fortran/34655
3139 * resolve.c (resolve_equivalence_derived): Reject derived types with
3140 default initialization if equivalenced with COMMON variable.
3141
89c32b0f
TB
31422008-01-06 Tobias Burnus <burnus@net-b.de>
3143
3144 PR fortran/34654
3145 * io.c (check_io_constraints): Disallow unformatted I/O for
3146 internal units.
3147
242633d6
TB
31482008-01-06 Tobias Burnus <burnus@net-b.de>
3149
3150 PR fortran/34660
3151 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
3152 ELEMENTAL functions.
3153
a5c655e8
TB
31542008-01-06 Tobias Burnus <burnus@net-b.de>
3155
3156 PR fortran/34662
3157 * interface.c (compare_actual_formal): Reject parameter
3158 actual to intent(out) dummy.
3159
3c721513
TB
31602008-01-04 Tobias Burnus <burnus@net-b.de>
3161
3162 PR fortran/34557
3163 * primary.c (match_varspec): Gobble whitespace before
3164 checking for '('.