]> gcc.gnu.org Git - gcc.git/blame - gcc/fortran/ChangeLog
re PR fortran/36382 (Support $ as first character in symbol names and in IMPLICT)
[gcc.git] / gcc / fortran / ChangeLog
CommitLineData
6e8cb9be
FXC
12009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2
3 PR fortran/36382
4 * invoke.texi: Document that -fdollar-ok does not allow $ to be
5 used in IMPLICIT statement.
6
713485cc
JW
72009-05-06 Janus Weil <janus@gcc.gnu.org>
8 Paul Thomas <pault@gcc.gnu.org>
9
10 PR fortran/39630
11 * decl.c (match_procedure_interface): New function to match the
12 interface for a PROCEDURE statement.
13 (match_procedure_decl): Call match_procedure_interface.
14 (match_ppc_decl): New function to match the declaration of a
15 procedure pointer component.
16 (gfc_match_procedure): Call match_ppc_decl.
17 (match_binding_attributes): Add new argument 'ppc' and handle the
18 POINTER attribute for procedure pointer components.
19 (match_procedure_in_type,gfc_match_generic): Added new argument to
20 match_binding_attributes.
21 * dump-parse-tree.c (show_expr,show_components,show_code_node): Handle
22 procedure pointer components.
23 * expr.c (free_expr0,gfc_copy_expr,gfc_simplify_expr): Handle EXPR_PPC.
24 (gfc_check_pointer_assign): Handle procedure pointer components, but no
25 full checking yet.
26 (is_proc_ptr_comp): New function to determine if an expression is a
27 procedure pointer component.
28 * gfortran.h (expr_t): Add EXPR_PPC.
29 (symbol_attribute): Add new member 'proc_pointer_comp'.
30 (gfc_component): Add new member 'formal'.
31 (gfc_exec_op): Add EXEC_CALL_PPC.
32 (gfc_get_default_type): Changed first argument.
33 (is_proc_ptr_comp): Add prototype.
34 (gfc_match_varspec): Add new argument.
35 * interface.c (compare_actual_formal): Handle procedure pointer
36 components.
37 * match.c (gfc_match_pointer_assignment,match_typebound_call): Handle
38 procedure pointer components.
39 * module.c (mio_expr): Handle EXPR_PPC.
40 * parse.c (parse_derived): Handle procedure pointer components.
41 * primary.c (gfc_match_varspec): Add new argument 'ppc_arg' and handle
42 procedure pointer components.
43 (gfc_variable_attr): Handle procedure pointer components.
44 (gfc_match_rvalue): Added new argument to gfc_match_varspec and changed
45 first argument of gfc_get_default_type.
46 (match_variable): Added new argument to gfc_match_varspec.
47 * resolve.c (resolve_entries,set_type,resolve_fl_parameter): Changed
48 first argument of gfc_get_default_type.
49 (resolve_structure_cons,resolve_actual_arglist): Handle procedure
50 pointer components.
51 (resolve_ppc_call): New function to resolve a call to a procedure
52 pointer component (subroutine).
53 (resolve_expr_ppc): New function to resolve a call to a procedure
54 pointer component (function).
55 (gfc_resolve_expr): Handle EXPR_PPC.
56 (resolve_code): Handle EXEC_CALL_PPC.
57 (resolve_fl_derived): Copy the interface for a procedure pointer
58 component.
59 (resolve_symbol): Fix overlong line.
60 * st.c (gfc_free_statement): Handle EXEC_CALL_PPC.
61 * symbol.c (gfc_get_default_type): Changed first argument.
62 (gfc_set_default_type): Changed first argument of gfc_get_default_type.
63 (gfc_add_component): Initialize ts.type to BT_UNKNOWN.
64 * trans.h (gfc_conv_function_call): Renamed.
65 * trans.c (gfc_trans_code): Handle EXEC_CALL_PPC.
66 * trans-expr.c (gfc_conv_component_ref): Ditto.
67 (gfc_conv_function_val): Rename to 'conv_function_val', add new
68 argument 'expr' and handle procedure pointer components.
69 (gfc_conv_operator_assign): Renamed gfc_conv_function_val.
70 (gfc_apply_interface_mapping_to_expr): Handle EXPR_PPC.
71 (gfc_conv_function_call): Rename to 'gfc_conv_procedure_call', add new
72 argument 'expr' and handle procedure pointer components.
73 (gfc_get_proc_ptr_comp): New function to get the backend decl for a
74 procedure pointer component.
75 (gfc_conv_function_expr): Renamed gfc_conv_function_call.
76 (gfc_conv_structure): Handle procedure pointer components.
77 * trans-intrinsic.c (gfc_conv_intrinsic_funcall,
78 conv_generic_with_optional_char_arg): Renamed gfc_conv_function_call.
79 * trans-stmt.h (gfc_get_proc_ptr_comp): Add prototype.
80 * trans-stmt.c (gfc_trans_call): Renamed gfc_conv_function_call.
81 * trans-types.h (gfc_get_ppc_type): Add prototype.
82 * trans-types.c (gfc_get_ppc_type): New function to build a tree node
83 for a procedure pointer component.
84 (gfc_get_derived_type): Handle procedure pointer components.
85
b050b2de
TB
862009-05-06 Tobias Burnus <burnus@net-b.de>
87
88 PR fortran/40041
89 * resolve.c (resolve_symbol): Print no warning for implicitly
90 typed intrinsic functions.
91
210aee68
JW
922009-05-05 Janus Weil <janus@gcc.gnu.org>
93
94 PR fortran/39998
95 * expr.c (gfc_check_pointer_assign): Check for statement functions and
96 internal procedures in procedure pointer assignments.
97
e6a5e544
JW
982009-04-28 Janus Weil <janus@gcc.gnu.org>
99
100 PR fortran/39946
101 * resolve.c (resolve_symbol): Correctly copy the interface of a
102 PROCEDURE statement if the interface involves a RESULT variable.
103
6596e2fe
JW
1042009-04-28 Janus Weil <janus@gcc.gnu.org>
105
106 PR fortran/39930
107 PR fortran/39931
108 * expr.c (gfc_check_pointer_assign): Correctly detect if the left hand
109 side is a pointer.
110 * parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity.
111
7d44f531
PT
1122009-04-28 Paul Thomas <pault@gcc.gnu.org>
113
114 PR fortran/39879
115 * trans_expr.c (gfc_conv_procedure_call): Deep copy a derived
116 type parentheses argument if it is a variable with allocatable
117 components.
118
81f40b79
ILT
1192009-04-27 Ian Lance Taylor <iant@google.com>
120
121 * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
122 type.
123 * trans-io.c (st_parameter_field): Add casts to enum type.
124
5846213b
SK
1252009-04-26 Steven G. Kargl <kargl@gcc.gnu.org>
126
127 PR fortran/39893
128 fortran/data.c (gfc_assign_data_value): If the lvalue is an
129 assumed character length entity in a data statement, then
130 return FAILURE to prevent segmentation fault.
131
92061771
JJ
1322009-04-26 Jakub Jelinek <jakub@redhat.com>
133
134 * trans-decl.c: Include pointer-set.h.
135 (nonlocal_dummy_decl_pset, tree nonlocal_dummy_decls): New variables.
136 (gfc_nonlocal_dummy_array_decl): New function.
137 (gfc_get_symbol_decl): Call it for non-local dummy args with saved
138 descriptor.
139 (gfc_get_symbol_decl): Set DECL_BY_REFERENCE when needed.
140 (gfc_generate_function_code): Initialize nonlocal_dummy_decl{s,_pset},
141 chain it to outermost block's vars, destroy it afterwards.
142 * Make-lang.in (trans-decl.o): Depend on pointer-set.h.
143
bc2a4733
JW
1442009-04-25 Janus Weil <janus@gcc.gnu.org>
145
146 PR fortran/39688
147 * decl.c (gfc_match_import): Use 'sym->name' instead of 'name'.
148 They differ if the symbol has been use-renamed.
149
32e8bb8e
ILT
1502009-04-24 Ian Lance Taylor <iant@google.com>
151
152 * gfortran.h (enum gfc_symbol_type): New named enum type, broken
153 out of struct gfc_symbol.
154 (struct gfc_symbol): Use enum gfc_symbol_type.
155 (enum gfc_array_ref_dimen_type): New named enum type, broken out
156 of struct gfc_array_ref).
157 (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
158 (mod_pointee_as): Update declaration.
159 * decl.c (add_global_entry): Change type to enum gfc_symbol_type.
160 (gfc_mod_pointee_as): Change return type to "match".
161 * module.c (mio_array_ref): Add cast to enum type.
162 (mio_symbol): Likewise.
163 * resolve.c (resolve_global_procedure): Change type to enum
164 gfc_symbol_type.
165 * trans-io.c (gfc_build_st_parameter): Change type to unsigned
166 int.
167
e34ccb4c
DK
1682009-04-24 Daniel Kraft <d@domob.eu>
169
170 * gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function.
171 (struct gfc_symtree): Moved `typebound' member inside union.
172 (struct gfc_namespace): Add `tb_sym_root' as new symtree to sort out
173 type-bound procedures there.
174 (gfc_get_tbp_symtree): New procedure.
175 * symbol.c (tentative_tbp_list): New global.
176 (gfc_get_namespace): NULL new `tb_sym_root' member.
177 (gfc_new_symtree): Removed initialization of `typebound' member.
178 (gfc_undo_symbols): Process list of tentative tbp's.
179 (gfc_commit_symbols): Ditto.
180 (free_tb_tree): New method.
181 (gfc_free_namespace): Call it.
182 (gfc_get_typebound_proc): New method.
183 (gfc_get_tbp_symtree): New method.
184 (gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree
185 and gfc_namespace with regards to tbp's.
186 * dump-parse-tree.c (show_typebound): Ditto.
187 * primary.c (gfc_match_varspec): Ditto. Don't reference tbp-symbol
188 as it isn't a symbol any longer.
189 * module.c (mio_typebound_symtree): Adapt to changes.
190 (mio_typebound_proc): Ditto, create symtrees using `gfc_get_tbp_symtree'
191 rather than `gfc_get_sym_tree'.
192 (mio_f2k_derived): Ditto.
193 * decl.c (match_procedure_in_type): Ditto.
194 (gfc_match_generic): Ditto. Don't reference tbp-symbol.
195 * resolve.c (check_typebound_override): Adapt to changes.
196 (resolve_typebound_generic): Ditto.
197 (resolve_typebound_procedures): Ditto.
198 (ensure_not_abstract_walker): Ditto.
199 (ensure_not_abstract): Ditto.
200 (resolve_typebound_procedure): Ditto, ignore erraneous symbols (for
201 instance, through removed tentative ones).
202 * gfc-internals.texi (Type-bound procedures): Document changes.
203
87526ff1
JW
2042009-04-24 Janus Weil <janus@gcc.gnu.org>
205
206 PR fortran/39861
207 PR fortran/39864
208 * symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
209 for the formal arguments.
210
d1b38208
TG
2112009-04-21 Taras Glek <tglek@mozilla.com>
212
213 * f95-lang.c: Update GTY annotations to new syntax.
214 * trans-intrinsic.c: Likewise.
215 * trans-io.c: Likewise.
216 * trans.h: Likewise.
217
c73b6478
JW
2182009-04-22 Janus Weil <janus@gcc.gnu.org>
219
220 PR fortran/39735
221 * decl.c (add_hidden_procptr_result): Bugfix for procptr results.
222 (match_procedure_decl): Set if_source.
223 * expr.c (gfc_check_pointer_assign): Bugfix: Return after error.
224 And: Check interface also for IFSRC_UNKNOWN (return type may be known).
225 * gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE,
226 add documentation. Rename copy_formal_args and copy_formal_args_intr.
227 * interface.c (gfc_compare_interfaces): Check for return types,
228 handle IFSRC_UNKNOWN.
229 (compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed.
230 (gfc_procedure_use): Modified handling of intrinsics.
231 * intrinsic.c (add_functions): Bugfix for "dim".
232 * resolve.c (resolve_intrinsic): New function to resolve intrinsics,
233 which copies the interface from isym to sym.
234 (resolve_procedure_expression,resolve_function): Use new function
235 'resolve_intrinsic'.
236 (resolve_symbol): Add function attribute for externals with return type
237 and use new function 'resolve_intrinsic'.
238 * symbol.c (ifsrc_types): Remove string for IFSRC_USAGE.
239 (copy_formal_args): Renamed to gfc_copy_formal_args.
240 (copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr.
241 * trans-const.c (gfc_conv_const_charlen): Handle cl==NULL.
242
ad41bd84
JM
2432009-04-21 Joseph Myers <joseph@codesourcery.com>
244
245 * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004,
246 ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008,
247 ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add
248 copyright and license notices.
249 * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
250 ChangeLog-2008: Correct dates.
251
47b0b4fa
TB
2522009-04-20 Tobias Burnus <burnus@net-b.de>
253
254 PR fortran/39811
255 * scanner.c (load_line): Fix bogus "&" compile-time diagnostic.
256
c867b7b6
PT
2572009-04-20 Paul Thomas <pault@gcc.gnu.org>
258
259 PR fortran/39800
260 * resolve.c (is_sym_host_assoc): New function.
261 (resolve_fl_derived): Call it when checking PRIVATE components
262 of PUBLIC derived types. Change gfc_error to a gfc_notify_std
263 with std=f2003.
264 (resolve_fl_namelist): Call it twice to check for host
265 association.
266
8fa2df72
ILT
2672009-04-20 Ian Lance Taylor <iant@google.com>
268
269 * module.c (import_iso_c_binding_module): Add casts to enum type.
270 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op to enum
271 tree_code.
272 (gfc_conv_intrinsic_anyall): Likewise.
273 (gfc_conv_intrinsic_arith): Likewise.
274 (gfc_conv_intrinsic_minmaxloc): Likewise.
275 (gfc_conv_intrinsic_minmaxval): Likewise.
276 (gfc_conv_intrinsic_bitop): Likewise.
277 (gfc_conv_intrinsic_singlebitop): Likewise.
278 (gfc_conv_intrinsic_strcmp): Likewise.
279
34d01e1d
VL
2802009-04-20 Vasilis Liaskovitis <vliaskov@gmail.com>
281 Jakub Jelinek <jakub@redhat.com>
282
283 PR fortran/35423
284 * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT,
285 OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define.
286 (ompws_flags): New extern decl.
287 * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR
288 for the outer dimension if ompws_flags allow it.
289 * trans.c (gfc_generate_code): Clear ompws_flags.
290 * trans-expr.c (gfc_trans_assignment_1): Allow worksharing
291 array assignments inside of !$omp workshare.
292 * trans-stmt.c (gfc_trans_where_3): Similarly for where statements
293 and constructs.
294 * trans-openmp.c (ompws_flags): New variable.
295 (gfc_trans_omp_workshare): Rewritten.
296
cadb8f42
DK
2972009-04-11 Daniel Kraft <d@domob.eu>
298
299 PR fortran/37746
300 * gfortran.h (struct gfc_charlen): New field `passed_length' to store
301 the actual passed string length for dummy arguments.
302 * trans-decl.c (gfc_create_string_length): Formatting fixes and added
303 assertion, moved a local variable into the innermost block it is needed.
304 (create_function_arglist): Removed TODO about the check being
305 implemented and initialize cl->passed_length here.
306 (add_argument_checking): New method.
307 (gfc_generate_function_code): Call the argument checking method.
308
d1e49db4
JW
3092009-04-11 Janus Weil <janus@gcc.gnu.org>
310
311 PR fortran/39692
312 * symbol.c (check_conflict): Reject procedure pointers for -std=f95.
313
3142009-04-11 Daniel Franke <franke.daniel@gmail.com>
568eecad
DF
315
316 * resolve.c (resolve_global_procedure): Enable whole-file checking for
317 procedures that are declared later in the file.
318
a862775d
PB
3192009-04-10 Paolo Bonzini <bonzini@gnu.org>
320
321 PR middle-end/39701
322 * trans.c (gfc_allocate_with_status): Fix type mismatches
323 on "pstat == 0".
324
045ac367
DF
3252009-04-10 Daniel Franke <franke.daniel@gmail.com>
326
327 PR fortran/38709
328 * expr.c (find_array_section): Leave early on zero-sized arrays.
329
3070bab4
JW
3302009-04-09 Janus Weil <janus@gcc.gnu.org>
331
332 PR fortran/36704
333 * decl.c (add_hidden_procptr_result): New function for handling
334 procedure pointer return values by adding a hidden result variable.
335 (variable_decl,match_procedure_decl,gfc_match_function_decl,
336 gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer
337 return values.
338 * parse.c (parse_interface): Add EXTERNAL attribute only after
339 FUNCTION/SUBROUTINE declaration is complete.
340 * primary.c (replace_hidden_procptr_result): New function for replacing
341 function symbol by hidden result variable.
342 (gfc_match_rvalue,match_variable): Replace symbol by hidden result
343 variable.
344 * resolve.c (resolve_contained_fntype,resolve_function,resolve_variable,
345 resolve_symbol): Allow for procedure pointer function results.
346 (resolve_fl_procedure): Conflict detection moved here from
347 'check_conflict'.
348 * symbol.c (gfc_check_function_type): Allow for procedure pointer
349 function results.
350 (check_conflict): Move some conflict detection to resolution stage.
351 * trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden
352 result variables.
353
dead0bae
JJ
3542009-04-08 Jakub Jelinek <jakub@redhat.com>
355
356 * trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't
357 contain TYPE_STRING_FLAG types.
358
cba2a54e
JB
3592009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
360
361 PR fortran/39670
362 * invoke.texi (fdollar-ok): Fix typo.
363
f4a55802
DF
3642009-04-08 Daniel Franke <franke.daniel@gmail.com>
365
366 PR fortran/39670
367 * invoke.texi (fdollar-ok): Clarify limitations.
368
bafc96b4
PT
3692009-04-08 Paul Thomas <pault@gcc.gnu.org>
370
371 PR fortran/38863
372 * trans-array.c (gfc_trans_deferred_array): Return if this
373 is a result variable.
374
13d138bf
JW
3752009-04-07 Janus Weil <janus@gcc.gnu.org>
376
377 PR fortran/38152
378 * trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for
379 procedure pointer decls.
380
3afadac3
JW
3812009-04-07 Janus Weil <janus@gcc.gnu.org>
382
c22ba5ff 383 PR fortran/38290
3afadac3
JW
384 * expr.c (gfc_check_pointer_assign): Enable interface check for
385 procedure pointers.
386 * gfortran.h: Add copy_formal_args_intr.
387 * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
388 if second argument is an intrinsic.
389 (compare_intr_interfaces): Correctly set attr.function, attr.subroutine
390 and ts.
391 (compare_parameter): Call gfc_compare_interfaces also for intrinsics.
392 * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
393 intrinsic interfaces here. Must happen earlier.
394 (resolve_symbol): Resolution of intrinsic interfaces moved here from
395 resolve_specific_..., and formal args are now copied from intrinsic
396 interfaces.
397 * symbol.c (copy_formal_args_intr): New function to copy the formal
398 arguments from an intinsic procedure.
399
ea0a374b
PT
4002009-04-06 Paul Thomas <pault@gcc.gnu.org>
401
402 PR fortran/38863
403 * dependency.c (ref_same_as_full_array): New function.
404 (gfc_dep_resolver): Call it.
405
1d146030
JW
4062009-04-06 Janus Weil <janus@gcc.gnu.org>
407
408 PR fortran/39414
409 * decl.c (match_procedure_decl): Fix double declaration problems with
410 PROCEDURE statements.
411 * symbol.c (gfc_add_type): Ditto.
412
59e36b72
PT
4132009-04-06 Paul Thomas <pault@gcc.gnu.org>
414
415 PR fortran/36091
416 * trans-array.c (gfc_conv_array_ref): If the symbol has the
417 temporary attribute use the array_spec for the bounds.
418 * gfortran.h : Add the temporary field to the structure
419 'symbol_attribute'.
420 * trans-stmt.c (forall_make_variable_temp): Set the symbol's
421 temporary attribute.
422
beb64b4a
DF
4232009-04-05 Daniel Franke <franke.daniel@gmail.com>
424
425 PR fortran/29458
426 * trans-array.c (gfc_trans_array_constructor_value): Shadow
427 implied do-loop variable to avoid spurious middle-end warnings.
428
cf7d2eb0
TB
4292009-04-04 Tobias Burnus <burnus@net-b.de>
430
431 PR fortran/39577
432 * trans-decl.c (gfc_generate_function_code): Move recursive
433 check to the right position.
434
6f85546f
PT
4352009-04-04 Paul Thomas <pault@gcc.gnu.org>
436
437 PR fortran/37614
438 * trans-common.c (translate_common): Do not offset the whole
439 coomon block.
440
6f9c9d6d
TB
4412009-04-03 Tobias Burnus <burnus@net-b.de>
442
443 PR fortran/39594
444 * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol
445 if it is not a procedure pointer.
446 * primary.c (match_actual_arg): Ditto.
447
47580d22
JM
4482009-03-31 Joseph Myers <joseph@codesourcery.com>
449
450 PR preprocessor/15638
451 * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.
452
3759634f
SK
4532009-03-30 Steven G. Kargl <kargls@comcast.net>
454
455 PR fortran/38389
456 * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG.
457 (gfc_trans_deallocate): Add translation of ERRMSG. Remove stale
458 comments. Minor whitespace cleanup.
459 * resolve.c(is_scalar_expr_ptr): Whitespace cleanup.
460 (resolve_deallocate_expr (gfc_expr *e): Update error message.
461 (resolve_allocate_expr): Remove dead code. Update error message.
462 Move error checking to ...
463 (resolve_allocate_deallocate): ... here. Add additional error
464 checking for STAT, ERRMSG, and allocate-objects.
465 * match.c(gfc_match_allocate,gfc_match_deallocate): Parse ERRMSG.
466 Check for redundant uses of STAT and ERRMSG. Reword error message
467 and add checking for pointer, allocatable, and proc_pointer attributes.
468
71a7778c
PT
4692009-03-30 Paul Thomas <pault@gcc.gnu.org>
470
471 PR fortran/22571
472 PR fortran/26227
473 PR fortran/24886
474 * symbol.c : Add gfc_global_ns_list.
475 * decl.c (add_global_entry): Set the namespace ('ns') field.
476 * gfortran.h : Add the resolved field to gfc_namespace. Add the
477 namespace ('ns') field to gfc_gsymbol. Add flag_whole_file to
478 gfc_option_t. Add the prototype for gfc_free_dt_list.
479 * lang.opt : Add the whole-file option.
480 * invoke.texi : Document the whole-file option.
481 * resolve.c (resolve_global_procedure): If the fwhole-file
482 option is set, reorder gsymbols to ensure that translation is
483 in the right order. Resolve the gsymbol's namespace if that
484 has not occurred and then check interfaces.
485 (resolve_function): Move call to resolve_global_procedure.
486 (resolve_call): The same.
487 (resolve_codes): Store the current labels_obstack.
488 (gfc_resolve) : Return if the namespace is already resolved.
489 trans-decl.c (gfc_get_extern_function_decl): If the whole_file
490 option is selected, use the backend_decl of a gsymbol, if it is
491 available.
492 parse.c (add_global_procedure, add_global_program): If the flag
493 whole-file is set, add the namespace to the gsymbol.
494 (gfc_parse_file): On -fwhole-file, put procedure namespaces on
495 the global namespace list. Rearrange to do resolution of all
496 the procedures in a file, followed by their translation.
497 * options.c (gfc_init_options): Add -fwhole-file.
498 (gfc_handle_option): The same.
499
f6d53468
UW
5002009-03-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
501
502 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
503 family of intrinsics instead of BUILT_IN_INF family.
504 * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
505 BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
506
665733c1
JJ
5072009-03-30 Jakub Jelinek <jakub@redhat.com>
508
509 * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
510 sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
511
8ce94e44
JM
5122009-03-30 Joseph Myers <joseph@codesourcery.com>
513
514 PR rtl-optimization/323
515 * options.c (gfc_post_options): Set
516 flag_excess_precision_cmdline. Give an error for
517 -fexcess-precision=standard for processors where the option is
518 significant.
519
148e4216
JM
5202009-03-29 Joseph Myers <joseph@codesourcery.com>
521
522 PR preprocessor/34695
523 * cpp.c (cb_cpp_error): New.
524 (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
525 Don't check cpp_errors (cpp_in).
526 (gfc_cpp_init_0): Set cb->error.
527
6bb62671
SK
5282009-03-29 Steven G. Kargl <kargl@gcc.gnu.org>
529
530 PR fortran/38823
531 * gfortran.h: Add ARITH_PROHIBIT to arith enum.
532 expr.c (gfc_match_init_expr): Add global variable init_flag to
533 flag matching an initialization expression.
534 (check_intrinsic_op): Move no longer reachable error message to ...
535 * arith.c (arith_power): ... here. Remove gfc_ prefix in
536 gfc_arith_power. Use init_flag. Allow constant folding of x**y
537 when y is REAL or COMPLEX.
538 (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
539 for constant folding.
540 * gfc_power: Update gfc_arith_power to arith_power
541
b0e5fa94
DK
5422009-03-29 Daniel Kraft <d@domob.eu>
543
544 PR fortran/37423
545 * gfortran.h (struct gfc_typebound_proc): Added new flag `deferred' and
546 added a comment explaining DEFERRED binding handling.
547 * decl.c (match_binding_attributes): Really match DEFERRED attribute.
548 (match_procedure_in_type): Really match PROCEDURE(interface) syntax
549 and do some validity checks for DEFERRED and this construct.
550 * module.c (binding_overriding): New string constant for DEFERRED.
551 (mio_typebound_proc): Module-IO DEFERRED flag.
552 * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
553 binding is not overridden by a DEFERRED one.
554 (resolve_typebound_procedure): Allow abstract interfaces as targets
555 for DEFERRED bindings.
556 (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
557 (resolve_fl_derived): Use new `ensure_not_abstract' method for
558 non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
559 binding is overridden.
560 (check_typebound_baseobject): New method.
561 (resolve_compcall), (resolve_typebound_call): Check base-object of
562 the type-bound procedure call.
563 * gfc-internals.texi (Type-bound procedures): Document a little bit
564 about internal handling of DEFERRED bindings.
565
ad41bd84 566