config-lang.in: Remove dead commented line.
[gcc.git] / gcc / fortran / ChangeLog
1 2004-08-25 Paul Brook <paul@codesourcery.com>
2
3 * config-lang.in: Remove dead commented line.
4 * module.c: Replace g95 with gfortran in comment.
5
6 2004-08-25 Paul Brook <paul@codesourcery.com>
7
8 PR fortran/17190
9 * arith.c (gfc_mpfr_to_mpz): Workaround mpfr bug.
10
11 2004-08-25 Paul Brook <paul@codesourcery.com>
12
13 PR fortran/17144
14 * trans-array.c (gfc_trans_allocate_temp_array): Remove
15 string_length argument.
16 (gfc_trans_array_ctor_element): New function.
17 (gfc_trans_array_constructor_subarray): Use it.
18 (gfc_trans_array_constructor_value): Ditto. Handle constant
19 character arrays.
20 (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions.
21 (gfc_trans_array_constructor): Use them.
22 (gfc_add_loop_ss_code): Update to new gfc_ss layout.
23 (gfc_conv_ss_descriptor): Remember section string length.
24 (gfc_conv_scalarized_array_ref): Ditto. Remove dead code.
25 (gfc_conv_resolve_dependencies): Update to new gfc_ss layout.
26 (gfc_conv_expr_descriptor): Ditto.
27 (gfc_conv_loop_setup): Ditto. Spelling fixes.
28 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
29 * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout.
30 * trans-expr.c (gfc_conv_component_ref): Turn error into ICE.
31 (gfc_conv_variable): Set string_length from section.
32 (gfc_conv_function_call): Remove extra argument.
33 (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout.
34 * trans-types.c (gfc_get_character_type_len): New function.
35 (gfc_get_character_type): Use it.
36 (gfc_get_dtype): Return zero for internal types.
37 * trans-types.h (gfc_get_character_type_len): Add prototype.
38 * trans.h (struct gfc_ss): Move string_length out of union.
39
40 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
41
42 * trans.h (build2_v, build3_v): New macros.
43 (build_v): Remove.
44 * f95-lang.c (gfc_truthvalue_conversion): Use build2 instead of
45 build.
46 * trans-array.c (gfc_conv_descriptor_data,
47 gfc_conv_descriptor_offset, gfc_conv_descriptor_dimension,
48 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
49 gfc_conv_descriptor_ubound, gfc_trans_allocate_array_storage,
50 gfc_trans_allocate_temp_array,
51 gfc_trans_array_constructor_subarray,
52 gfc_trans_array_constructor_value, gfc_conv_array_index_ref,
53 gfc_trans_array_bound_check, gfc_conv_array_index_offset,
54 gfc_conv_scalarized_array_ref, gfc_conv_array_ref,
55 gfc_conv_array_ref, gfc_trans_preloop_setup,
56 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
57 gfc_conv_loop_setup, gfc_array_init_size,
58 gfc_conv_array_initializer, gfc_trans_array_bounds,
59 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
60 gfc_conv_expr_descriptor, gfc_conv_array_parameter,
61 gfc_trans_deferred_array): Use buildN and buildN_v macros instead
62 of build and build_v as appropriate.
63 * trans-common.c (create_common): Same.
64 * trans-decl.c (gfc_trans_auto_character_variable,
65 gfc_trans_entry_master_switch, gfc_generate_function_code): Same.
66 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
67 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
68 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
69 gfc_conv_expr_op, gfc_conv_function_call,
70 gfc_trans_structure_assign): Same.
71 * trans-intrinsic.c (build_fixbound_expr, build_round_expr,
72 gfc_conv_intrinsic_aint, gfc_conv_intrinsic_bound,
73 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
74 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
75 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_minmax,
76 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
77 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_minmaxloc,
78 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
79 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_singlebitop,
80 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
81 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_strcmp,
82 gfc_conv_allocated, gfc_conv_associated, prepare_arg_info,
83 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
84 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat,
85 gfc_conv_intrinsic_iargc): Same.
86 * trans-io.c (set_parameter_value, set_parameter_ref, set_string,
87 set_flag, add_case, io_result, transfer_namelist_element,
88 transfer_expr): Same.
89 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_if_1,
90 gfc_trans_arithmetic_if, gfc_trans_do, gfc_trans_do_while,
91 gfc_trans_integer_select, gfc_trans_logical_select,
92 gfc_trans_character_select, gfc_trans_forall_loop,
93 gfc_trans_nested_forall_loop, gfc_do_allocate,
94 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
95 compute_inner_temp_size, compute_overall_iter_number,
96 allocate_temp_for_forall_nest, gfc_trans_pointer_assign_need_temp,
97 gfc_trans_forall_1, gfc_evaluate_where_mask,
98 gfc_trans_where_assign, gfc_trans_allocate): Same.
99 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Same.
100 * trans.c (gfc_add_modify_expr, gfc_finish_block,
101 gfc_build_array_ref, gfc_build_function_call,
102 gfc_trans_runtime_check): Same.
103
104 2004-08-25 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
105
106 * trans-const.c (gfc_conv_mpz_to_tree): Change call to
107 build_int_cst to build_int_cst_wide in accordance to Nathan's
108 previous patch.
109
110 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
111
112 * trans-array.c (gfc_trans_array_constructor_value): Adjust
113 build_int_cst calls.
114 * trans-const.c (gfc_build_string_const, gfc_init_constants,
115 gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise.
116 * trans-decl.c (gfc_get_symbol_decl, build_entry_thunks,
117 gfc_trans_entry_master_switch): Likewise.
118 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
119 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
120 * trans-io.c (add_case, set_error_locus,
121 transfer_namelist_element, transfer_expr): Likewise.
122 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
123 gfc_trans_stop, gfc_trans_character_select): Likewise.
124 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
125 * trans.c (gfc_trans_runtime_check): Likewise.
126
127 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
128
129 * trans-decl.c, trans-types.c: Add and remove blank lines as
130 required.
131
132 2004-08-24 Richard Henderson <rth@redhat.com>
133
134 * trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
135
136 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
137
138 * resolve.c (merge_argument_lists): Revert unintentionally
139 committed change.
140
141 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
142
143 * trans-decl.c (build_function_decl): Fix spelling in comment.
144 (build_entry_thunks): Remove code with no function.
145 (gfc_build_intrinsic_function_decls): Remove empty line.
146
147 * resolve.c (resolve_entries): Fix a bunch of comment typos.
148
149 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
150
151 * f95-lang.c (gfc_init_decl_processing): Adjust
152 build_common_tree_nodes call.
153
154 2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
155
156 * trans-types.c: Spelling and formatting fixes.
157
158 2004-08-23 Richard Henderson <rth@redhat.com>
159
160 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_getlimbn instead
161 of going through an intermediate string. Fix 32/64 int/long bug.
162
163 2004-08-23 Eric Christopher <echristo@redhat.com>
164
165 * trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
166 usage. Use build_vector_type_for_mode for vector types.
167
168 2004-08-22 Richard Henderson <rth@redhat.com>
169
170 PR 13465
171 * data.c (find_con_by_offset): Search ordered list; handle
172 elements with repeat counts.
173 (gfc_assign_data_value_range): New.
174 * gfortran.h (struct gfc_data_value): Make repeat unsigned.
175 (gfc_assign_data_value_range): Declare.
176 * match.c (top_val_list): Extract repeat count into a temporary.
177 * resolve.c (values): Make left unsigned.
178 (next_data_value): Don't decrement left.
179 (check_data_variable): Use gfc_assign_data_value_range.
180
181 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
182
183 * trans-const.c, trans-decl.c, trans-expr.c: Spelling fixes.
184
185 2004-08-22 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
186
187 * check.c (gfc_check_reduction): Rename to ...
188 (check_reduction): ... this. Make static. Don't check type of
189 first argument.
190 (gfc_check_minval_maxval, gfc_check_prodcut_sum): New functions.
191 * intrinsic.c (add_functions): Change MAXVAL, MINVAL, PRODUCT and
192 SUM to use new check functions.
193 (check_specific): Change logic to call new functions.
194 * intrinsic.h (gfc_check_minval_maxval, gfc_check_product_sum):
195 Add prototypes.
196 (gfc_check_reduction): Remove prototype.
197
198 2004-08-20 Paul Brook <paul@codesourcery.com>
199 Canqun Yang <canqun@nudt.edu.cn>
200
201 PR fortran/17077
202 * trans-array.c (gfc_conv_array_parameter): Pass correct pointer
203 for automatic arrays.
204 * trans-types.c (gfc_get_nodesc_array_type): Add comment.
205
206 2004-08-19 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
207 (Port from g95)
208
209 PR fortran/17074
210 * match.c (match_simple_forall, match_simple_where): Forward-declare.
211 (gfc_match_if): Order statement list alphabetically, add WHERE and
212 FORALL, remove double PAUSE.
213 (gfc_match_simple_where, match_forall_header,
214 gfc_match_simple_forall): New functions.
215 (gfc_match_forall): Use match_forall_header.
216
217 2004-08-19 Paul Brook <paul@codesourcery.com>
218
219 PR fortran/17091
220 * gfortran.h (gfc_access): Give ACCESS_UNKNOWN value 0.
221 * symbol.c (gfc_clear_attr): Use memset.
222
223 2004-08-19 Paul Brook <paul@codesourcery.com>
224
225 PR fortran/14976
226 PR fortran/16228
227 * data.c (assign_substring_data_value): Remove.
228 (create_character_intializer): New function.
229 (gfc_assign_data_value): Track the typespec for the current
230 subobject. Use create_character_intializer.
231
232 2004-08-19 Erik Schnetter <schnetter@aei.mpg.de>
233
234 PR fortran/16946
235 * check.c (gfc_check_reduction): New function.
236 (gfc_check_minval_maxval): Removed.
237 (gfc_check_product): Removed.
238 (gfc_check_sum): Removed.
239 * intrinsic.h: Add/remove declarations for these.
240 * gfortran.h: Add field f3red to union gfc_check_f.
241 * intrinsic.c (add_sym_3red): New function.
242 (add_functions): Register maxval, minval, product, and sum intrinsics
243 through add_sym_3red.
244 (check_specific): Handle f3red union field.
245 * iresolve.c: Whitespace change.
246
247 2004-08-18 Paul Brook <paul@codesourcery.com>
248
249 * trans-types.c (gfc_sym_type): Use pointer types for optional args.
250
251 2004-08-18 Victor Leikehman <lei@il.ibm.com>
252
253 PR fortran/13278
254 * trans-io.c (transfer_namelist_element): New. Recursively handle
255 derived-type variables. Pass string lengths.
256 (build_dt): Code moved to build_namelist, with some
257 changes and additions.
258 (gfc_build_io_library_fndecls): Declare the fifth
259 argument in st_set_nml_var_char -- string_length.
260
261 2004-08-17 Paul Brook <paul@codesourcery.com>
262 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
263
264 PR fortran/13082
265 * decl.c (get_proc_name): Update mystery comment.
266 (gfc_match_entry): Check for errors earlier. Add entry point to list.
267 * dump-parse-tree.c (gfc_show_code_node): Print EXEC_ENTRY nodes.
268 * gfortran.h (symbol_attribute): Add entry_master. Document entry.
269 (struct gfc_entry_list): Define.
270 (gfc_get_entry_list): Define.
271 (struct gfc_namespace): Add refs and entries.
272 (enum gfc_exec_op): Add EXEC_ENTRY.
273 (struct gfc_code): Add ext.entry.
274 * module.c (ab_attribute, attr_bits): Remove AB_ENTRY.
275 (mio_symbol_attribute): Don't save/reture addr->entry.
276 (mio_namespace_ref): Refcount namespaces.
277 * parse.c (accept_statement): Handle ST_ENTRY.
278 (gfc_fixup_sibling_symbols): Mark symbol as referenced.
279 (parse_contained): Fixup sibling references to entry points
280 after parsing the procedure body.
281 * resolve.c (resolve_contained_fntype): New function.
282 (merge_argument_lists, resolve_entries): New functions.
283 (resolve_contained_functions): Use them.
284 (resolve_code): Handle EXEC_ENTRY.
285 (gfc_resolve): Call resolve_entries.
286 * st.c (gfc_free_statement): Handle EXEC_ENTRY.
287 * symbol.c (gfc_get_namespace): Refcount namespaces.
288 (gfc_free_namespace): Ditto.
289 * trans-array.c (gfc_trans_dummy_array_bias): Treat all args as
290 optional when multiple entry points are present.
291 * trans-decl.c (gfc_get_symbol_decl): Remove incorrect check.
292 (gfc_get_extern_function_decl): Add assertion. Fix coment.
293 (create_function_arglist, trans_function_start, build_entry_thunks):
294 New functions.
295 (gfc_build_function_decl): Rename ...
296 (build_function_decl): ... to this.
297 (gfc_create_function_decl): New function.
298 (gfc_generate_contained_functions): Use it.
299 (gfc_trans_entry_master_switch): New function.
300 (gfc_generate_function_code): Use new functions.
301 * trans-stmt.c (gfc_trans_entry): New function.
302 * trans-stmt.h (gfc_trans_entry): Add prototype.
303 * trans-types.c (gfc_get_function_type): Add entry point argument.
304 * trans.c (gfc_trans_code): Handle EXEC_ENTRY.
305 (gfc_generate_module_code): Call gfc_create_function_decl.
306 * trans.h (gfc_build_function_decl): Remove.
307 (gfc_create_function_decl): Add prototype.
308
309 2004-08-15 Andrew Pinski <apinski@apple.com>
310
311 PR fortran/17030
312 * f95-lang.c (gfc_init_builtin_functions): Initialize the builtins
313 for cabs{,f} and copysign{,f}.
314 * trans-decl.c (gfor_fndecl_math_cabsf): Delete.
315 (gfor_fndecl_math_cabs): Delete.
316 (gfor_fndecl_math_sign4): Delete.
317 (gfor_fndecl_math_sign8): Delete.
318 (gfc_build_intrinsic_function_decls): Remove the
319 initializing of cabs{,f} and copysign{,f} functions.
320 * trans-intrinsic.c (gfc_conv_intrinsic_abs): Use the builtins
321 instead of the functions definitions.
322 (gfc_conv_intrinsic_sign): Likewise.
323 * trans.h (gfor_fndecl_math_cabsf): Delete.
324 (gfor_fndecl_math_cabs): Delete.
325 (gfor_fndecl_math_sign4): Delete.
326 (gfor_fndecl_math_sign8): Delete.
327
328 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
329
330 * trans-array.c (gfc_trans_array_constructor_value): Use
331 build_int_cst.
332 * trans-const.c (gfc_build_string_const,
333 gfc_init_constants, gfc_conv_mpz_to_tree,
334 gfc_conv_constant_to_tree): Likewise.
335 * trans-decl.c (gfc_get_symbol_decl): Likewise.
336 * trans-intrinsic.c (gfc_conv_intrinsic_ibits,
337 gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
338 * trans-io.c (add_case, set_error_locus, build_dt,
339 transfer_expr): Likewise.
340 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
341 gfc_trans_stop, gfc_trans_character_select): Likewise.
342 * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
343 * trans.c (gfc_trans_runtime_check): Likewise.
344
345 2004-08-14 Paul Brook <paul@codesourcery.com>
346
347 * trans-decl.c (gfc_build_function_decl): Remove dead code.
348
349 2004-08-14 Paul Brook <paul@codesourcery.com>
350
351 * trans-arry.c (gfc_trans_auto_array_allocation): Remove unused var.
352
353 2004-08-13 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
354
355 * gfortran.h: Add comments.
356 * parse.c (parse_contained): Fix comment typo.
357 * resolve.c (was_declared): Ditto.
358 * symbol.c: Ditto.
359
360 2004-08-11 Paul Brook <paul@codeourcery.com>
361
362 PR fortran/16917
363 * intrinsic.c (add_functions): Add dfloat as an alias for dble.
364
365 2004-08-10 Richard Henderson <rth@redhat.com>
366
367 * f95-lang.c (gfc_init_builtin_functions): Remove
368 __builtin_stack_alloc, add __builtin_alloca.
369 * trans-array.c (gfc_trans_auto_array_allocation): Use DECL_EXPR.
370 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
371
372 2004-08-10 Paul Brook <paul@codesourcery.com>
373
374 * trans-io.c (transfer_expr): Handle pointters.
375
376 2004-08-10 Paul Brook <paul@codesourcery.com>
377
378 PR fortran/16919
379 * trans-array.c (gfc_add_loop_ss_code): Handle GFC_SS_COMPONENT.
380 (gfc_conv_array_index_offset): Allow "temporary" with nonzero delta.
381 (gfc_trans_preloop_setup, gfc_trans_scalarized_loop_boundary):
382 Handle GFC_SS_COMPONENT.
383 (gfc_conv_ss_startstride): Ditto. Set ss->shape.
384 (gfc_conv_loop_setup): Tweak commends. Remove dead code.
385 Use ss->shape.
386 (gfc_conv_array_initializer): Call specific initializer routines.
387 * trans-expr.c (gfc_trans_structure_assign): New function.
388 (gfc_trans_subarray_assign): New function.
389 (gfc_trans_subcomponent_assign): New fucntion
390 (gfc_conv_structure): Use them.
391 * trans.h (gfc_ss_type): Add GFC_SS_COMPONENT.
392 (gfc_ss): Add shape.
393
394 2004-08-08 Victor Leikehman <lei@il.ibm.com>
395
396 * simplify.c (gfc_simplify_shape): Bugfix.
397 * expr.c (gfc_copy_shape_excluding): New function.
398 * gfortran.h (gfc_get_shape): Bugfix.
399 (gfc_copy_shape_excluding): Added declaration.
400 * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
401 gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound,
402 gfc_resolve_ubound, gfc_resolve_transpose): Added compile
403 time resolution of shape.
404
405 2004-08-06 Janne Blomqvist <jblomqvi@cc.hut.fi>
406
407 * intrinsic.c (add_subroutines): Add getenv and
408 get_environment_variable. (add_sym_5s): New function.
409 * intrinsic.h (gfc_resolve_get_environment_variable): Add
410 prototype.
411 * iresolve.c (gfc_resolve_get_environment_variable): New
412 function.
413
414 2004-08-06 Feng Wang <fengwang@nudt.edu.cn>
415
416 * f95-lang.c (gfc_init_builtin_functions): Fix the number of
417 __builtin_pow[f] arguments.
418
419 2004-08-06 Steven G. Kargl <kargls@comcast.net>
420
421 * arith.c: Add #define for model numbers. Remove global GMP variables.
422 (natural_logarithm,common_logarithm,exponential,sine,
423 cosine,arctangent,hypercos,hypersine ): Remove.
424 (gfc_mpfr_to_mpz,gfc_set_model_kind,gfc_set_model): New functions.
425 (arctangent2,gfc_arith_init_1,gfc_arith_done_1
426 gfc_check_real_range, gfc_constant_result, gfc_range_check,
427 gfc_arith_uminus,gfc_arith_plus, gfc_arith_minus, gfc_arith_times,
428 gfc_arith_divide,complex_reciprocal,complex_pow_ui,
429 gfc_arith_power,gfc_compare_expr,compare_complex,gfc_convert_real,
430 gfc_convert_complex,gfc_int2real,gfc_int2complex,
431 gfc_real2int,gfc_real2real,gfc_real2complex,
432 gfc_complex2int,gfc_complex2real,gfc_complex2complex): Convert GMP
433 to MPFR, use new functions.
434 * arith.h: Remove extern global variables.
435 (natural_logarithm,common_logarithm,exponential, sine, cosine,
436 arctangent,hypercos,hypersine): Remove prototypes.
437 (arctangent2): Update prototype from GMP to MPFR.
438 (gfc_mpfr_to_mpz, gfc_set_model_kind,gfc_set_model): Add prototypes.
439 * dump-parse-tree.c (gfc_show_expr): Convert GMP to MPFR.
440 * expr.c (free_expr0,gfc_copy_expr): Convert GMP to MPFR.
441 * gfortran.h (GFC_REAL_BITS): Remove.
442 (arith): Add ARITH_NAN.
443 Include mpfr.h. Define GFC_RND_MODE.
444 Rename GCC_GFORTRAN_H GFC_GFC_H.
445 (gfc_expr): Convert GMP to MPFR.
446 * module.c: Add arith.h, correct type in comment.
447 (mio_gmp_real): Convert GMP to MPFR.
448 (mio_expr): Use gfc_set_model_kind().
449 * primary.c: Update copyright date with 2004.
450 (match_real_constant,match_const_complex_part): Convert GMP to MPFR.
451 * simplify.c: Remove global GMP variables
452 (gfc_simplify_abs,gfc_simplify_acos,gfc_simplify_aimag,
453 gfc_simplify_aint,gfc_simplify_dint,gfc_simplify_anint,
454 gfc_simplify_dnint,gfc_simplify_asin,gfc_simplify_atan,
455 gfc_simplify_atan2,gfc_simplify_ceiling,simplify_cmplx,
456 gfc_simplify_conjg,gfc_simplify_cos,gfc_simplify_cosh,
457 gfc_simplify_dim,gfc_simplify_dprod,gfc_simplify_epsilon,
458 gfc_simplify_exp,gfc_simplify_exponent,gfc_simplify_floor,
459 gfc_simplify_fraction,gfc_simplify_huge,gfc_simplify_int,
460 gfc_simplify_ifix,gfc_simplify_idint,gfc_simplify_log,
461 gfc_simplify_log10,simplify_min_max,gfc_simplify_mod,
462 gfc_simplify_modulo,gfc_simplify_nearest,simplify_nint,
463 gfc_simplify_rrspacing,gfc_simplify_scale,
464 gfc_simplify_set_exponent,gfc_simplify_sign,gfc_simplify_sin,
465 gfc_simplify_sinh,gfc_simplify_spacing,gfc_simplify_sqrt,
466 gfc_simplify_tan,gfc_simplify_tanh,gfc_simplify_tiny,
467 gfc_simplify_init_1,gfc_simplify_done_1): Convert GMP to MPFR.
468 Use new functions.
469 * trans-const.c (gfc_conv_mpfr_to_tree): Rename from
470 gfc_conv_mpf_to_tree. Convert it to use MPFR
471 (gfc_conv_constant_to_tree): Use it.
472 * trans-const.h: Update prototype for gfc_conv_mpfr_to_tree().
473 * trans-intrinsic.c: Add arith.h, remove gmp.h
474 (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod): Convert GMP to MPFR.
475
476 2004-08-06 Victor Leikehman <lei@il.ibm.com>
477 Paul Brook <paul@codesourcery.com>
478
479 * trans-array.c (gfc_trans_allocate_array_storage,
480 gfc_trans_allocate_temp_array, gfc_add_loop_ss_code,
481 gfc_conv_loop_setup): For functions, if the shape of the result
482 is not known in compile-time, generate an empty array descriptor for
483 the result and let the callee to allocate the memory.
484 (gfc_trans_dummy_array_bias): Do nothing for pointers.
485 (gfc_conv_expr_descriptor): Use function return values directly.
486 * trans-expr.c (gfc_conv_function_call): Always add byref call
487 insn to pre chain.
488 (gfc_trans_pointer_assignment): Add comments.
489 (gfc_trans_arrayfunc_assign): Don't chain on expression.
490
491 2004-08-01 Roger Sayle <roger@eyesopen.com>
492
493 * options.c (gfc_init_options): Don't warn about the use GNU
494 extensions by default.
495 (gfc_post_options): Warn about GNU extensions with -pedantic.
496 (gfc_handle_option): Don't warn about GNU extensions with -std=gnu.
497
498 2004-07-30 Richard Henderson <rth@redhat.com>
499
500 * trans-expr.c (gfc_conv_expr_reference): Create a CONST_DECL
501 for TREE_CONSTANTs.
502
503 2004-07-25 Richard Henderson <rth@redhat.com>
504
505 * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
506 and DECL_IGNORED_P on RESULT_DECL.
507 (gfc_generate_constructors): Likewise.
508
509 2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
510
511 PR fortran/16465
512 * lang.opt (ffixed-line-length-none, ffixed-line-length-): New
513 options.
514 (ffixed-line-length-80, ffixed-line-length-132): Remove.
515 * options.c (gfc_handle_options): Deal with changed options.
516 * scanner.c (load_line): Change second arg to 'char **',
517 allocate if pointing to NULL. Keep track of buffer's length.
518 Adapt buffer size to overlong lines. Pad lines to full length
519 in fixed form.
520 (load_file): Adapt to new interface of load_line.
521
522 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
523
524 * trans.h (builtin_function): Declare.
525
526 2004-07-16 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
527
528 PR fortran/16404
529 (parts ported from g95)
530 * parse.h (gfc_state_data): New field do_variable.
531 (gfc_check_do_variable): Add prototype.
532 * parse.c (push_state): Initialize field 'do_variable'.
533 (gfc_check_do_variable): New function.
534 (parse_do_block): Remember do iterator variable.
535 (parse_file): Initialize field 'do_variable'.
536 * match.c (gfc_match_assignment, gfc_match_do,
537 gfc_match_allocate, gfc_match_nullify, gfc_match_deallocate):
538 Add previously missing checks.
539 (gfc_match_return): Reformat error message.
540 * io.c (match_out_tag): New function.
541 (match_open_element, match_close_element,
542 match_file_element, match_dt_element): Call match_out_tag
543 instead of match_vtag where appropriate.
544 (match_io_iterator, match_io_element): Add missing check.
545 (match_io): Reformat error message.
546 (match_inquire_element): Call match_out_tag where appropriate.
547
548 * parse.c (gfc_check_do_variable): Fix error locus.
549
550 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
551
552 PR fortran/15129
553 * trans-decl.c (gfc_build_function_decl): Create a new chardecl
554 for every assumed length character dummy argument.
555
556 PR fortran/15140
557 * trans-decl.c (gfc_trans_deferred_vars): Remove bogus assertion.
558
559 PR fortran/13792
560 * simplify.c (gfc_simplify_bound): Copy the bound expression.
561
562 2004-07-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
563
564 PR fortran/15324
565 * trans-array.c gfc_trans_g77_array,
566 gfc_trans_dummy_array_bias): Don't call gfc_trans_string_init
567 for assumed length characters.
568 (gfc_conv_expr_descriptor): Set se->string_length if dealing
569 with a character expression.
570 (gfc_cvonv_array_parameter): Pass string length when passing
571 character array according to g77 conventions.
572
573 2004-07-12 Paul Brook <paul@codesourcery.com>
574
575 * expr.c (gfc_check_assign_symbol): Handle pointer assignments.
576 * trans-array.c (gfc_trans_auto_array_allocation): Remove
577 initialization code.
578 * trans-common.c (create_common): Use gfc_conv_initializer.
579 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_initializer.
580 * trans-expr.c (gfc_conv_initializer): New function.
581 (gfc_conv_structure): Use it.
582 * trans.h (gfc_conv_initializer): Add prototype.
583
584 2004-07-11 Paul Brook <paul@codesourcery.com>
585
586 PR fortran/15986
587 * parse.c (gfc_fixup_sibling_symbols): Also look for untyped
588 variables.
589 (parse_contained): Mark contained symbols as referenced.
590
591 2004-07-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
592
593 PR fortran/16455
594 * module.c (gfc_dump_module, gfc_use_module): Print locus
595 when opening of module file fails.
596
597 PR fortran/16404
598 * io.c (match_io): Flag 'WRITE(...), ...' as extension.
599
600 PR fortran/16404
601 * match.c (gfc_match_program): A program name is obligatory.
602 (gfc_match_return): RETURN in main program is an extension.
603 (gfc_match_block_data): A space is required before a block data
604 name.
605
606 PR fortran/16433
607 * primary.c (match_boz_constant): Call gfc_notify_std only if
608 we actually have a non-standard boz-literal-constant.
609
610 PR fortran/15754
611 * expr.c (gfc_check_assign): Print ranks if incompatible. Issue
612 warning if assigning NULL().
613
614 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
615
616 * f95-lang.c (set_block): Remove.
617 (gfc_clear_binding_stack): New.
618 (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
619 (struct binding_level): Remove block_created_by_back_end.
620 (clear_binding_level): Likewise.
621 (poplevel): Don't handle block_created_by_back_end.
622
623 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
624
625 * trans-decl.c (gfc_create_module_variable): Nothing to do if
626 symbol is in common, because we ...
627 (gfc_generate_module_vars): Call gfc_trans_common.
628
629 2004-07-10 Paul Brook <paul@codesourcery.com>
630
631 * trans-array.c (gfc_build_null_descriptor): New function.
632 (gfc_trans_static_array_pointer): Use it.
633 * trans-array.h (gfc_build_null_descriptor): Add prototype.
634 * trans-expr.c (gfc_conv_structure): Handle array pointers.
635
636 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
637
638 PR fortran/16336
639 * decl.c (gfc_match_save): Use-associated common block
640 doesn't collide.
641 * gfortran.h (gfc_common_head): Add new field 'name'.
642 Fix typo in comment after #endif.
643 * match.c (gfc_get_common): Add new argument from_common,
644 mangle name if flag is set, fill in new field in structure
645 gfc_common_head.
646 (match_common): Set new arg in call to gfc_get_common,
647 use-associated common block doesn't collide.
648 * match.h (gfc_get_common): Adapt prototype.
649 * module.c (load_commons): Set new arg in call to
650 gfc_get_common.
651 * symbol.c (free_common_tree): New function.
652 (gfc_free_namespace): Call new function.
653 * trans-common.c (several functions): Remove argument
654 'name', use name from gfc_common_head instead.
655
656 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
657
658 * expr.c (gfc_check_pointer_assign): Verify that rank of the LHS
659 and RHS match. Return early if the RHS is NULL().
660
661 PR fortran/16336
662 * match.c (match_common): Fix error reporting for used common.
663
664 PR fortran/15969
665 * trans-expr.c (gfc_conv_structure): Handle initialization
666 of scalar pointer components.
667
668 * parse.c (decode_statement): Fix matching of BLOCK DATA.
669
670 * trans-decl.c (generate_local_decl): Remove workaround obsoleted
671 by fix for PR 15481.
672
673 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
674
675 * trans-common.c: Fix whitespace issues, make variable names
676 more readable.
677 (create_common): Additionally, make loop logic more obvious.
678
679 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
680 Paul Brook <paul@codesourcery.com>
681
682 PR fortran/13415
683 * trans-common.c (calculate_length): Remove ...
684 (get_segment_info): Merge into here. Save field type.
685 (build_field): Use saved type.
686 (create_common, new_condition, new_segment, finish_equivalences):
687 Use new get_segment_info.
688 * trans-types.c: Update comment.
689
690 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
691
692 PR fortran/14077
693 * moduele.c (mio_symbol): Don't I/O initial values unless
694 symbol is a parameter.
695
696 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
697
698 PR fortran/13201
699 * resolve.c (resolve_symbol): Verify that the shape of a
700 parameter array is not only explicit, but also constant.
701 * array.c (gfc_is_compile_time_shape): New function.
702 * gfortran.h (gfc_is_compile_time_shape): Add prototype.
703
704 2004-07-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
705
706 PR fortran/15481
707 PR fortran/13372
708 PR fortran/13575
709 PR fortran/15978
710 * module.c (write_symbol, write_symtree): Remove workaround.
711 * primary.c (match_actual_arglist): Enhance comment.
712 (gfc_match_rvalue): Handle function call with first argument
713 a keyword argument correctly.
714 * resolve.c (resolve_symbol): Change call to
715 gfc_set_default_type to issue error if no implicit type
716 can be found.
717 * trans-decl.c (gfc_create_module_variable): Remove workaround.
718
719 2004-07-08 Paul Brook <paul@codesourcery.com>
720
721 * intrinsic.c (add_sym_4s): New function.
722 (add_subroutines): Change gfc_add_sym_? to gfc_add_sym_?s.
723
724 2004-07-04 Janne Blomqvist <jblomqvi@cc.hut.fi>
725 Paul Brook <paul@codesourcery.com>
726
727 PR fortran/15280
728 PR fortran/15665
729 * gfortran.h (enum gfc_generic_isym_id): Add GFC_ISYM_IARGC and
730 GFC_ISYM_COMMAND_ARGUMENT_COUNT.
731 * intrinsic.c (add_functions): Identify iargc. Add
732 command_argument_count.
733 (add_subroutines): Resolve getarg. Add get_command and
734 get_command_argument.
735 * intrinsic.h (gfc_resolve_getarg, gfc_resolve_get_command,
736 gfc_resolve_get_command_argument): Add prototypes.
737 * iresolve.c (gfc_resolve_getarg, gfc_resolve_get_command,
738 gfc_resolve_get_command_argument): New functions.
739 * trans-decl.c (gfor_fndecl_iargc): New variable.
740 (gfc_build_intrinsic_function_decls): Set it.
741 * trans-intrinsic.c (gfc_conv_intrinsic_iargc): New function.
742 (gfc_conv_intrinsic_function): Use it.
743 * trans.h (gfor_fndecl_iargc): Declare.
744
745 2004-07-04 Matthias Klose <doko@debian.org>
746
747 * Make-lang.in: Generate and install gfortran man page.
748 * invoke.texi: Remove extra '@c man end'.
749
750 2004-07-04 Richard Henderson <rth@redhat.com>
751
752 * f95-lang.c (gfc_mark_addressable): Don't put_var_into_stack.
753
754 2004-07-04 Paul Brook <paul@codesourcery.com>
755
756 * decl.c (gfc_match_implicit_range): Don't use typespec.
757 (gfc_match_implicit): Handle character selectors.
758 * gfortran.h (gfc_set_implicit): Remove prototype.
759 (gfc_add_new_implicit_range, gfc_merge_new_implicit): Update.
760 * parse.c (accept_statement): Don't call gfc_set_implicit.
761 * symbol.c (new_ts): Remove.
762 (gfc_set_implicit_none): Use same loop bounds as other functions.
763 (gfc_set_implicit): Remove.
764 (gfc_clear_new_implicit, gfc_add_new_implicit_range): Only set flags.
765 (gfc_merge_new_implicit): Combine with gfc_set_implicit.
766
767 2004-06-30 Richard Henderson <rth@redhat.com>
768
769 * match.c (var_element): Remove unused variable.
770
771 * trans-decl.c (gfc_generate_function_code): Don't set
772 x_whole_function_mode_p.
773 (gfc_generate_constructors): Likewise.
774
775 2004-06-30 Richard Henderson <rth@redhat.com>
776
777 * trans-decl.c (gfc_generate_function_code): Don't set
778 immediate_size_expand.
779 (gfc_generate_constructors): Likewise.
780
781 2004-06-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
782
783 PR fortran/16161
784 * decl.c (gfc_match_type_spec): Rename second argument to
785 'implicit_flag', reverse meaning. Don't match_char_spec if
786 'implicit_flag' is set. Rename to ...
787 (match_type_spec): ... this.
788 (gfc_match_implicit_none, match_implicit_range): Move here
789 from match.c.
790 (gfc_match_implicit): Move here from match.c, try to
791 match_char_len if match_implicit_range doesn't succeed for
792 CHARACTER implicits. Call renamed fucntion match_type_spec.
793 (gfc_match_data_decl, match_prefix): Call renamed function
794 match_type_spec.
795 * match.c (gfc_match_implicit_none, match_implicit_range,
796 gfc_match_implicit): Move to decl.c.
797 * match.h (gfc_match_implicit_none, gfc_match_implicit):
798 Move protoypes to section 'decl.c'.
799 (gfc_match_type_spec): Remove prototype.
800
801 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
802
803 * decl.c, interface.c, symbol.c, trans-common.c: Add 2004 to
804 copyright years.
805
806 2004-06-29 Steven Bosscher <stevenb@suse.de>
807
808 Make sure types in assignments are compatible. Mostly mechanical.
809 * trans-const.h (gfc_index_one_node): New define.
810 * trans-array.c (gfc_trans_allocate_array_storage,
811 gfc_trans_allocate_temp_array, gfc_trans_array_constructor_subarray,
812 gfc_trans_array_constructor_value, gfc_trans_array_constructor,
813 gfc_conv_array_ubound, gfc_conv_array_ref,
814 gfc_trans_scalarized_loop_end, gfc_conv_section_startstride,
815 gfc_conv_ss_startstride, gfc_conv_loop_setup, gfc_array_init_size,
816 gfc_trans_array_bounds, gfc_trans_dummy_array_bias,
817 gfc_conv_expr_descriptor, gfc_trans_deferred_array): Use the correct
818 types in assignments, conversions and conditionals for expressions.
819 * trans-expr.c (gfc_conv_expr_present, gfc_conv_substring,
820 gfc_conv_unary_op, gfc_conv_cst_int_power, gfc_conv_string_tmp,
821 gfc_conv_function_call, gfc_trans_pointer_assignment,
822 gfc_trans_scalar_assign): Likewise.
823 * trans-intrinsic.c (build_fixbound_expr, gfc_conv_intrinsic_bound,
824 gfc_conv_intrinsic_anyall, gfc_conv_intrinsic_count,
825 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_btest,
826 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ishft,
827 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_strcmp,
828 gfc_conv_allocated, gfc_conv_associated,
829 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_trim): Likewise.
830 * trans-io.c (set_string): Likewise.
831 * trans-stmt.c (gfc_trans_do, gfc_trans_forall_loop,
832 gfc_do_allocate, generate_loop_for_temp_to_lhs,
833 generate_loop_for_rhs_to_temp, compute_inner_temp_size,
834 compute_overall_iter_number, gfc_trans_assign_need_temp,
835 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
836 gfc_evaluate_where_mask, gfc_trans_where_assign,
837 gfc_trans_where_2): Likewise.
838 * trans-types.c (gfc_get_character_type, gfc_build_array_type,
839 gfc_get_nodesc_array_type, gfc_get_array_type_bounds): Likewise.
840
841 * trans.c (gfc_add_modify_expr): Add sanity check that types
842 for the lhs and rhs are the same for scalar assignments.
843
844 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
845
846 * dump-parse-tree.c (show_common): New function.
847 (gfc_show_namespace): Show commons.
848
849 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
850 Andrew Vaught <andyv@firstinter.net>
851
852 PR fortran/13249
853 PR fortran/15481
854 * decl.c (gfc_match_save): Adapt to new common structures,
855 don't allow saving USE-associated common.
856 * dump-parse-tree (gfc_show_attr): (saved_)common are not
857 symbol attributes any longer.
858 (gfc_show_symbol): Don't show old-style commons any longer.
859 (gfc_show_namespace): Adapt call to gfc_traverse_symtree to new
860 interface.
861 * gfortran.h (symbol_attribute): Remove common and saved_common
862 attributes.
863 (gfc_symbol): Remove common_head element.
864 (gfc_common_head): New struct.
865 (gfc_get_common_head): New macro.
866 (gfc_symtree): Add field 'common' to union.
867 (gfc_namespace): Add field 'common_root'; change type of field
868 'blank_common' to blank_common.
869 (gfc_add_data): New prototype.
870 (gfc_traverse_symtree): Expect a symtree as first argument
871 instead of namespace.
872 * match.c (gfc_get_common): New function.
873 (match_common_name): Change to take char * as argument, adapt,
874 fix bug with empty name.
875 (gfc_match_common): Adapt to new data structures. Disallow
876 redeclaration of USE-associated COMMON-block. Fix bug with
877 empty common.
878 (var_element): Adapt to new common structures.
879 * match.h (gfc_get_common): Declare.
880 * module.c: Add 2004 to copyright years, add commons to module
881 file layout description.
882 (ab_attribute, attr_bits, mio_symbol_attributes): Remove code
883 for removed attributes.
884 (mio_symbol): Adapt to new way of storing common relations.
885 (load_commons): New function.
886 (read_module): Skip common list on first pass, load_commons at
887 second.
888 (write_commons): New function.
889 (write_module): Call write_commons().
890 * symbol.c (gfc_add_saved_comon, gfc_add_common): Remove
891 functions related to removed attributes.
892 (gfc_add_data): New function.
893 (gfc_clear_attr): Don't set removed attributes.
894 (gfc_copy_attr): Don't copy removed attributes.
895 (traverse_symtree): Remove.
896 (gfc_traverse_symtree): Don't traverse symbol
897 tree of the passed namespace, but require a symtree to be passed
898 instead. Unify with traverse_symtree.
899 (gfc_traverse_ns): Call gfc_traverse_symtree according to new
900 interface.
901 (save_symbol): Remove setting of removed attribute.
902 * trans-common.c (gfc_sym_mangled_common_id): Change to
903 take 'char *' argument instead of 'gfc_symbol'.
904 (build_common_decl, new_segment, translate_common): Adapt to new
905 data structures, add new
906 argument name.
907 (create_common): Adapt to new data structures, add new
908 argument name. Fix typo in intialization of derived types.
909 (finish_equivalences): Add second argument in call to
910 create_common.
911 (named_common): take 'gfc_symtree' instead of 'gfc_symbol'.
912 (gfc_trans_common): Adapt to new data structures.
913 * trans-decl.c (gfc_create_module_variables): Remove test for
914 removed attribute.
915
916 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
917
918 * io.c: Add 2004 to copyright years.
919
920 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
921 Andrew Vaught <andyv@firstinter.net>
922
923 * gfortran.h (gfc_gsymbol): New typedef.
924 (gfc_gsym_root): New variable.
925 (gfc_get_gsymbol, gfc_find_gsym): New prototypes.
926 * parse.c (global_used): New function.
927 (parse_block_data): Check for double empty BLOCK DATA,
928 use global symbol table.
929 (parse_module): Use global symbol table.
930 (add_global_procedure, add_global_program): New functions.
931 (gfc_parse_file): Use global symbol table.
932 * symbol.c (gfc_gsym_root): New variable.
933 (gfc_find_gsym, gsym_compare, gfc_get_gsymbol): New
934 functions.
935
936 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
937
938 * module.c (mio_gmp_real): Correct writing of negative numbers.
939
940 2004-06-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
941
942 PR fortran/15963
943 * expr.c (check_intrinsic_op): Allow comparison of characters.
944 Make logic easier.
945
946 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
947 Andrew Vaught <andyv@firstinter.net>
948
949 * decl.c (contained_procedure): New function.
950 (match_end): Verify correctness of END STATEMENT in
951 all cases.
952
953 2004-06-26 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
954 Andrew Vaught <andyv@firstinter.net>
955
956 PR fortran/15190
957 * decl.c (gfc_match_type_spec), io.c (match_io), parse.c
958 (decode_statement): Enforce required space in free-form.
959
960 2004-06-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
961
962 * f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
963 * trans-array.c (gfc_conv_descriptor_data): Add operand
964 for COMPONENT_REF.
965 (gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
966 (gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
967 (gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
968 * trans-common.c (create_common): Likewise.
969 * trans-expr.c (gfc_conv_component_ref): Likewise.
970 * trans-io.c (set_parameter_value): Likewise.
971 (set_parameter_ref, set_string, set_flag, io_result): Likewise.
972 (transfer_expr): Likewise.
973 * trans-decl.c (gfc_trans_auto_character_variable):
974 Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
975 (gfc_gimplify_function): New function.
976 (gfc_generate_function-code): Properly handle nested functions.
977 * trans.c (gfc_build_array_ref): Add two new operands for ARRAY_REF.
978
979 2004-06-22 Janne Blomqvist <jblomqvi@cc.hut.fi>
980
981 PR fortran/15750
982 * io.c (gfc_match_inquire): Bugfix for iolength related stuff.
983 (gfc_resolve_inquire): Resolve the iolength tag. Return
984 SUCCESS at end of function if no failure has occured.
985 * resolve.c (resolve_code): Resolve if iolength is encountered.
986 * trans-io.c: (ioparm_iolength, iocall_iolength,
987 iocall_iolength_done): New variables.
988 (last_dt): Add IOLENGTH.
989 (gfc_build_io_library_fndecls ): Set iolength related variables.
990 (gfc_trans_iolength): Implement.
991 (gfc_trans_dt_end): Treat iolength as a third form of data transfer.
992
993 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de
994
995 PR fortran/15511
996 * scanner.c (load_line): Don't truncate preprocessor lines.
997 Reformat error message.
998 (preprocessor_line): Issue warning in case of malformed
999 preprocessor line.
1000
1001 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1002
1003 * resolve.c (resolve_symbol): Add comment in function body.
1004 (check_data_variable): Change type of mark to ar_type, adapt code
1005 accordingly.
1006
1007 2004-06-21 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1008
1009 * array.c (gfc_insert_constructor): Avoid redundant call to
1010 mpz_comp. Add 2004 to copyright years.
1011
1012 2004-06-21 Joseph S. Myers <jsm@polyomino.org.uk>
1013
1014 * trans.h (stmtblock_t): Change has_scope to unsigned int.
1015
1016 2004-06-20 Steven G. Kargl <kargls@comcast.net>
1017
1018 * arith.c (gfc_range_check): correct complex underflow.
1019
1020 2004-06-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1021
1022 PR fortran/15962
1023 * match.c (match_case_selector): Call gfc_match_init_expr
1024 instead of gfc_match_expr.
1025 * resolve.c (validate_case_label_expr): No need to check for
1026 constant, since it wouldn't have been matched with the fix to
1027 match.c.
1028
1029 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1030
1031 PR fortran/15211
1032 * trans-intrinsic.c (gfc_conv_intrinsic_len): Deal with arrays
1033 of strings.
1034
1035 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1036
1037 PR fortran/15510
1038 * trans-deecl.c (generate_local_decl): Do not issue warning for
1039 unused variables if they're use associated.
1040
1041 2004-06-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1042 Andrew Vaught <andyv@firstinter.net>
1043
1044 PR fortran/14928
1045 * gfortran.h (gfc_check_f): Add new field f3ml.
1046 * check.c (gfc_check_minloc_maxloc): Take argument list instead
1047 of individual arguments, reorder if necessary.
1048 * intrinsic.h (gfc_check_minloc_maxloc): ... adapt prototype.
1049 * intrinsic.c (add_sym_3ml): New function.
1050 (add_functions): Change to add_sym_3ml for MINLOC, MAXLOC.
1051 (check_specific): Catch special case MINLOC, MAXLOC.
1052
1053 2004-06-14 Paul Brook <paul@codesourcery.com>
1054
1055 * intrinsic.c (add_sym_2s): Use correct function types.
1056
1057 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1058
1059 * Make-lang.in (F95_OBJS, F95_PARSER_OBJS): Alphabetize. Move data.c
1060 * data.c (gfc_get_section_index): Remove dependency on trans.h.
1061
1062 2004-06-12 Steven G. Kargl <kargls@comcast.net>
1063
1064 * check.c (gfc_check_second_sub, gfc_check_irand, gfc_check_rand
1065 gfc_check_srand, gfc_check_etime, gfc_check_etime_sub): New functions.
1066 * gfortran.h (gfc_generic_isym_id): New symbols GFC_ISYM_ETIME,
1067 GFC_ISYM_IRAND, GFC_ISYM_RAND, GFC_ISYM_SECOND.
1068 * trans-intrinsic.c: Use symbols.
1069 * intrinsic.c (add_sym_2s): New function.
1070 * intrinsic.c: Add etime, dtime, irand, rand, second, srand.
1071 * intrinsic.h: Function prototypes.
1072 * iresolve.c (gfc_resolve_etime_sub, gfc_resolve_second_sub
1073 gfc_resolve_srand): New functions.
1074
1075 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1076
1077 PR fortran/14957
1078 * decl.c (gfc_match_end): Require END {SUBROUTINE|FUNCTION} for
1079 contained procedure.
1080
1081 2004-06-12 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1082
1083 PR fortran/12841
1084 * interface.c (compare_parameter, compare_actual_formal): Don't
1085 check types and array shapes for NULL()
1086 * trans-expr.c (conv_function_call): No double indirection for
1087 NULL()
1088
1089 2004-06-09 Toon Moene <toon@moene.indiv.nluug.nl>
1090
1091 * trans-expr.c (gfc_conv_cst_int_power): Compute
1092 x**(-n) by converting it to (1/x)**n instead of
1093 1/x**n.
1094
1095 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1096
1097 PR fortran/13372
1098 * module.c (write_symbol, write_symtree): Don't write symbols
1099 wrongly added to namespace.
1100 * trans-decl.c (gfc_create_module_variable): Don't create a
1101 backend decl for a symbol incorrectly added to namespace.
1102
1103 2004-06-09 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1104
1105 PR fortran/13201
1106 * resolve.c (resolve_symbol): Verify that parameter array has an
1107 explicit shape. Fix typos and coding style issues in surrounding
1108 lines.
1109
1110 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1111
1112 PR fortran/15478
1113 * gfortran.texi: The documentation doesn't contain infomration on
1114 how to report bugs, and shouldn't, so remove the line which
1115 says it does.
1116
1117 2004-06-05 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1118
1119 * intrinsic.c (sort_actual): Keep track of type of missing
1120 arguments. (Missing from previous commit.)
1121
1122 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1123
1124 * gfortran.h (gfc_actual_arglist): New field missing_arg_type.
1125 * interface.c (compare_actual_formal): Keep type of omitted
1126 optional arguments.
1127 * trans-expr.c (gfc_conv_function_call): Add string length
1128 argument for omitted string argument.
1129
1130 2004-06-03 Paul Brook <paul@codesourcery.com>
1131
1132 * trans.c (gfc_finish_block, gfc_add_expr_to_block): Build statement
1133 lists instead of compound expr chains.
1134 (gfc_trans_code): Annotate statement lists.
1135
1136 2004-06-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1137
1138 * trans-array.c: Fix spelling in comments.
1139
1140 2004-06-02 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1141
1142 PR fortran/15557
1143 * data.c (assign_substring_data_value): New function.
1144 (gfc_assign_data_value): Call the new function if we're dealing
1145 with a substring LHS.
1146
1147 2004-06-01 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1148
1149 PR fortran/15477
1150 * gfortran.h (GFC_VERSION): Remove.
1151 * gfortran.texi (version-gfortran): Remove, replace by version-GCC
1152 where used.
1153
1154 2004-05-31 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1155
1156 * trans-types.c: Fix spelling & layout in comments.
1157
1158 2004-05-30 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1159
1160 PR fortran/14067
1161 * trans-const.c (gfc_conv_string_init): Allow variable string
1162 length lower than initialization string length.
1163
1164 2004-05-30 Paul Brook <paul@codesourcery.com>
1165
1166 PR fortran/15620
1167 * trans-decl.c (gfc_shadow_sym, gfc_restore_sym): New functions.
1168 * trans-expr.c (gfc_trans_string_copy): New function.
1169 (gfc_conv_statement_function): Use them. Create temp vars. Enforce
1170 character lengths.
1171 (gfc_conv_string_parameter): Use gfc_trans_string_copy.
1172 * trans-stmt.c (gfc_trans_forall_1): Use gfc_{shadow,restore}_sym.
1173 * trans.h (struct gfc_saved_var): Define.
1174 (gfc_shadow_sym, gfc_restore_sym): Add prototypes.
1175
1176 2004-05-30 Steven G. Kargl <kargls@comcast.net>
1177
1178 * iresolve.c (gfc_resolve_random_number): Clean up conditional.
1179
1180 2004-05-29 Steven G. Kargl <kargls@comcast.net>
1181
1182 * simplify.c (gfc_simplify_log): Remove useless line of code.
1183
1184 2004-05-29 Paul Brook <paul@codesourcery.com>
1185
1186 * trans-common.c (find_equivalence): Find multiple rules.
1187
1188 2004-05-27 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1189
1190 * gfortran.h (gfc_current_locus, gfc_set_locus): Remove.
1191 (gfc_current_locus): Declare new global variable.
1192 * scanner.c (gfc_current_locus, gfc_set_locus): Remove.
1193 (gfc_current_locus1): Rename ...
1194 (gfc_current_locus): ... to this.
1195 (gfc_at_eof, gfc_at_bol, gfc_at_eol, gfc_advance_line, next_char,
1196 skip_fixed_comments, skip_free_comments, gfc_next_char_literal,
1197 gfc_peek_char, gfc_gobble_whitespace, gfc_new_file): Use
1198 gfc_current_locus instead of gfc_current_locus1, gfc_set_locus()
1199 and gfc_current_locus(), respectively.
1200 * array.c (match_subscript, gfc_match_array_ref, match_array_list,
1201 match_array_cons_element, gfc_match_array_constructor):
1202 Read/modify gfc_current_locus instead of calling gfc_set_locus()
1203 and gfc_current_locus().
1204 * decl.c (gfc_match_null, variable_decl, gfc_match_kind_spec,
1205 match_attr_spec, gfc_match_function_decl, gfc_match_end,
1206 attr_decl1, gfc_match_save): Likewise.
1207 * error.c (error_print, gfc_internal_error): Likewise.
1208 * expr.c (gfc_int_expr, gfc_default_logical_kind): Likewise.
1209 * interface.c (gfc_add_interface): Likewise.
1210 * io.c (gfc_match_format, match_dt_format, match_dt_element,
1211 match_io_iterator, match_io): Likewise.
1212 * match.c (gfc_match_space, gfc_match_eos,
1213 gfc_match_small_literal_int, gfc_match_st_label,
1214 gfc_match_strings, gfc_match_name, gfc_match_iterator,
1215 gfc_match_char, gfc_match, gfc_match_assignment,
1216 gfc_match_pointer_assignment, gfc_match_if, gfc_match_do,
1217 gfc_match_nullify, gfc_match_call, match_implicit_range,
1218 gfc_match_implicit, gfc_match_data, match_case_selector,
1219 gfc_match_case, match_forall_iterator): Likewise.
1220 * matchexp.c (gfc_match_defined_op_name, next_operator,
1221 match_level_1, match_mult_operand, match_ext_mult_operand,
1222 match_add_operand, match_ext_add_operand, match_level_2,
1223 match_level_3, match_level_4, match_and_operand, match_or_operand,
1224 match_equiv_operand, match_level_5, gfc_match_expr): Likewise.
1225 * module.c (gfc_match_use, mio_array_ref, mio_expr): Likewise.
1226 * parse.c (match_word, decode_statement, next_free, next_fixed,
1227 add_statement, verify_st_order, parse_if_block, gfc_parse_file):
1228 Likewise.
1229 * primary.c (match_digits, match_integer_constant,
1230 match_boz_constant, match_real_constant, match_substring,
1231 next_string_char, match_charkind_name, match_string_constant,
1232 match_logical_constant, match_const_complex_part,
1233 match_complex_constant, match_actual_arg, match_keyword_arg,
1234 gfc_match_actual_arglist, gfc_match_structure_constructor,
1235 gfc_match_rvalue, gfc_match_variable): Likewise.
1236 * st.c (gfc_get_code): Likewise.
1237 * symbol.c (check_conflict, check_used, check_done,
1238 duplicate_attr, add_flavor, gfc_add_procedure, gfc_add_intent,
1239 gfc_add_access, gfc_add_explicit_interface, gfc_add_type,
1240 gfc_add_component, gfc_reference_st_label, gfc_new_symbol): Likewise.
1241
1242 2004-05-26 Roger Sayle <roger@eyesopen.com>
1243
1244 * io.c (format_asterisk): Silence compiler warnings by correcting
1245 the number of elements of a "locus" initializer.
1246
1247 2004-05-25 Roger Sayle <roger@eyesopen.com>
1248
1249 PR fortran/13912
1250 * matchexp.c: Allow unary operators after arithmetic operators
1251 as a GNU extension.
1252 (match_ext_mult_operand, match_ext_add_operand): New functions.
1253 (match_mult_operand): Tweak to call match_ext_mult_operand.
1254 (match_add_operand): Tweak to call match_ext_mult_operand.
1255 (match_level_2): Rearrange to call match_ext_add_operand.
1256
1257 2004-05-25 Paul Brook <paul@codesourcery.com>
1258
1259 * expr.c (check_inquiry): Remove bogus tests.
1260
1261 2004-05-23 Paul Brook <paul@codesourcery.com>
1262
1263 PR fortran/13773
1264 * expr.c (restricted_args): Remove redundant checks/argument.
1265 (external_spec_function): Update to match.
1266 (restricted_intrinsic): Rewrite.
1267
1268 2004-05-23 Paul Brook <paul@codesourcery.com>
1269 Victor Leikehman <lei@haifasphere.co.il>
1270
1271 * gfortran.h (struct gfc_symbol): Add equiv_built.
1272 * trans-common.c: Change int to HOST_WIDE_INT. Capitalize error
1273 messages.
1274 (current_length): Remove.
1275 (add_segments): New function.
1276 (build_equiv_decl): Create initialized common blocks.
1277 (build_common_decl): Always add decl to bindings.
1278 (create_common): Create initializers.
1279 (find_segment_info): Reformat to match coding conventions.
1280 (new_condition): Use add_segments.
1281 (add_condition, find_equivalence, add_equivalences): Move iteration
1282 inside functions. Only process each segment once.
1283 (new_segment, finish_equivalences, translate_common): Simplify.
1284
1285 2004-05-23 Steven G. Kargl <kargls@comcast.net>
1286
1287 * check.c (gfc_check_random_seed): Issue for too many arguments.
1288
1289 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1290
1291 * intrinsic.c (add_subroutines): Use add_sym_3s for random_seed.
1292
1293 2004-05-22 Paul Brook <paul@codesourcery.com>
1294
1295 * dump-parse-tree.c (gfc_show_equiv): New function.
1296 (gfc_show_namespace): Use it.
1297
1298 2004-05-22 Victor Leikehman <lei@haifasphere.co.il>
1299
1300 PR fortran/13249
1301 * symbol.c (gfc_add_common): Disable checks to work around other more
1302 fundamental inadequacies.
1303
1304 2004-05-22 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1305
1306 * trans-decl.c (gfc_get_extern_function_decl): Set DECL_IS_PURE
1307 only for functions.
1308 (gfc_build_function_decl): Likewise.
1309
1310 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1311
1312 * check.c (gfc_check_system_clock): New function.
1313 * intrinsic.c (add_sym_3s): New function.
1314 (add_subroutines): Use it.
1315 * intrinsic.h (gfc_check_system_clock, gfc_resolve_system_clock):
1316 Add prototypes.
1317 * iresolve.c (gfc_resolve_system_clock): New function.
1318
1319 2004-05-22 Steven G. Kargl <kargls@comcast.net>
1320
1321 * invoke.texi: Document -Wunderflow and spell check.
1322 * lang.opt: Add Wunderflow.
1323 * gfortran.h (gfc_option_t): Add warn_underflow option.
1324 * options.c (gfc_init_options, set_Wall): Use it.
1325 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
1326 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
1327 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
1328 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
1329 * arith.c (common_logarithm): Fix typo in comment.
1330
1331 2004-05-21 Roger Sayle <roger@eyesopen.com>
1332
1333 * io.c (check_format): As a GNU extension, allow the comma after a
1334 string literal to be optional in a format. Use gfc_notify_std to
1335 issue an error/warning as appropriate.
1336
1337 2004-05-21 Roger Sayle <roger@eyesopen.com>
1338
1339 * io.c (check_format): Use gfc_notify_std to determine whether to
1340 issue an error/warning for omitting the digits from the X format.
1341
1342 2004-05-20 Roger Sayle <roger@eyesopen.com>
1343
1344 * io.c (check_format): Allow the number before the X format to
1345 be optional when not -pedantic.
1346
1347 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
1348 Paul Brook <paul@codesourcery.com>
1349
1350 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
1351 Create decls for __builtin_pow{,f}.
1352 * gfortran.h (PREFIX_LEN): Define.
1353 * trans-decl.c (gfor_fndecl_math_powi): Add.
1354 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1355 (gfc_build_intrinsic_function_decls): Create decls for powi.
1356 * trans-expr.c (powi_table): Add.
1357 (gfc_conv_integer_power): Remove.
1358 (gfc_conv_powi): New function.
1359 (gfc_conv_cst_int_power): New function.
1360 (gfc_conv_power_op): Use new powi routines.
1361 * trans.h (struct gfc_powdecl_list): Add.
1362 (gfor_fndecl_math_powi): Add.
1363 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
1364
1365 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1366
1367 * trans.c, trans-decl.c: Fix comment typos.
1368
1369 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1370
1371 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
1372
1373 2004-05-18 Steve Kargl <kargls@comcast.net>
1374
1375 * arith.c (gfc_int2complex): Fix incorrect range checking.
1376
1377 2004-05-18 Paul Brook <paul@codesourcery.com>
1378
1379 PR fortran/13930
1380 * decl.c (add_init_expr_to_sym): Remove incorrect check.
1381 (default_initializer): Move to expr.c.
1382 (variable_decl): Don't assign default initializer to variables.
1383 * expr.c (gfc_default_initializer): Move to here.
1384 * gfortran.h (gfc_default_initializer): Add prototype.
1385 * resolve.c (resolve_symbol): Check for illegal initializers.
1386 Assign default initializer.
1387
1388 2004-05-17 Steve Kargl <kargls@comcast.net>
1389
1390 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
1391
1392 2004-05-17 Steve Kargl <kargls@comcast.net>
1393
1394 * arith.c (gfc_real2complex): Range checking wrong part of complex
1395 number.
1396
1397 2004-05-16 Paul Brook <paul@codesourcery.com>
1398
1399 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
1400
1401 2004-05-16 Paul Brook <paul@codesourcery.com>
1402
1403 * arith.c (gfc_range_check): Fix logic error.
1404
1405 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
1406
1407 * arith.c: Fix comment typos.
1408
1409 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1410
1411 PR fortran/13742
1412 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
1413 not initialized in a disallowed fashion.
1414 * match.c (gfc_match_common): Likewise.
1415 (var_element): Verify that variable is not in the blank COMMON,
1416 if it is in a common.
1417
1418 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
1419
1420 * Make-lang.in (f95.generated-manpages): Remove.
1421 (f95.srcextra): New.
1422 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
1423 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
1424 (f95.dvi): Remove.
1425 (dvi): New.
1426 (f95.install-info): Remove.
1427 (install-info): New.
1428
1429 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
1430
1431 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
1432
1433 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1434
1435 * primary.c (match_boz_constant): Use gfc_notify_std() for
1436 issuing a warning or an error.
1437
1438 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1439
1440 PR fortran/13826
1441 * primary.c (match_structure_constructor): Rename ...
1442 (gfc_match_structure_constructor): ... to this. Make non-static.
1443 (gfc_match_rvalue): Call renamed function.
1444 * match.h (gfc_match_structure_constructor): Declare.
1445 * match.c (gfc_match_data_constant): Handle structure
1446 constructor.
1447
1448 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1449
1450 PR fortran/13702
1451 (Port from g95)
1452 * gfortran.h (gfc_linebuf): New typedef.
1453 (linebuf): Remove.
1454 (gfc_file): Revamped, use new gfc_linebuf.
1455 (locus): Revamped, use new types.
1456 (gfc_current_file): Remove.
1457 (gfc_current_form, gfc_source_file): New global variables.
1458 * match.c (gfc_match_space, gfc_match_strings): Use
1459 gfc_current_form to find source form.
1460 * module.c (gfc_dump_module): Use gfc_source_file when printing
1461 module header.
1462 * error.c (show_locus, show_loci) Use new data structures to print
1463 locus.
1464 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
1465 Remove.
1466 (file_head, current_file, gfc_current_form, line_head, line_tail,
1467 gfc_current_locus1, gfc_source_file): New global variables.
1468 (gfc_scanner_init1): Set new global variables.
1469 (gfc_scanner_done1): Free new data structures.
1470 (gfc_current_locus): Return pointer to gfc_current_locus1.
1471 (gfc_set_locus): Set gfc_current_locus1.
1472 (gfc_at_eof): Set new variables.
1473 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
1474 to new locus structure.
1475 (gfc_check_include): Remove.
1476 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
1477 (gfc_skip_comments): Use gfc_current_form, find locus with
1478 gfc_current_locus1.
1479 (gfc_next_char): Use gfc_current_form.
1480 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
1481 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
1482 comment formatting.
1483 (get_file): New function.
1484 (preprocessor_line, include_line): New functions.
1485 (load_file): Move down, rewrite to match new data structures.
1486 (gfc_new_file): Rewrite to match new data structures.
1487 * parse.c (next_statement): Remove code which is now useless. Use
1488 gfc_source_form and gfc_source_file where appropriate.
1489 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
1490 when determining locus of frontend code.
1491 * trans-io.c (set_error_locus): Same.
1492 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
1493 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
1494 preprocessor flags.
1495 (all): Add missing initializers.
1496
1497 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1498
1499 * Make-lang.in (trans-common.o): Remove redundant dependency.
1500 (data.c): Replace object file name ...
1501 (data.o): ... by the correct one.
1502
1503 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1504
1505 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
1506 for ranges when dumping array references.
1507
1508 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
1509
1510 * decl.c (variable_decl): Always apply default initializer.
1511
1512 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1513
1514 PR fortran/15206
1515 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
1516 handle zero correctly.
1517
1518 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1519
1520 * match.c (gfc_match): Eliminate dead code.
1521
1522 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1523
1524 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
1525 Detect bad continuation line in fixed form sources.
1526
1527 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1528
1529 PR fortran/15205
1530 * iresolve.c (gfc_resolve_nearest): Add new function.
1531 * intrinsic.h: ... declare it here.
1532 * intrinsic.c (add_functions): ... add it as resolving function
1533 for NEAREST.
1534
1535 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1536
1537 PR fortran/14066
1538 * match.c (gfc_match_do): Allow infinite loops with
1539 label-do-stmt. Do not enforce space after comma.
1540
1541 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1542
1543 PR fortran/15051
1544 * parse.c (parse_interface): Allow empty INTERFACE, remove
1545 seen_body.
1546
1547 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1548
1549 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
1550 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
1551 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
1552 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
1553 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
1554 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
1555 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
1556 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
1557 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
1558 trans-types.h, trans.c, trans.h: Update copyright years and
1559 boilerplate.
1560 * data.c: Likewise, also removed two whitespace-only lines.
1561 * gfortranspec.c, lang.opt: Update copyright years.
1562
1563 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
1564
1565 PR fortran/14568
1566 * trans-decl.c (generate_local_decl): Don't warn for unused
1567 variables which are in common blocks.
1568
1569 2004-05-13 Diego Novillo <dnovillo@redhat.com>
1570
1571 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
1572 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
1573 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
1574
1575 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
1576
1577 PR fortran/15314
1578 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
1579
1580 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
1581
1582 * gfortran.texi: Use @table @emph instead of @itemize @emph.
1583 Remove "set DEVELOPMENT".
1584 (Compiling GFORTRAN): Remove.
1585
1586 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1587
1588 * array.c (match_subscript, match_array_ref): Add comments
1589 explaining argument 'init'.
1590 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
1591 trans-expr.c, trans.c: Fix some typos in comments.
1592 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
1593 * primary.c (match_digits, match_integer_constant): Add comment
1594 explaining signflag.
1595
1596 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1597
1598 PR fortran/13940
1599 * primary.c: Include system.h and flags.h, needed for pedantic.
1600 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
1601 pedantic is set.
1602
1603 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1604
1605 PR fortran/13940
1606 * match.c (match_data_constant): Handle case where
1607 gfc_find_symbol sets sym to NULL
1608
1609 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1610
1611 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
1612 dependency on mathbuiltins.def
1613
1614 2004-04-24 Victor Leikehman <lei@il.ibm.com>
1615
1616 * trans-io.c (transfer_expr): Implemented recursive printing
1617 of derived types.
1618
1619 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
1620
1621 * gfortranspec.c: Do not include multilib.h.
1622
1623 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
1624
1625 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
1626 2004 to copyright years.
1627 * trans-expr.c, trans-decl.c: Comment update, we now generate
1628 GENERIC, not SIMPLE. Add 2004 to copyright years.
1629
1630 2004-04-24 Paul Brook <paul@codesourcery.com>
1631
1632 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
1633
1634 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
1635
1636 PR 14817
1637 * arith.c (gfc_arith_divide): Fix complex divide.
1638
1639 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
1640
1641 * gfortranspec.c: Include the target headers.
1642
1643 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
1644
1645 PR fortran/14921
1646 PR fortran/14540
1647 * arith.c (arctangent2): New function.
1648 * arith.h (arctangent2): Add function prototype.
1649 * simplify.c (gfc_simplify_atan2): Use it.
1650 (gfc_simplify_log): Use it.
1651
1652 2004-04-12 Diego Novillo <dnovillo@redhat.com>
1653
1654 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
1655 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
1656
1657 2004-04-11 Bud Davis <bdavis9659@comcast.net>
1658
1659 PR fortran/14872
1660 * trans-io.c (build_dt): Change REC to value.
1661
1662 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1663
1664 PR 14394
1665 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
1666 the real value when converting mpf to string.
1667
1668 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1669
1670 PR 14395
1671 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
1672 the result.
1673
1674 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
1675
1676 PR fortran/14377
1677 * simplify.c (simplify_min_max): Convert the type of the result.
1678
1679 2004-04-11 Paul Brook <paul@codesourcery.com>
1680
1681 * gfortran.texi: Use full target triplet.
1682
1683 2004-04-11 Paul Brook <paul@codesourcery.com>
1684
1685 * Make-lang.in (GFORTRAN_TEXI): Set it.
1686 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
1687 (fortran/gfortran.info): Ditto.
1688 * gfortran.texi: Major update.
1689 * invoke.texi: New file.
1690
1691 2004-04-10 Paul Brook <paul@codesourcery.com>
1692
1693 * trans-array.c (gfc_trans_allocate_temp_array,
1694 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
1695 * trans-decl.c (gfc_build_dummy_array_decl,
1696 gfc_get_symbol_decl, gfc_build_function_decl,
1697 gfc_create_module_variable): Ditto.
1698 * trans-expr.c (gfc_conv_variable): Ditto.
1699 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
1700 * trans.h (GFC_DECL_STRING): Remove.
1701 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
1702 GFC_DECL_ASSIGN): Renumber flags.
1703
1704 2004-04-05 Paul Brook <paul@codesourcery.com>
1705
1706 PR 13252
1707 PR 14081
1708 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
1709 and stack_restore.
1710 * gfortran.h (struct gfc_charlen): Add backend_decl.
1711 * trans-array.c (gfc_trans_allocate_temp_array,
1712 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
1713 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
1714 Remove old, broken string handling.
1715 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1716 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1717 gfc_trans_deferred_array): Handle character arrays.
1718 * trans-const.c (gfc_conv_const_charlen): New function.
1719 * trans-const.h (gfc_conv_const_charlen): Add prototype.
1720 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
1721 as static.
1722 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
1723 (gfc_create_string_length): New function.
1724 (gfc_get_symbol_decl): Create lengths for character variables.
1725 (gfc_get_fake_result_decl): Ditto.
1726 (gfc_build_function_decl): Only set length for assumed length
1727 character arguments.
1728 (gfc_trans_dummy_character): New function.
1729 (gfc_trans_auto_character_variable): Rewrite.
1730 (gfc_trans_deferred_vars): Handle more types of character variable.
1731 (gfc_create_module_variable): String lengths have moved.
1732 (gfc_generate_function_code): Initialize deferred var chain earlier.
1733 * trans-expr.c (gfc_conv_init_string_length): Rename ...
1734 (gfc_trans_init_string_length): ... to this.
1735 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
1736 gfc_conv_function_call): Update to new format for character variables.
1737 (gfc_conv_string_length): Remove.
1738 (gfc_conv_string_parameter): Update assertion.
1739 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
1740 * trans-io.c (set_string): Use new macro names.
1741 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
1742 * trans-types.c (gfc_get_character_type): Use existing length expr.
1743 (gfc_is_nodesc_array): Make public.
1744 (gfc_get_dtype_cst): Rename ...
1745 (gfc_get_dtype): ... to this. Handle unknown size arrays.
1746 (gfc_get_nodesc_array_type): Use new name.
1747 (gfc_sym_type): New character variable code.
1748 (gfc_get_derived_type): Ditto.
1749 (gfc_get_function_type): Evaluate character variable lengths.
1750 * trans-types.h (gfc_strlen_kind): Define.
1751 (gfc_is_nodesc_array): Add prototype.
1752 * trans.h: Update prototypes.
1753 (struct lang_type): Update comments.
1754 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
1755 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
1756
1757 2004-04-04 Paul Brook <paul@codesourcery.com>
1758
1759 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
1760 * options.c (gfc_init.options, gfc_handle_option): Ditto.
1761 * trans-expr.c (gfc_conv_function_call): Ditto.
1762 * trans-types.c (gfc_is_nodesc_array): Ditto
1763 * lang.opt (fg77-calls): Remove.
1764
1765 2004-04-04 Paul Brook <paul@codesourcery.com>
1766
1767 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
1768 (gfc_conv_descriptor_base): Rename ...
1769 (gfc_conv_descriptor_offset): ... to this.
1770 (gfc_trans_allocate_array_storage): Set offset to zero.
1771 (gfc_conv_array_base): Rename ...
1772 (gfc_conv_array_offset): ... to this.
1773 (gfc_conv_array_index_ref): Add offset parameter.
1774 (gfc_conv_array_ref): Include offset.
1775 (gfc_trans_preloop_setup): Use existing offset.
1776 (gfc_trans_allocate_temp_array, gfc_array_allocate,
1777 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1778 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
1779 gfc_conf_ss_descriptor): Set offset.
1780 * trans-array.h: Rename prototypes.
1781 * trans-const.h (gfc_index_zero_node): Define.
1782 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
1783 * trans-types.c (gfc_get_array_type_bounds): Ditto.
1784 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
1785
1786 2004-03-25 Diego Novillo <dnovillo@redhat.com>
1787
1788 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
1789
1790 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1791
1792 PR 14055
1793 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
1794 before conversion by gmp library call.
1795
1796 2004-03-24 Bud Davis <bdavis9659@comcast.net>
1797
1798 PR 12921
1799 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
1800
1801 2004-02-24 Richard Henderson <rth@redhat.com>
1802
1803 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
1804
1805 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
1806
1807 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
1808 (fortran/gfortran.info): ... to here.
1809 (f95.srcinfo): New.
1810
1811 2004-02-16 Richard Henderson <rth@redhat.com>
1812
1813 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
1814 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
1815 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
1816 (gfc_expand_function): Rename from expand_function_body, make static,
1817 don't do anything except invoke tree_rest_of_compilation.
1818 (gfc_be_parse_file): Invoke cgraph.
1819 (gfc_expand_decl): Remove.
1820 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
1821 __builtin_adjust_trampoline.
1822 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
1823 (gfc_finalize): New.
1824 (gfc_generate_function_code): Use it. Lower nested functions.
1825 * trans-expr.c (gfc_conv_function_call): Add static chain operand
1826 to call_expr.
1827 * trans.c (gfc_build_function_call): Likewise.
1828 * trans.h (expand_function_body): Remove.
1829
1830 2004-02-15 Victor Leikehman <lei@il.ibm.com>
1831
1832 PR gfortran/13433
1833 * trans-decl.c (gfc_build_function_decl) For functions
1834 returning CHARACTER pass an extra length argument,
1835 following g77 calling conventions.
1836 * trans-types.c (gfc_get_function_type) Ditto.
1837 * trans-expr.c (gfc_conv_function_call) Ditto.
1838
1839 2004-02-14 Paul Brook <paul@codesourcery.com>
1840
1841 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
1842
1843 2004-02-12 Paul Brook <paul@nowt.org>
1844
1845 * BUGS: Remove.
1846
1847 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
1848
1849 * gfortran.texi: Fix typos.
1850
1851 2004-02-07 Bud Davis <bdavis9659@comcast.net>
1852
1853 PR gfortran/13909
1854 * intrinsic.c (add_conversions) Use logical conversion instead
1855 of real.
1856 * trans-types.c (gfc_get_logical_type) implemented logical*1
1857 and logical*2.
1858
1859 2004-01-17 Paul Brook <paul@codesourcery.com>
1860
1861 * lang-specs.h: Remove %<fixed-form.
1862
1863 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
1864
1865 * lang-specs.h: Enable preprocessing of source files
1866 ending in .F, .fpp, .FPP, .F90 and .F95.
1867
1868 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
1869
1870 PR fortran/12912
1871 * lang-specs.h: Enable compilation of files ending
1872 in .f, .for and .FOR.
1873
1874 2004-01-11 Paul Brook <paul@codesourcery.com>
1875
1876 * trans-stmt.c (gfc_trans_if_1): New function.
1877 (gfc_trans_if): Use it.
1878
1879 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
1880
1881 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
1882 (gfc_option_t): Add max_identifier_length.
1883 * lang.opt: Add fmax-identifier-length.
1884 * match.c (parse_name): Use limit.
1885 * options.c (gfc_init_options): Set max_identifier_length.
1886 (gfc_handle_option): Ditto.
1887
1888 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
1889
1890 * intrinsic.c (add_functions): Add resolve function to dcmplx.
1891 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
1892 * iresolve.c (gfc_resolve_dcmplx): New function.
1893
1894 2004-01-10 Paul Brook <paul@codesourcery.com>
1895
1896 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
1897 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
1898 (gfc_return_by_reference): Correct condition.
1899 (gfc_get_function_type): Ditto.
1900
1901 2004-01-10 Paul Brook <paul@codesourcery.com>
1902
1903 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
1904 types.
1905
1906 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1907
1908 * iresolve.c: Use correct kind.
1909
1910 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
1911
1912 PR fortran/13467
1913 * trans-decl.c (gfc_create_module_variable): Output array valued
1914 parameters.
1915
1916 2004-01-10 Paul Brook <paul@codesourcery.com>
1917
1918 * resolve.c (resolve_branch): Get error message right way round.
1919
1920 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
1921
1922 * trans-array (gfc_conv_loop_setup): Adjust comment to track
1923 reality.
1924 (gfc_array_allocate): Don't count size of element twice.
1925
1926 2004-01-04 Paul Brook <paul@codesourcery.com>
1927
1928 * lang.opt (i8, r8, std=*): Remove RejectNegative.
1929
1930 2004-01-04 Paul Brook <paul@codesourcery.com>
1931
1932 * error.c (gfc_notify_std): New function.
1933 * gfortran.h (gfc_notify_std): Declare.
1934 (GFC_STD_*): Define.
1935 (gfc_option_t): Add warn_std and allow_std.
1936 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
1937 (gfc_intrinsic_func_interface): Use gfc_notify_std.
1938 * check.c (check_rest): Use gfc_notify_std.
1939 * match.c (gfc_match_pause): Ditto.
1940 (gfc_match_assign): Ditto.
1941 (gfc_match_goto): Ditto.
1942 * resolve.c (resolve_branch): Ditto.
1943 * lang.opt: Add std=<foo> and w.
1944 * options.c (gfc_init_options): Set allow_std and warn_std.
1945 (gfc_handle_option): Handle OPT_std_* and OPT_w.
1946
1947 2004-01-01 Paul Brook <paul@codesourcery.com>
1948
1949 * array.c (gfc_append_constructor): Take constructor, not expression.
1950 * data.c (struct gfc_expr_stack): Remove.
1951 (expr_stack): Remove.
1952 (find_con_by_offset): Rename from find_expr_in_con.
1953 (find_con_by_component): Rename from find_component_in_con.
1954 (gfc_get_expr_stack): Remove.
1955 (gfc_assign_data_value): Rewrite.
1956 (gfc_expr_push): Remove.
1957 (gfc_expr_pop): Remove.
1958 (gfc_advance_section): Rename from
1959 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
1960 (gfc_get_section_index): Handle unbounded sections.
1961 * gfortran.h: Update prototypes.
1962 * resolve.c (check_data_variable): Array section maight not be the
1963 last ref.
1964
1965 2004-01-01 Paul Brook <paul@codesourcery.com>
1966
1967 PR fortran/13432
1968 * resolve.c (resolve_symbol): Allow assumed length function results.
1969
1970 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
1971
1972 * match.c (gfc_match_pause): Fix spelling.
1973
1974 2004-01-01 Steven Bosscher <stevenb@suse.de>
1975
1976 PR fortran/13251
1977 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
1978 reference from the expression.
1979
1980 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
1981
1982 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
1983 dumping.
1984 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
1985 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
1986 (symbol_attribute):New variable attribute: assign.
1987 * io.c (resolve_tag):Integer variable is allowed.
1988 (match_dt_format): Add ASSIGN statement. Set assign flag.
1989 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
1990 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
1991 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
1992 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
1993 (next_statement): Add ST_LABEL_ASSIGNMENT.
1994 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
1995 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
1996 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
1997 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
1998 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
1999 assign. Put them into the stuct lang_decl.
2000 * trans-io.c (set_string): Add the assign statement.
2001 * trans-stmt.c (gfc_trans_label_assign): New function.
2002 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
2003 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
2004 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
2005 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
2006 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
2007 (GFC_DECL_ASSIGN(node)): New macro to access flag.
2008
2009 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
2010
2011 PR fortran/13434
2012 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
2013 minval/maxval.
2014
2015 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
2016
2017 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
2018 that arguments to subroutines/functions can't alias themselves, nor global
2019 memory.
2020
2021 2003-12-20 Steven Bosscher <stevenb@suse.de>
2022
2023 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
2024 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
2025
2026 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
2027
2028 * primary.c (match_substring): Fix substring bug for start point
2029 or end point is NULL.
2030 * trans-expr.c (gfc_conv_substring): Ditto
2031 * trans-types.c (gfc_sym_type): Get correct type of scalar
2032 character variables.
2033 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
2034 derived type.
2035
2036 2003-12-10 Richard Henderson <rth@redhat.com>
2037
2038 * options.c (gfc_post_options): Don't ever use rtl inlining.
2039
2040 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
2041
2042 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
2043 * trans-equivalence.c: Remove.
2044 * trans-decl.c (gfc_get_symbol_decl): Update to match.
2045 (gfc_generate_function_code): Ditto.
2046 * trans-array.c (gfc_conv_array_parameter): Ditto.
2047 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
2048 (F95_ADDITIONAL_OBJS): Add stor-layout.o
2049 * trans.h (gfc_trans_equivalence): Remove.
2050 * gfortran.h (struct gfc_equiv): Add used field.
2051 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
2052 equiv_offset fields.
2053
2054 2003-12-05 Richard Henderson <rth@redhat.com>
2055
2056 * trans.c (gfc_build_addr_expr): New.
2057 (gfc_build_indirect_ref, gfc_build_array_ref): New.
2058 * trans.h: Declare them.
2059 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
2060 trans-stmt.c, trans.c (*): Use them.
2061
2062 * f95-lang.c (gfc_post_options): Remove dead prototype.
2063 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
2064 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
2065 allocation size.
2066
2067 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
2068
2069 * io.c (gfc_match_format): Check for missing format label.
2070
2071 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
2072
2073 PR fortran/13155
2074 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
2075 from interfaces in modules.
2076
2077 2003-11-30 Paul Brook <paul@nowt.org>
2078
2079 * trans-array.c (gfc_trans_g77_array): Make non-static.
2080 (gfc_trans_assumed_size): Remove.
2081 (gfc_trans_dummy_array_bias): Explicitly free temporary.
2082 * trans-array.h (gfc_trans_g77_array): Add prototype.
2083 (gfc_trans_assumed_size): Remove.
2084 * trans-decls.c (gfor_fndecl_push_context): Remove.
2085 (gfor_fndecl_pop_context): Remove.
2086 (gfc_build_function)decls): Don't create them.
2087 (gfc_trans_deferred_vars): Update to match. Remove dead code.
2088 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
2089
2090 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
2091
2092 * trans-array.c (gfc_conv_array_parameter): Simplify
2093 array argument passing for array name actual argument.
2094 * trans-expr.c (gfc_conv_function_call): Ditto
2095 * trans-types.c (gfc_is_nodesc_array):Ditto.
2096
2097 2003-11-30 Paul Brook <paul@nowt.org>
2098
2099 * f95-lang.c (gfc_post_options): Move ...
2100 * options.c (gfc_post_options): .. to here. Handle inlining options.
2101 * gfortran.h (gfc_post_options): Add prototype.
2102
2103 2003-11-28 Richard Henderson <rth@redhat.com>
2104
2105 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
2106
2107 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
2108
2109 * trans.h (has_alternate_specifier): New global variable.
2110 * match.c (gfc_match_call): Handle actual arguments associated with
2111 alternate return indicators.
2112 * trans-expr.c (gfc_conv_function_call): Ditto
2113 * trans-stmt.c (gfc_trans_call): Ditto
2114 (gfc_trans_return): Handle return statement with value.
2115 * trans-decl.c (gfc_generate_function_code): Handle functions with
2116 asterisk dummy.
2117 (gfc_get_fake_result_decl): Ditto
2118 * trans-types.c (gfc_get_function_type): Ditto
2119 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
2120 (resolve_formal_arglist): Check asterisk dummy.
2121
2122 2003-11-27 Paul Brook <paul@nowt.org>
2123
2124 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
2125 allocation interface.
2126 (gfc_conv_ array_parameter): Ditto.
2127 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
2128 * trans-array.c: Update prototype.
2129 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
2130 (gfc_trans_auto_character_variable): Use new memory alloc interface.
2131 * trans-expr.c (gfc_conv_string_tmp): Ditto.
2132 (gfc_conv_function_call): Use gfc_conv_string_tmp.
2133 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
2134 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
2135 * trans.h (gfc_ss_info): Remove unused pdata field.
2136 * trans.c (gfc_create_var_np): Change T to V.
2137
2138 2003-11-26 Richard Henderson <rth@redhat.com>
2139
2140 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
2141 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
2142 FRACTION, NEAREST, SET_EXPONENT.
2143 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
2144 Fix GTY marking. Remove unnecessary const's.
2145 (LIBM_FUNCTION): Rename from I_LIB.
2146 (LIBF_FUNCTION): New.
2147 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
2148 conventions. Assume the expr signature is correct. Mark const.
2149 (gfc_conv_intrinsic_exponent): Use library functions.
2150 (gfc_conv_intrinsic_set_exponent): Remove.
2151 (gfc_conv_intrinsic_scale): Remove.
2152 (gfc_conv_intrinsic_nearest): Remove.
2153 (gfc_conv_intrinsic_fraction): Remove.
2154 (gfc_conv_intrinsic_function): Update.
2155 * trans-decl.c (gfor_fndecl_math_exponent4): New.
2156 (gfor_fndecl_math_exponent8): New.
2157 (gfc_build_intrinsic_function_decls): Set them.
2158 * trans.h: Declare them.
2159
2160 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
2161
2162 * trans-common.c (gfc_layout_global_equiv): Locate the error for
2163 underflow COMMON block.
2164 (gfc_trans_one_common): Fix bug for size of COMMON block containing
2165 EQUIVALENCE object. Also fix typo in an error message.
2166
2167 2003-11-25 Diego Novillo <dnovillo@redhat.com>
2168
2169 * Make-lang.in: Add check-gfortran to lang_checks.
2170 (check-f95): Alias for check-gfortran.
2171
2172 2003-11-25 Jason Merrill <jason@redhat.com>
2173
2174 * Make-lang.in (f95.tags): Create TAGS.sub files in each
2175 directory and TAGS files that include them for each front end.
2176
2177 2003-11-24 Paul Brook <paul@nowt.org>
2178
2179 PR fortran/13154
2180 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
2181
2182 2003-11-24 Paul Brook <paul@nowt.org>
2183
2184 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
2185 handle.
2186 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
2187
2188 2003-11-24 Paul Brook <paul@nowt.org>
2189
2190 PR fortran/13105
2191 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
2192 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
2193
2194 2003-11-20 Richard Henderson <rth@redhat.com>
2195
2196 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
2197 (gfc_conv_array_base): Likewise.
2198 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
2199 * trans-expr.c (gfc_conv_string_tmp): Likewise.
2200 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
2201 * trans-stmt.c (gfc_trans_character_select): Likewise.
2202
2203 2003-11-13 Paul Brook <paul@nowt.org>
2204
2205 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
2206
2207 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
2208
2209 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
2210 (resolve_equivalence): New function.
2211 (resolve_equivalence_derived): New function.
2212
2213 2003-11-12 Richard Henderson <rth@redhat.com>
2214
2215 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
2216 annotate_all_with_locus.
2217
2218 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
2219
2220 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
2221 * trans-decl.c (gfc_finish_var_decl): Modified.
2222
2223 2003-11-08 Paul Brook <paul@nowt.org>
2224
2225 PR fortran/12704
2226 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
2227 arrays.
2228
2229 2003-11-06 Paul Brook <paul@nowt.org>
2230
2231 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
2232
2233 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
2234
2235 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
2236
2237 2003-10-27 Anthony Green <green@redhat.com>
2238
2239 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
2240 (f95.stagefeedback): Ditto.
2241
2242 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2243
2244 PR fortran/12682
2245 * Make-lang.in (f95.stageprofile): Add.
2246 (f95.stagefeedback): Add.
2247
2248 2003-10-23 Richard Henderson <rth@redhat.com>
2249
2250 * f96-lang.c (gfc_gimplify_expr): Remove.
2251 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
2252 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
2253
2254 2003-10-23 Richard Henderson <rth@redhat.com>
2255
2256 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
2257
2258 2003-10-20 Paul Brook <paul@nowt.org>
2259
2260 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
2261 * trans-stmt.c (gfc_trans_do_while): Ditto.
2262
2263 2003-10-17 Paul Brook <paul@nowt.org>
2264
2265 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
2266
2267 2003-10-17 Paul Brook <paul@nowt.org>
2268
2269 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
2270
2271 2003-10-17 Feng Wang <wf_cs@yahoo.com>
2272
2273 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
2274 (gfc_resolve_minloc): Ditto.
2275 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
2276 Return the value after subtracting the lower bound.
2277
2278 2003-10-16 Richard Henderson <rth@redhat.com>
2279
2280 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
2281
2282 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
2283
2284 * lang.c: Remove -M option for now, it's in the way for C.
2285
2286 2003-10-14 Jason Merrill <jason@redhat.com>
2287
2288 * Make-lang.in (f95.tags): New rule.
2289
2290 2003-10-13 Richard Henderson <rth@redhat.com>
2291
2292 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
2293
2294 2003-10-13 Paul Brook <paul@nowt.org>
2295
2296 * trans-decl.c (generate_local_decl): Don't create junk variables.
2297
2298 2003-10-13 Paul Brook <paul@nowt.org>
2299
2300 * resolve.c (resolve_formal_arglist): Use function result decl in
2301 preference to function decl.
2302
2303 2003-10-12 Richard Henderson <rth@redhat.com>
2304
2305 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
2306 TREE_READONLY. Update all callers.
2307
2308 2003-10-12 Feng Wang <wf_cs@yahoo.com>
2309
2310 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
2311 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
2312 (gfc_is_intrinsic_libcall): Add CSHIFT.
2313
2314 2003-10-12 Richard Henderson <rth@redhat.com>
2315
2316 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
2317 (gfc_trans_array_constructor_value): Likewise.
2318 (gfc_conv_array_initializer): Likewise.
2319 * trans-stmt.c (gfc_trans_character_select): Likewise.
2320
2321 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
2322
2323 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
2324
2325 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2326
2327 * check.c (gfc_check_repeat): Check arguments are scalar.
2328 (gfc_check_trim): New function.
2329 * intrinsic.h (gfc_check_trim): Add prototype.
2330 * intrinsic.c (add_functions): Use it.
2331 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
2332 Decalare.
2333 * trans-decl.c: Ditto.
2334 (gfc_build_intrinsic_fucntion_decls): Set them.
2335 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
2336 (gfc_conv_intrinsic_trim): New function.
2337 (gfc_conv_intrinsic_repeat): New function.
2338 (gfc_conv_intrinsic_function): Use them.
2339
2340 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2341
2342 * trans-types.c (gfc_sym_type): Handle result variables.
2343
2344 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
2345
2346 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
2347 gfc_get_character_type.
2348
2349 2003-10-11 Feng Wang <wf_cs@yahoo.com>
2350
2351 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
2352
2353 2003-10-11 Paul Brook <paul@nowt.org>
2354
2355 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
2356 (gfc_resolve_dprod): New function.
2357 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
2358 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
2359 (gfc_resolve_dprod): Declare.
2360 * intrinsic.c (add_functions): Use them.
2361 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
2362
2363 2003-10-06 Richard Henderson <rth@redhat.com>
2364
2365 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
2366 * trans-intrinsic.c (call_builtin_clz): Use it.
2367
2368 2003-10-05 Paul Brook <paul@nowt.org>
2369
2370 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
2371 * trans-decl.c (gfc_generate_function_code): Set
2372 cfun->function_end_locus.
2373
2374 2003-09-24 Jason Merrill <jason@redhat.com>
2375
2376 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
2377 TREE_LOCUS.
2378
2379 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
2380 Paul Brook <paul@nowt.org>
2381
2382 * Make-lang.in (F95_OBJS): Add fortran/data.o.
2383 * array.c (gfc_inser_constructor): New function.
2384 (gfc_get_constructor): New function.
2385 (gfc_free_constructor): Initialize offset and repeat.
2386 (iterator_stack): Remove.
2387 (expand_info): Add offset, component and repeat fields.
2388 (expand_constructor): Set them.
2389 (expand): Set new fields.
2390 (gfc_copy_constructor): Ditto. Avoid recursion.
2391 * gfortran.h: Add prototypes for new functions.
2392 (gfc_constructor): Add offset, component and repeat.
2393 (iteratio_stack): Move to here.
2394 * resolve.c (check_data_variable): Convert data values into variable
2395 initializers.
2396 (traverse_data_list): Build implicit loop chain.
2397 (gfc_resolve): Ditto.
2398 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
2399 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
2400 * trans-expr.c (gfc_conv_structure): Handle array initializers.
2401 (gfc_conv_expr): Update to match.
2402 * trans.h (gfc_conv_structure): Declare.
2403 * data.c: New file.
2404
2405 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
2406
2407 * trans.h: Add declarations for gfor_fndecl_si_kind and
2408 gfor_fndecl_sr_kind.
2409 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2410 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
2411 (g95_conv_intrinsic_sr_kind): New function.
2412 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
2413 SELECTED_REAL_KIND.
2414
2415 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
2416
2417 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
2418 instead of _4 and _8 as postfix for libgfortran calls.
2419
2420 2003-09-16 Paul Brook <paul@nowt.org>
2421
2422 * array.c (compare_bounds): New function.
2423 (gfc_compare_array_spec): Use it.
2424
2425 2003-09-14 Paul Brook <paul@nowt.org>
2426
2427 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
2428 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
2429
2430 2003-09-14 Paul Brook <paul@nowt.org>
2431
2432 * check.c (dim_rank_check): Allow assumed bounds if requested.
2433 (gfc_check_lbound): Call it.
2434 (gfc_check_ubound): Ditto.
2435 (gfc_check_size): Change to match.
2436 * simplify.c (gfc_simplify_bound): New function.
2437 (gfc_simplify_lbound): New function.
2438 (gfc_simplify_ubound): New function.
2439 * intrinsic.h: Declare them.
2440 * intrinsic.c (add_functions): Use them.
2441
2442 2003-09-14 Paul Brook <paul@nowt.org>
2443
2444 * io.c (format_lex): Initialize negative_flag.
2445 (check_format): Intialize repeat.
2446 * trans-io.c (gfc_new_nml_name_expr): Declare static.
2447 (gfc_new_var_expr): Ditto.
2448
2449 2003-09-14 Paul Brook <paul@nowt.org>
2450
2451 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
2452 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
2453
2454 2003-09-12 Paul Brook <paul@nowt.org>
2455
2456 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
2457
2458 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2459
2460 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
2461 for a correct expression.
2462
2463 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
2464
2465 * trans-intrinsic.c (real_compnt_info): New struct.
2466 (prepare_arg_info): New function.
2467 (gfc_conv_intrinsic_set_exponent): New function.
2468 (gfc_conv_intrinsic_scale): New function.
2469 (gfc_conv_intrinsic_nearest): New function.
2470 (gfc_conv_intrinsic_fraction): New function.
2471 (gfc_conv_intrinsic_exponent): New function.
2472 (gfc_conv_intrinsic_spacing): New function.
2473 (gfc_conv_intrinsic_rrspacing): New function.
2474 (gfc_conv_intrinsic_function): Use them.
2475
2476 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
2477
2478 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
2479 build_int_2 changed from (high, low) to (low, high).
2480 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
2481 ioparm_namelist_read_mode, iocall_set_nml_val_int,
2482 iocall_set_nml_val_float, iocall_set_nml_val_char,
2483 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
2484 (gfc_build_io_library_fndecls): Add variable initialization.
2485 (gfc_new_nml_name_expr, get_new_var_expr): New function.
2486 (build_dt): Add namelist support.
2487 * io.c (value): New variable.
2488 (check_format): Support FMT_H now.
2489
2490 2003-09-07 Paul Brook <paul@nowt.org>
2491
2492 * io.c (gfc_resolve_dt): Error if format label is not defined.
2493
2494 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
2495
2496 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
2497 about case_switch's break. The other is about building the condition
2498 statement tree, which judges the argument in the range of the
2499 corresponding integer type.
2500 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
2501 for the large values.
2502
2503 2003-09-05 Paul Brook <paul@nowt.org>
2504
2505 * f95-lang.c (expand_function_body): Gimplify the function.
2506
2507 2003-09-04 Jeff Law <law@redhat.com>
2508
2509 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
2510 index zero!
2511
2512 2003-09-04 Paul Brook <paul@nowt.org>
2513
2514 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
2515 (gfc_expand_stmt): New function.
2516 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
2517 (expand_function_body): Use tree_rest_of_compilation.
2518 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
2519
2520 2003-09-03 Jeff Law <law@redhat.com>
2521
2522 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
2523 index zero!
2524
2525 2003-08-30 Paul Brook <paul@nowt.org>
2526
2527 * f95-lang.c (builtin_function): Remove #if 0 code.
2528 (gfc_define_builtin): New function.
2529 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
2530 * mathbuiltins.def: New file.
2531 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
2532 (gfc_intrinsic_map): Use mathbuiltins.def.
2533 (gfc_intrinsic_builtin_t): Remove.
2534 (gfc_build_intrinsic_lib_fndecls): Update.
2535 * trans-types.c (gfc_init_types): Remove redundant initilaization of
2536 signed_size_type_node.
2537
2538 2003-08-29 Paul Brook <paul@nowt.org>
2539
2540 * arith.c (gfc_real_kinds): Use correct minimum exponents.
2541
2542 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
2543
2544 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
2545 (gfc_conv_intrinsic_function): Add MODULO.
2546
2547 2003-08-22 Jason Merrill <jason@redhat.com>
2548
2549 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
2550
2551 2003-08-22 Andreas Jaeger <aj@suse.de>
2552
2553 * Make-lang.in (f95.install-common): Add DESTDIR support.
2554 * (f95.install-info): Likewise.
2555 (f95.uninstall): Likewise.
2556
2557 2003-08-19 Diego Novillo <dnovillo@redhat.com>
2558
2559 * trans-types.c (gfc_init_types): Initialize
2560 signed_size_type_node with size_type_node.
2561
2562 2003-08-18 Paul Brook <paul@nowt.org>
2563
2564 * dependency.c (gfc_dependency): New enum.
2565 (check_another_array_ref): Remove.
2566 (gfc_get_array_from_component): Remove.
2567 (get_x): Remove.
2568 (get_range): Remove.
2569 (get_no_of_elements): Use mpz_t, not mpf_t.
2570 (transform_sections): New function.
2571 (gfc_check_range_range): Rename ...
2572 (gfc_check_section_vs_section): ... to this. Use new function.
2573 (gfc_is_inside_range): Rewrite to match.
2574 (gfc_check_element_vs_section): Ditto.
2575 (gfc_check_element_vs_element): Ditto.
2576 (get_deps): Ditto.
2577 (gfc_dep_resolver): Ditto. Remove unused parameter.
2578 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
2579 gfc_check_element_vs_element, gfc_is_inside_range,
2580 gfc_get_array_from_component): Remove prototypes for static functions.
2581 (gfc_dep_resolver): Update prototype.
2582 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
2583
2584 2003-08-15 Paul Brook <paul@nowt.org>
2585
2586 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
2587 return values to parent scope.
2588 (gfc_build_dummy_array_decl): Ditto.
2589
2590 2003-08-14 Paul Brook <paul@nowt.org>
2591
2592 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
2593 size of the type, not the pointer.
2594 * resolve.c (resolve_symbol): Give more accurate error message.
2595
2596 2003-08-10 Paul Brook <paul@nowt.org>
2597
2598 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
2599
2600 2003-08-10 Paul Brook <paul@nowt.org>
2601
2602 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
2603 type components.
2604
2605 2003-08-10 Chun Huang <compiler@sohu.com>
2606
2607 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
2608 (resolve_symbol): Ditto.
2609 * trans-expr.c (gfc_conv_statement_function): New function.
2610 (gfc_conv_function_expr): Use it.
2611
2612 2003-08-10 Paul Brook <paul@nowt.org>
2613
2614 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
2615 (walk_function_expr): Set section rank.
2616 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
2617
2618 2003-08-10 Paul Brook <paul@nowt.org>
2619
2620 * intrinsic.c (add_sym): Prefix names with correct string.
2621 (add_sym_0s): New function.
2622 (add_subroutines): Register abort.
2623
2624 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
2625
2626 * gfortran.h: Introduce options to control the mangling.
2627 * lang.opt: Likewise.
2628 * options.c (gfc_init_options): Handle the options.
2629 * trans-common.c (gfc_sym_mangled_common_id): New function.
2630 (gfc_build_common_decl): Call it.
2631 * trans-decl.c (gfc_sym_mangled_function_id): New function.
2632 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
2633
2634 2003-08-09 Paul Brook <paul@nowt.org>
2635
2636 * module.c (mio_symbol): Always ouput a namespace for formal args.
2637 (load_needed): Namespace now belong to their proper symbol.
2638 (gfc_dump_module): Change G95=>GFORTRAN.
2639
2640 2003-08-05 Paul Brook <paul@nowt.org>
2641
2642 * options.c: Force -fg77-calls.
2643
2644 2003-08-02 Paul Brook <paul@nowt.org>
2645
2646 * Makelang.in: Rename G95_* to GFORTRAN_*.
2647 * All sources: Rename G95_* to GFC_*.
2648
2649 2003-08-01 Paul Brook <paul@nowt.org>
2650
2651 * fortran/Make-lang.in: Use GMPLIBS.
2652 * fortran/config-lang.in: Set need_gmp.
2653 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
2654
2655 2003-07-27 Andreas Jaeger <aj@suse.de>
2656
2657 * trans-decl.c (gfc_generate_constructors): Convert prototype to
2658 ISO C90.
2659 * trans-const.c (gfc_init_constants): Likewise.
2660 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
2661
2662 * gfortranspec.c: Convert to ISO C90.
2663 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
2664
2665 2003-07-26 Paul Brook <paul@nowt.org>
2666
2667 * lang.opt: Add -fdump-parse-tree.
2668 * options.c (gfc_handle_option): Ditto.
2669 * resolve.c (resolve_forall_iterators): Convert to proper type.
2670 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
2671
2672 2003-07-26 Paul Brook <paul@nowt.org>
2673
2674 * Makefile.in: Add build dependencies on files common with rest of gcc.
2675
2676 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
2677
2678 * trans.h: Declare g95_trans_pointer_assignment.
2679 * trans-expr.c (g95_trans_pointer_assignment): New function.
2680 (g95_trans_pointer_assign): Use it.
2681 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
2682 (g95_trans_pointer_assign_need_temp): New function.
2683
2684 2003-07-26 Paul Brook <paul@nowt.org>
2685
2686 * gfortran.texi: Replace references to g95.
2687
2688 2003-07-26 Paul Brook <paul@nowt.org>
2689
2690 Rename g95_* to gfc_*.
2691
2692 2003-07-25 Paul Brook <paul@nowt.org>
2693
2694 * gfortran.h: Rename from g95.h.
2695 * trans-types.c (boolean_type_node, booelan_true_node,
2696 boolean_false_node): Remove.
2697 * trans-types.h: Ditto.
2698
2699 2003-07-25 Chun Huang <compiler@sohu.com>
2700
2701 * parse.c (accept_statement): Implement BLOCK DATA statement.
2702 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
2703 variables.
2704
2705 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
2706
2707 * trans-stmt.c (temporary_list): Define.
2708 (g95_trans_assign_need_temp): New function.
2709 (g95_trans_forall_1): Modified for WHERE.
2710 (g95_trans_where_assign): Modified.
2711 (g95_trans_where_2): Modified.
2712 (g95_evaluate_where_mask): Modified.
2713 (g95_trans_where): Modified.
2714 (g95_get_temp_expr): Removed.
2715 (g95_add_to_where_stmt_list): Removed.
2716 (compute_overall_iter_number): Modified for WHERE.
2717 * trans.h: Remove where_stmt_list.
2718
2719 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2720
2721 * lang.opt: Correct description of options -J and -M.
2722
2723 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
2724
2725 * lang.opt: Move help text to here.
2726 * lang-options.h: Remove.
2727
2728 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2729 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
2730 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
2731 on kind.
2732
2733 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
2734 Paul Brook <paul@nowt.org>
2735
2736 * check.c (check_rest): Use global pedantic flag.
2737 * io.c (data_desc): Ditto.
2738 * error.c (g95_warning, g95_warning_now): Use global flag.
2739 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
2740 (expand_function_body): Update to new prototypes.
2741 (g95_init): Use new option names.
2742 * g95.h (g95_option_t): Standardize names.
2743 (g95_init_options, g95_handle_option): Update prototypes.
2744 * interface.c: Use new option names.
2745 * match.c: Ditto.
2746 * module.c: Ditto.
2747 * parse.c: Ditto.
2748 * primary.c: Ditto.
2749 * resolve.c: Ditto.
2750 * scanner.c: Ditto.
2751 * simplify.c: Ditto.
2752 * symbol.c: Ditto.
2753 * trans-array.c: Ditto.
2754 * trans-expr.c: Ditto.
2755 * trans-types.c: Ditto.
2756 * trans-decl.c: Ditto.
2757 (g95_build_library_function_decl): Remove obsolete VPARAMS.
2758 * trans.h: Ditto.
2759 * options.c (g95_display_help): Remove.
2760 (g95_init_options): Convert to new scheme.
2761 (set_Wall): Ditto
2762 (g95module_option): Ditto, rename from g95_parse_arg.
2763 (g95_handle_module_path_options): New function.
2764 * trans-equivalence.c: Fix error message.
2765 * lang.opt: Corrections.
2766
2767 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
2768
2769 * lang.opt: New file.
2770
2771 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2772
2773 * decl.c (match_attr_spec): Set colon_seen.
2774
2775 2003-07-14 Paul Brook <paul@nowt.org>
2776
2777 * trans-array.c: Update comment.
2778 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
2779 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
2780 minmaxloc,minmaxval): Ditto.
2781 * trans-io.c (g95_trans_transfer): Ditto.
2782 * trans-stmt.c: Remove unneeded prototypes.
2783 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
2784 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
2785 (compute_inner_temp_size): Remove bits of dead code. Add comments.
2786 Don't share loopinfo.
2787 (compute_overall_iter_number): Declare as static.
2788 (allocate_temp_for_forall_nest): Ditto.
2789 (g95_trans_forall_1): Don't pass shared loopinfo.
2790 * trans.c (g95_start_block): Expand comment.
2791
2792 2003-07-12 Paul Brook <paul@nowt.org>
2793
2794 * arith.c (g95_index_integer_kind): Remove unused initializer.
2795 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
2796 index by size of element.
2797 (generate_loop_for_rhs_to_temp): Ditto.
2798 (allocate_temp_for_forall_nest): Use element size, not index size.
2799
2800 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2801
2802 * arith.c (g95_index_integer_kind): Add a TODO.
2803 * simplify.c (g95_simplify_nearest): Add a TODO.
2804
2805 2003-07-09 Chun Huang <compiler@sohu.com>
2806
2807 * trans.h: Add declarations for gfor_fndecl_string_scan and
2808 gfor_fndecl_string_verify.
2809 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
2810 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
2811 (g95_conv_intrinsic_verify): New function.
2812 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
2813 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
2814 of parameter 'BACK=.TRUE.'
2815
2816 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
2817
2818 * trans-stmt.c (iter_info, forall_info): Define.
2819 (g95_trans_forall_block): Remove.
2820 (g95_trans_forall_loop): Use forall info blocks.
2821 (g95_trans_nested_forall_loop): New function.
2822 (g95_do_allocate): Handle things other than logical masks.
2823 (generate_loop_for_temp_to_lhs): New function.
2824 (generate_loop_for_rsh_to_temp): New function.
2825 (compute_inner_temp_size): New function.
2826 (compute_overall_iter_number): New function.
2827 (allocate_temp_for_forall_nest): New function.
2828 (g95_trans_forall): Move body ...
2829 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
2830
2831 2003-07-02 Paul Brook <paul@nowt.org>
2832
2833 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
2834 in correct scope. Change callers to match.
2835 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
2836 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
2837
2838 2003-07-02 Paul Brook <paul@nowt.org>
2839
2840 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
2841 expression shape for all expressions.
2842 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
2843
2844 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2845
2846 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
2847 g95_parse_arg), intrinsic.c (g95_convert_type): support of
2848 -Wconversion.
2849 * intrinsic.c, g95.h: Add g95_convert_type_warn,
2850 * resolve.c (g95_resolve_index): Call it.
2851
2852 2003-07-02 Paul Brook <paul@nowt.org>
2853
2854 * iresolve.c (g95_resolve_reshape): Set expression shape.
2855 (g95_resolve_shape): Ditto.
2856 * simplify.c (g95_simplify_shape): Move common code outside condition.
2857 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
2858
2859 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2860
2861 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
2862 conformance checks.
2863
2864 2003-06-29 Paul Brook <paul@nowt.org>
2865
2866 * array.c (g95_simplify_iterator_var): Don't bother with return value.
2867 * expr.c (find_array_element, find_component_ref): New functions.
2868 (remove_subobject_ref): New function.
2869 (simplify_const_ref): Use them. Rename from simplify_component_ref.
2870 (simplify_ref_chain): New function.
2871 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
2872 (g95_specification_expr): Simplify the expression.
2873 * resolve.c (resolve_operator): Check simplifications return code.
2874 (g95_resolve_expr): Ditto.
2875
2876 2003-06-26 Paul Brook <paul@nowt.org>
2877
2878 * expr.c (simplify_component_ref): New function.
2879 (g95_simplify_expr): Use it.
2880 * resolve.c (resolve_structure_cons): Handle references.
2881
2882 2003-06-25 Paul Brook <paul@nowt.org>
2883
2884 * trans-io.c (build_dt): Handle internal units.
2885
2886 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
2887
2888 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
2889 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
2890 Use g95_array_index_type instead of integer_type_node.
2891 (g95_build_common_decl, g95_set_common_master_type): Use
2892 g95_character1_type_node instead of char_type_node.
2893 * trans-equivalence.c (g95_layout_local_equiv): As above.
2894
2895 2003-06-24 Steven G. Kargl <kargls@attbi.com>
2896
2897 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
2898 remove last remains of -fquiet.
2899
2900 2003-06-22 Paul Brook <paul@nowt.org>
2901
2902 * resolve.c (resolve_operator): Don't fail if we can't simplify.
2903 (g95_resolve_expr): Ditto.
2904 (resolce_code): Mark as static.
2905 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
2906 gimplifer doesn't (yet).
2907
2908 2003-06-20 Paul Brook <paul@nowt.org>
2909
2910 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
2911 * match.c (g95_match_if): Add ST_PAUSE.
2912 (g95_match_stopcode): New function.
2913 (g95_match_pause, g95_match_stop): Use it.
2914 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
2915 (decode_stmt, next_statement, parse_executable): Ditto.
2916 * resolve.c (resolve_code): Ditto.
2917 * st.c (g95_free_statement): Ditto.
2918 * trans-stmt.c (g95_trans_pause): New function.
2919 * trans-stmt.h: Declare it.
2920 * trans.c (g95_trans_code): Use it.
2921 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
2922 Declare.
2923 (g95_build_builtin_function_decls): Initialize them.
2924 * trans.h: Ditto.
2925 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
2926
2927 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2928
2929 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
2930 match_filepos): Fix error handling.
2931
2932 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2933
2934 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
2935 Add assertions on arguments.
2936 * resolve.c (expression_shape): Remove useless &.
2937 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
2938 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
2939 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
2940 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
2941 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
2942 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
2943 (g95_simplify_not, g95_simplify_scale): Add assertions.
2944
2945 2003-06-15 Paul Brook <paul@nowt.org>
2946
2947 Clean up stuff to work with the ssa optimizers.
2948 * convert.c (convert): Handle BOOLEAN_TYPEs.
2949 * f95-lang.c (g95_truthvalue_conversion): Implement.
2950 * trans-array.c (g95_trans_array_constructor_value): Group multiple
2951 scalar values.
2952 * trans.h (g95_truthvalue_conversion): Declare.
2953 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
2954 * trans-stmt.c (g95_trans_character_select): Don't create array
2955 assignments. Mark labels as indirect jump targets.
2956 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
2957 (g95_get_dtype_cst): Handle LOGICAL types.
2958
2959 2003-06-14 Paul Brook <paul@nowt.org>
2960
2961 * f95-lang.c (g95_gimplify_expr): New function.
2962 * trans-array.c (g95_trans_array_constructor_value): Don't create
2963 array assignments.
2964 (g95_conv_expr_descriptor): Rename simple->gimple.
2965 * trans-expr.c (conv_expr_op): Use proper logical operators.
2966 * trans-intrinsic.c (build_fixbound_expr): New function.
2967 (build_fix_expr): Ditto.
2968 (g95_conv_intinsic_aint): Use them. Use builtin functions.
2969 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
2970
2971 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2972
2973 * array.c (g95_compare_array_spec): Remove unreachable code.
2974 * expr.c (g95_copy_expr): Likewise.
2975 * intrinsic.c (g95_convert_type): Likewise.
2976 * misc.c (g95_code2string): Likewise.
2977 * simplify.c (g95_simplify_ishft, g95_simplify_real,
2978 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
2979 * trans-stmt.c (g95_trans_select): Likewise.
2980 * primary.c (extend_ref): Add an assertion.
2981 * simplify.c (g95_convert_constant): Add const.
2982 * intrinsic.h: Remove g95_check_x_ni.
2983 * f95-lang.c (g95_finish): Call g95_release_include_path.
2984
2985 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2986
2987 * resolve.c (resolve_contained_functions): Fix typo introduced on
2988 2003-01-13.
2989
2990 2003-06-09 Paul Brook <paul@nowt.org>
2991
2992 * g95.h: Include system.h not hwint.h.
2993 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
2994 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
2995
2996 2003-06-09 Paul Brook <paul@nowt.org>
2997
2998 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
2999 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
3000 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
3001 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
3002 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
3003 objects.
3004 * trans.h (g95_trans_equivalence, g95_trans_common,
3005 g95_add_decl_to_function): Declare.
3006 * trans-common.c, trans-equivalence.c: New files.
3007
3008 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
3009
3010 * intrinsic.c (g95_intrinsic_extension): Remove.
3011 (add_functions): Substitute g95_check_x for g95_check_x_ni
3012 everywhere.
3013 (g95_init_expr_extensions): New function.
3014 (g95_intrinsic_func_interface): Use it.
3015 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
3016 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
3017 g95_check_precision, g95_check_present, g95_check_radix,
3018 g95_check_range, g95_check_selected_real_kind): Do not set
3019 g95_intrinsic_extension.
3020 (g95_check_x_ni): Remove now duplicate of g95_check_x.
3021
3022 * expr.c (check_inquiry): Add FIXME, fixup some code style.
3023
3024 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3025
3026 * g95.h (ref_type): Name this type explicitly.
3027 * module.c (MIO_NAME): Add specialisations of mio_name.
3028 (mio_symbol_attribute, mio_typespec, mio_array_ref,
3029 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
3030 (ab_attribute): Name this type explicitly.
3031 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
3032
3033 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
3034
3035 * trans-intrinsic.c (g95_conv_allocated): New function.
3036 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
3037
3038 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
3039
3040 * f95-lang.c: Don't include g95-support.h
3041 (g95_mark_addressable): Add prototype.
3042 (g95_init_decl_processing): Remove C front end hack.
3043 * f95-tree.c: Remove file.
3044 * support.c: Remove file.
3045 * g95-support.h: Remove file.
3046 * trans-types.c (g95_init_types): Set up boolean
3047 type related tree nodes.
3048 * Make-lang.in: Remove rules for dead files and
3049 dependencies on them.
3050
3051 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
3052
3053 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
3054 C front end dependency. Also, convert.c does not depend on
3055 g95-support.h anymore.
3056 * convert.c: Don't include c-common.h and g95-support.h
3057 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
3058 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
3059 stmts_are_full_exprs_p, current_stmt_tree,
3060 current_scope_stmt_stack): Remove.
3061 * g95-support.h (unsigned_conversion_warning): Kill proto.
3062 (boolean_type_node, boolean_true_node, boolean_false_node):
3063 Don't define here. Instead, make then true tree nodes in
3064 trans-types.
3065 * support.c (c_global_trees): Die, C front end, die!!!
3066 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
3067 uintmax_type_node, string_type_node and const_string_type_node.
3068 (decl_constant_value, overflow_warning): Make static functions.
3069 They are in death row too, though.
3070 (default_conversion, c_expand_asm_operands): Remove.
3071 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
3072 trans.c: Don't include c-common.h.
3073 * trans-types.c (boolean_type_node, boolean_true_node,
3074 boolean_false_node): Make them real tree nodes.
3075 * trans-types.h (intmax_type_node, string_type_node,
3076 const_string_type_node): Hack to work around C dependencies
3077 in builtin-types.def.
3078
3079 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3080
3081 * decl.c (decl_types): Add some iterators-like sentinels.
3082 * decl.c (match_attr_spec): Use them.
3083 Use "decl_types" instead of "int".
3084 Add cast in call to g95_match_strings.
3085 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
3086 instead of "int".
3087 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
3088 (g95_interface_info): Use "g95_intrinsic_op".
3089 * dump-parse-tree.c (g95_show_namespace): Use them.
3090 * interface.c (g95_check_interfaces): Use them.
3091 * module.c (read_module, write_module): Use them.
3092 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
3093 Use "g95_intrinsic_op".
3094 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
3095 Add a default case in switch statement.
3096 * intrinsic.h (g95_generic_isym_id): Moved to...
3097 * g95.h (g95_generic_isym_id): here.
3098 (g95_intrinsic_sym): Use "g95_generic_isym_id".
3099 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
3100 * trans-intrinsic.c (g95_intrinsic_map_t,
3101 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
3102 * match.c (g95_match_intrinsic_op): Add cast in call to
3103 g95_match_strings.
3104
3105 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
3106
3107 * support.c (skip_evaluation, warn_conversion, lvalue_p,
3108 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
3109 constant_fits_type_p, convert_and_check,
3110 unsigned_conversion_warning): Remove these ugly remnants
3111 we inherited from the C front end.
3112 (function_types_compatible): Remove '#if 0'-edcode.
3113 (build_modify_expr): Likewise.
3114 (convert_for_assignment): Don't use the deceased functions.
3115 The parameter fundecl is now unused.
3116 (decl_constant_value): Always just return decl. In fact
3117 this function is not used at present, but it might be in
3118 the future, when we start using the tree inliner.
3119 (overflow_warning, default_conversion, c_expand_asm_operands):
3120 Abort when these are called, they are part of the C type
3121 checking implementation and therefore poison to Fortran.
3122
3123 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
3124
3125 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
3126 c-pretty-print.o and c-dump.o. Add a comment on why we
3127 depend on c-semantics.c.
3128 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
3129 Don't use the C front end tree dumper hook to dump the
3130 language specific tree representation -- we don't have
3131 one. So instead, inherit the default langhook.
3132
3133 2003-06-02 Paul Brook <paul@nowt.org>
3134
3135 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
3136
3137 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3138
3139 * check.c (g95_check_associated): Use proper types. Remove
3140 extraneous argument in call to g95_error().
3141
3142 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
3143
3144 * resolve.c (resolve_operator): Make logical operands convert to the
3145 type with higher kind.
3146
3147 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
3148
3149 * check.c (g95_check_associated): Make sure both pointer and target has
3150 the same type and rank. Null pointer or array section with vector
3151 subscript as target are not allowed.
3152 * trans.h: Declare gfor_fndecl_associated.
3153 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
3154 gfor_fndecl_associated.
3155 * trans-intrinsic.c (g95_conv_associated): New function.
3156 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
3157
3158 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
3159
3160 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
3161 according to POINTER itself rather than TARGET.
3162 (g95_conv_expr_descriptor): Make lbound start at 1.
3163 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
3164
3165 2003-06-01 Paul Brook <paul@nowt.org>
3166
3167 * expr.c (g95_type_convert_binary): Make it match the standard.
3168 * g95.texi: Remove dead link.
3169
3170 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
3171
3172 * g95.texi: Cleanup somewhat in preparation for inclusion
3173 in GCC CVS.
3174
3175 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3176 Canqun Yang <canqun@yahoo.com.cn>
3177
3178 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
3179 type.
3180 (g95_find_forall_index): Return proper value.
3181 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
3182 compare the return value from g95_find_forall_index.
3183
3184 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3185 * g95.h, io.c (g95_st_label): Remove "length".
3186 (g95_symtree): Remove "link".
3187 (g95_case): Remove "code".
3188 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
3189 g95_convert_real): Make an argument pointer to const.
3190 * decl.c (colon_seen): Add a TODO.
3191 * interface.c (g95_compare_types): Fix typo.
3192 * interface.c (compare_interfaces): Preserve value of "p".
3193 * intrinsic.c (sort_actual): Remove "i".
3194 * match.c (g95_match_assign): Proper type in call to g95_match().
3195 * parse.c (next_free): Avoid duplicate call due to macro.
3196 * parse.c (check_statement_label): wrong type in call to g95_error.
3197 * primary.c (match_real_constant): Add a TODO.
3198 * resolve.c (resolve_select): Remove useless conditional.
3199 * simplify.c (g95_simplify_repeat): Proper assignment to
3200 "value.character.string".
3201 * simplify.c (g95_simplify_reshape): Wrong variable in call to
3202 g95_error.
3203
3204 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
3205
3206 * trans-stmt.c: Remove unnecessary include file defaults.h.
3207
3208 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
3209
3210 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
3211 stride.
3212 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
3213 actual variables used as FORALL indexes.
3214
3215 2003-05-15 Paul Brook <paul@nowt.org>
3216
3217 * trans-array.c (g95_trans_static_array_pointer): Use
3218 null_pointer_node.
3219 (g95_trans_deferred_array): Initialize static array pointers.
3220 * trans-expr.c (g95_conv_function_call): Use formal arglist to
3221 correctly pass POINTER and absent CHARACTER arguments.
3222
3223 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
3224
3225 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
3226 (g95_resolve_forall_body): Resolve FORALL body.
3227 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
3228 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
3229 (g95_find_forall_index): Check whether the FORALL index appears in
3230 the expression or not.
3231 (resolve_code): Modified.
3232
3233 2003-05-14 Paul Brook <paul@nowt.org>
3234
3235 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
3236
3237 2003-05-13 Paul Brook <paul@nowt.org>
3238
3239 * trans-types.c (g95_max_array_element_size): Now a tree node.
3240 (g95_init_types): Work out max size properly.
3241 (g95_get_dtype_cst): Modify to match.
3242
3243 2003-05-11 Paul Brook <paul@nowt.org>
3244
3245 * trans-io.c (add_case): Create a label decl for case labels.
3246
3247 2003-05-11 Paul Brook <paul@nowt.org>
3248
3249 * arith.c (g95_integer_index_kind): New variable.
3250 * f95-lang.c (g95_init): Move frontend initialization here ...
3251 (g95_post_options): ... from here.
3252 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
3253 * intrinsic.c (add_functions): Use index kinds.
3254 * iresolve.c: Convert to index_kind where needed.
3255 * resolve.c (g95_resolve_index): Make public, use index_kind.
3256 (resolve_array_ref): Adjust to match.
3257 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
3258 * trans-stmt.c: Ditto.
3259 * trans-types.c: Ditto.
3260 * trans-types.h (g95_array_index_kind): Remove declaration.
3261 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
3262
3263 2003-05-07 Paul Brook <paul@nowt.org>
3264
3265 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
3266 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
3267 of bound indices.
3268
3269 2003-05-07 Paul Brook <paul@nowt.org>
3270
3271 * trans-array.c (trans_static_array_pointer,
3272 g95_trans_array_constructor_value, g95_conv_array_initializer,
3273 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
3274 (g95_add_loop_ss_code): Convert subscripts to the correct type.
3275 * trans-stmt.c (g95_trans_character_select): Ditto.
3276 * trans-types.c (g95_init_types): Ditto.
3277
3278 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
3279
3280 * f95-lang.c (expand_function_body): Use input_line, not lineno.
3281 * trans-decl.c (g95_generate_function_code,
3282 g95_generate_constructors): Likewise.
3283 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
3284 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
3285 Likewise.
3286
3287 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3288 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
3289 with components point to the DERIVED type itself, and two DERIVED
3290 type with components point to each other.
3291 * trans-expr.c (g95_conv_componet_ref): Modified
3292
3293 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
3294 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
3295 null_pointer_node.
3296 (g95_trans_pointer_assign): Implement Nullify.
3297
3298 2003-05-01 Paul Brook <paul@nowt.org>
3299
3300 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
3301 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
3302
3303 2003-05-01 Paul Brook <paul@nowr.org>
3304
3305 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
3306 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
3307 IS_EMPTY_STMT.
3308
3309 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
3310
3311 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
3312 CASE_LABEL_EXPR.
3313
3314 2003-04-28 Paul Brook <paul@nowt.org>
3315
3316 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
3317 as their kind suggests.
3318 (g95_resolve_reshape): Ditto.
3319
3320 2003-04-28 Chun Huang <compiler@sohu.com>
3321
3322 * trans-expr.c (g95_conv_substring_expr): New function.
3323 (g95_conv_expr): Use it.
3324
3325 2003-04-28 Paul Brook <paul@nowt.org>
3326
3327 * iresolve.c (g95_resolve_transpose): Make it match the
3328 implementation.
3329 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
3330
3331 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
3332
3333 * trans-types.c (g95_add_field_to_struct): New function to
3334 add a field to a UNION_TYPE or RECORD_TYPE.
3335 * trans-types.h (g95_add_field_to_struct): Prototype.
3336 (g95_get_derived_type): Use g95_add_field_to_struct to add
3337 components.
3338 * trans-io.c (g95_add_field): Remove.
3339 (ADD_FIELD): Use new g95_add_field_to_struct function.
3340 (ADD_STRING): Likewise.
3341 * trans-stmt.c (g95_trans_select): Likewise.
3342 (g95_add_field): Remove duplicated function.
3343
3344 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
3345
3346 Port implementation for CHARACTER SELECT from Andy's tree.
3347 * trans-stmt.c (g95_trans_character_select): Implement character
3348 select. (g95_add_field): New function.
3349 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
3350 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
3351 * g95.h (struct g95_case): Add field 'int n'.
3352 * trans.h: Declare 'gfor_fndecl_select_string'.
3353
3354 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
3355
3356 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
3357 (g95_insert_bbd): Die on duplicates.
3358 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
3359
3360 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
3361
3362 * g95.texi: Require GMP 4.0 -- like we actually
3363 do. Explain the testsuite and what-goes-where.
3364 Don't use undefined texinfo symbol. Break very
3365 long line. Remove finished item from the list
3366 of open projects.
3367
3368 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
3369
3370 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
3371 LOGICAL type.
3372
3373 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
3374
3375 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
3376 (g95_trans_forall_body): New function.
3377
3378 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
3379
3380 * resolve.c (resove_where): New function.
3381 (resolve_where_shape): New function.
3382 (resolve_code): Add call to 'resolve_where'
3383 * trans-stmt.c (g95_trans_where): Modified.
3384 (g95_trans_where_2): New function.
3385 (g95_trans_where_assign): New function.
3386 (g95_evaluate_where_mask): New function.
3387 (g95_add_to_stmt_list): New function.
3388 (g95_get_temp_expr): New function.
3389 * trans.h (where_stmt_list): New structure.
3390
3391 2003-04-10 Paul Brook <paul@nowt.org>
3392
3393 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
3394 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
3395
3396 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
3397
3398 Update after mainline -> tree-ssa-branch merge.
3399 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
3400 call.
3401 (g95_init): Update for new lang_hooks definition.
3402 (g95_post_options): New langhook.
3403 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
3404 * scanner.c (g95_new_file): Comment update.
3405
3406 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3407
3408 * g95.h, lang-options.h: Add -Wimplicit-interface.
3409 * options.c (g95_init_options, g95_parse_arg): Set it.
3410 * interface.c (check_intents): Warn about call with implicit
3411 interface.
3412 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
3413 g95_procedure_use.
3414
3415 2003-04-05 Paul Brook <paul@nowt.org>
3416
3417 * iresolve.c (g95_resolve_spread): Don't resole based on type.
3418 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
3419
3420 2003-03-29 Paul Brook <paul@nowt.org>
3421
3422 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
3423 (g95_resolve_unpack): Ditto.
3424 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
3425 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
3426 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
3427
3428 2003-03-25 Paul Brook <paul@nowt.org>
3429
3430 * arith.c (g95_unary_user, g95_user): Remove dead functions.
3431 * arith.h: Ditto.
3432 * array.c (g95_free_array_ref): Ditto.
3433 * g95.h: Ditto.
3434 * symbol.c (g95_use_derived_tree): Ditto.
3435 * intrinsic.c (add_functions): Use simplification for SCALE.
3436 * primary.c (g95_match_rvalue): Test sym, not symtree.
3437
3438 2003-03-25 Paul Brook <paul@nowt.org>
3439
3440 * trans-decl.c (build_function_decl): Add parameter before it gets
3441 turned into a constant.
3442 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
3443 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
3444 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
3445
3446 2003-03-22 Paul Brook <paul@nowt.org>
3447
3448 * trans-array.c (g95_conv_array_initializer): Allow scalar
3449 expressions.
3450 * trans-decl.c (g95_finish_var_decl): Result variables are not
3451 module variables.
3452 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
3453 (g95_conv_intrinsic_function): Use it.
3454 * trans-types.h (g95_type_spec): Remove dead declaration.
3455
3456 2003-03-21 Paul Brook <paul@nowt.org>
3457
3458 * trans-decl.c (g95_build_function_decl): Mark string parameters.
3459
3460 2003-03-20 Paul Brook <paul@nowt.org>
3461
3462 * trans-decl.c (g95_build_function_decl): Put character length
3463 parameters at the end of the function declaration.
3464 * trans-expr.c (g95_conv_function_call): Ditto.
3465 * trans-types.c (g95_get_function_type): Ditto.
3466
3467 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3468
3469 * resolve.c (resolve_formal_arglist): Don't impose intent for
3470 procedure arguments of pure functions.
3471 (resolve_select): Remove redundant assignment.
3472
3473 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3474
3475 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
3476 Remove option l1.
3477 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
3478 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
3479 const.
3480 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
3481 Order list.
3482 * symbol.c (g95_add_type): Fix typo in comment.
3483
3484
3485 2003-03-16 Paul Brook <paul@nowt.org>
3486
3487 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
3488 * expr.c (g95_build_call): Remove.
3489 * f95-lang.c (puchdecl_top_level): New function.
3490 * g95.h (g95_code): Store resolved symbol, not just the name.
3491 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
3492 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
3493 (g95_get_intrinsic_sub_symbol): New function.
3494 * iresolve.c (g95_resolve_cpu_time): Use it.
3495 (g95_resolve_random_number): Ditto.
3496 * resolve.c: Set code->resolved_sym instead of code->sub_name.
3497 * trans-decl.c (g95_get_extern_function_decl): Give external decls
3498 the correct DECL_CONTEXT. Add global symbold to the global scope.
3499 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
3500 fixed.
3501
3502 2003-03-16 Paul Brook <paul@nowt.org>
3503
3504 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
3505 * options.c (g95_parse_arg): Ditto.
3506 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
3507 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
3508 for the procedure, not the parameter.
3509 * trans-array.c (g95_trans_g77_array): New function.
3510 (g95_trans_assumed_size): Use it.
3511 (g95_trans_dummy_array_bias): Ditto.
3512 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
3513 (g95_conv_expr_descriptor): ... to here. Update callers.
3514 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
3515 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
3516 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
3517 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
3518 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
3519 (g95_sym_type): Ditto.
3520
3521 2003-03-15 Paul Brook <paul@nowt.org>
3522
3523 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
3524 first chain.
3525 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
3526
3527 2003-03-14 Paul Brook <paul@nowt.org>
3528
3529 * trans-array.c (g95_array_is_packed): Remove.
3530 (g95_conv_array_base): Correctly handle all descriptorless cases.
3531 (g95_conv_array_stride): Use descriptorless strides.
3532 (g95_trans_dummy_array_bias): Don't always repack the array.
3533 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
3534 packed.
3535 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
3536 dummy and non-dummy arrays...
3537 (g95_sym_type, g95_get_derived_type): ... like these.
3538 (g95_get_array_type_bounds): Allow discontiguous arrays.
3539
3540 2003-03-12 Paul Brook <paul@nowt.org>
3541
3542 * array.c (g95_resolve_array_spec): Fix comment.
3543 * g95.h (symbol_attributes): New flag always_explicit.
3544 * resolve.c (resolve_formal_arglist): Set it always_explicit.
3545 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
3546 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
3547 (g95_trans_array_bounds): Allow assumed shape arrays.
3548 (g95_trans_repack_array): Remove.
3549 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
3550 * trans-decl.c (g95_build_qualified_array): Only ignore absent
3551 bounds for assumed size arrays.
3552 (g95_build_dummy_array_decl): Use descriptorless arrays.
3553 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
3554 (g95_trans_pointer_assign): Fix typo.
3555 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
3556 code.
3557 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
3558 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
3559 Also modify callers.
3560 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
3561
3562 2003-03-08 Paul Brook <paul@nowt.org>
3563
3564 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
3565 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
3566 * resolve.c (compare_spec_to_ref): Allow full array sections.
3567
3568 2003-03-08 Paul Brook <paul@nowt.org>
3569
3570 * expr.c (g95_simplify_expr): Also simplify array index and
3571 substring expressions.
3572 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
3573 * trans-array.c (g95_trans_array_bounds): New function.
3574 (g95_trans_auto_array_allocation): Use it.
3575 (g95_trans_assumed_size): Rewrite.
3576 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3577 (gfor_fndecl_repack): Remove.
3578 (g95_build_qualified_array): Handle absent upper bounds.
3579 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
3580 (g95_get_symbol_decl): Update.
3581 (g95_build_intrinsic_function_decls): Initialize new decls.
3582 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
3583 (gfor_fndecl_repack): Remove.
3584 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
3585 * trans-types.c: (g95_build_array_type): Merge duplicated code..
3586 (g95_get_nodesc_array_type): Handle absent bounds.
3587 * trans-types.h (g95_get_nodesc_array_type): Declare.
3588
3589 2003-03-04 Paul Brook <paul@nowt.org>
3590
3591 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
3592 builtin-types.def.
3593
3594 2003-03-02 Paul Brook <paul@nowt.org>
3595
3596 * options.c (g95_init_options): Drfault to 1.
3597 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
3598 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
3599 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
3600 Handle non-constant size automatic arrays.
3601 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
3602 generic bound functions.
3603 (g95_trans_auto_array_allocation): Don't create a descriptor.
3604 (g95_trans_assumed_size): New function (broken).
3605 (g95_trans_dummy_array_bias): Remove unused var.
3606 * trans-array.h (g95_trans_assumed_size): Declare.
3607 * trans-decl.c (create_index_var): New fuction.
3608 (g95_build_qualified_array): New function.
3609 (g95_get_symbol_decl): Use it.
3610 (g95_trans_deferred_vars): Handle assumed shape seperately.
3611 * trans-types.c (get_element_type): Handle heap allocated arrays.
3612 (g95_is_nodesc_array): Include non-const size arrays.
3613 (g95_get_nodesc_array_type): Ditto.
3614
3615 2003-02-23 Paul Brook <paul@nowt.org>
3616
3617 * trans-array.c (g95_array_init_size): Should use stride, not size of
3618 last dimension.
3619
3620 2003-02-18 Paul Brook <paul@nowt.org>
3621
3622 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
3623 after intrinsic function check.
3624
3625 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3626
3627 * io.c (match_io): Fix missing return value and remove useless
3628 assignment.
3629 * match.c (g95_match): Remove useless assignment.
3630 * module.c (parse_string): Remove useless post increment.
3631 * simplify.c (g95_simplify_verify): Remove useless assignment.
3632
3633 2003-02-15 Paul Brook <paul@nowt.org>
3634
3635 * expr.c (restricted_intrinsic): Handle bad values gracefully.
3636 * g95.h (symbol_attribute): Add referenced member.
3637 (g95_symbol): Add dummy_order member.
3638 (g95_set_sym_referenced): Declare.
3639 * match.c (g95_match_assignment, g95_match_call): Use it
3640 * primary.c (match_actual_arg, g95_match_rvalue,
3641 g95_match_variable): Ditto.
3642 * symbol.c (next_dummy_order): New variable.
3643 (g95_set_sym_referenced): New function.
3644 (check_done): New function.
3645 (g95_add_*): Use it.
3646 * trans-decl.c: Make formatting conform to GCC standards.
3647 (g95_defer_symbol_init): Add dummy variables in the right order.
3648 (g95_get_symbol_decl): Only accept referenced variables.
3649 (g95_create_module_variable): Module variables are always required.
3650 (generatr_local_decls): New function.
3651 (generate_local_vars): New function.
3652 (g95_generate_function_code): Use it.
3653
3654 2003-02-13 Paul Brook <paul@nowt.org>
3655
3656 * trans-decl.c (g95_conv_struct_cons): Remove.
3657 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
3658 * trans-expr.c (g95_conv_structure): New function.
3659 (g95_conv_expr): Use it.
3660
3661 2003-02-09 Paul Brook <paul@nowt.org>
3662
3663 * trans-array.c (g95_array_init_size): Don't evaluate the linit
3664 expressions multiple times.
3665 (g95_trans_auto_arry_allocation): Use pointer not tmp.
3666
3667 2003-02-08 Paul Brook <paul@nowt.org>
3668
3669 * module.c (mio_symtree_ref): Declare as static.
3670 (mio_expr): Remove dead code.
3671 (read_module): Set the symtree link for fixups.
3672 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
3673 (build_round_expr): ... to this.
3674 (g95_conv_intrinsic_aint): New function.
3675 (g95_conv_intrinsic_function): Use it.
3676
3677 2003-02-08 Paul Brook <paul@nowt.org>
3678
3679 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
3680 offset after modificaton, not the increment expression.
3681 * dependency.c: Kill excess whitespace.
3682
3683 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
3684
3685 * dependency.h: Remove some function declarations.
3686 * dependency.c (get_no_of_elements): Change this function not to
3687 return int.
3688 * other: Add comments for all modified functions.
3689
3690 2003-02-06 Paul Brook <paul@nowt.org>
3691
3692 * g95spec.c (lang_specific_functions): Fix initializer warning.
3693 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
3694 for structure type names.
3695 * trans-decl.c (g95_cons_structure_cons): New function.
3696 (g95_get_symbol_decl): Use it.
3697 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
3698 referencing code.
3699
3700 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3701
3702 * resolve.c (compare_cases): Add const to casts.
3703
3704 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3705
3706 * g95.h (g95_check_f): Change a1 to f1m.
3707 * intrinsic.c (add_sym_1m, check_specific,
3708 g95_intrinsic_func_interface): Use it.
3709
3710 * module.c (init_pi_tree): Remove useless cast.
3711 (fp2): Fix argument type.
3712
3713 * parse.c (parse_select_block): Add comment.
3714
3715 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
3716
3717 * lang-options.h: Fix warning involving C90 concatenated
3718 strings.
3719
3720 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
3721 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3722
3723 * io.c (format_asterisk): Complete initializer to kill warning.
3724 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
3725 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
3726 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
3727 new defines to complete initializers. Kills all warnings.
3728
3729 * Make-lang.in: Comment cleanup.
3730
3731 2003-02-05 Paul Brook <paul@nowt.org>
3732
3733 * array.c (g95_free_constructor): Handle NULL expressions.
3734 * resolve.c (resolve_structure_cons): Ditto.
3735 * decl.c (g95_match_null): New Function.
3736 (variable_decl): Use it.
3737 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
3738 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
3739 * trans-types.c (g95_set_decl_attributes): Remove empty function.
3740
3741 2003-02-05 Paul Brook <paul@nowt.org>
3742
3743 * trans.h (build1_v): New macro.
3744 (build_v): Remove pointless and incorrect prototype.
3745 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
3746 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
3747
3748 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
3749
3750 * Make-lang.in (F95_OBJS): Remove one more dead file.
3751
3752 2003-02-01 Paul Brook <paul@nowt.org>
3753
3754 * lang-specs.h: Don't pass -ffixed-form to the linker.
3755 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
3756
3757 2003-02-01 Paul Brook <paul@nowt.org>
3758
3759 * Make-lang.in (F95_OBJS): Remove dead files.
3760 * trans-array.c (g95_array_init_size): Do the right thing when
3761 ubound=NULL.
3762 * trans-decl.c (g95_generate_function_code): Initialize deffered
3763 symbol list before translating contained subroutines.
3764 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
3765 scalar invariant values here...
3766 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
3767 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
3768
3769 2003-01-29 Paul Brook <paul@nowt.org>
3770
3771 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
3772 (g95_walk_elemental_function_args): Reverse chains before adding.
3773 (g95_reverse_ss): Move about a bit.
3774 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
3775 function arguments.
3776
3777 2003-01-28 Paul Brook <paul@nowt.org>
3778
3779 * intrinsic.c (resolve_intrinsic): Use correct union member.
3780 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
3781 parameters.
3782 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
3783 use associated variables.
3784 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
3785 * trans-expr.c (g95_conv_expr_present): ... to here.
3786 * trans.h: Declare it.
3787 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
3788
3789 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
3790
3791 * array.c (expand_iterator): Suppress useless assignment.
3792 * decl.c (match_char_spec): Ditto.
3793 * io.c (match_io_iterator): Ditto.
3794 * primary.c (match_real_constant): Ditto.
3795 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
3796 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
3797 * matchexp.c (match_add_operand, match_level_5): Likewise.
3798 * module.c (parse_atom, find_enum): Likewise.
3799 * resolve.c: move #include <string.h>
3800 (resolve_select): Fix serious typo.
3801
3802 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
3803
3804 * Make-lang.in: Don't build with broken tree-ssa-pre.
3805
3806 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
3807
3808 * resolve.c (resolve_index): Add a TODO.
3809 * symbol.c: Remove useless "#include <ctype.h>".
3810
3811 2003-01-27 Paul Brook <paul@nowt.org>
3812
3813 * check.c (check_rest): Allow different type kinds as an extension.
3814 * g95.h (g95_resolve_f): Add f1m.
3815 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
3816 * intrinsic.h: Chenge prototypes for MIN and MAX.
3817 * iresolve.c (g95_resolve_minmax): New function.
3818 (g95_resolve_min, g95_resolve_max): Use it.
3819 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
3820 arguments once.
3821 (g95_conv_intrinsic_present): Fix logic.
3822
3823 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
3824
3825 * g95.h (g95_case): Don't be a tree, be a double linked list.
3826 * match.c (match_case_selector): Remove redundant semantics check.
3827 Clean up a few goto's to make it a tiny little bit faster.
3828 * resolve.c (case_tree): Die.
3829 (compare_cases): Accept and compare unbounded cases too.
3830 (check_case_overlap): Don't build a tree. Instead, merge-sort the
3831 whole list of g95_cases passed from resolve_select.
3832 (sane_logical_select): Die.
3833 (check_case_expr): Return FAILURE if a CASE label is of the wrong
3834 type kind.
3835 (resolve_select): Fixup case expression for computed GOTOs, put it
3836 in expr, not expr2, for easier handing in the parse tree dumper and
3837 the code generator. Rewrite the rest of the function: Kill
3838 unreachable case labels and unreachable case blocks.
3839 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
3840 an EXEC_SELECT, not case2 anymore.
3841 * trans-const.c (g95_conv_constant_to_tree): New function.
3842 (g95_conv_constant): Use it.
3843 * trans-const.h: Declare prototype for the new function.
3844 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
3845 g95_trans_character_select): New static functions.
3846 (g95_trans_select): Rewrite.
3847
3848 2003-01-26 Paul Brook <paul@nowt.org>
3849
3850 * intrinsic.c (add_fnctions): Properly add dreal.
3851 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
3852 (g95_conv_intrinsic_function): Use it.
3853 * trans-io.c (build_dt): Abort on internal files (unimplemented).
3854
3855 2003-01-26 Paul Brook <paul@nowt.org>
3856
3857 Widespread changes to the handling of symbols in expressions. These
3858 are now linked via g95_symtree nodes.
3859 * parse.c (g95_fixup_sibling symbols): New function.
3860 (parse_contained): Use it.
3861 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
3862 contained procedure that has bee correctly fixed up.
3863 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
3864
3865 2003-01-24 Paul Brook <paul@nowt.org>
3866
3867 * trans-array.c (g95_walk_expr): Function result attributes are in
3868 sym->result.
3869 * trans-expr.c (g95_conv_function_call,
3870 g95_trans_arrayfunc_assign): Ditto.
3871 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
3872
3873 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
3874
3875 * expr.c (check_restricted): Fix error message.
3876 * symbol.c (free_st_labels): Plug memleak.
3877
3878 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3879
3880 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
3881 reduce_binary_aa, reduce_binary, eval_intrinsic,
3882 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
3883 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
3884 for typesafe intrinsics helper functions.
3885 (g95_intrinsic_sym): Use them.
3886 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
3887 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
3888 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
3889 check_specific, g95_intrinsic_func_interface,
3890 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
3891 helper functions.
3892 * trans-decl.c (g95_get_extern_function_decl): Likewise.
3893 * Make-lang.in: Don't disable warnings for strict prototypes
3894 any longer, everything is typesafe now.
3895
3896 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
3897
3898 * bbt.c (duplicate_node): Make static.
3899 * module.c (module_name): Make static.
3900 * scanner.c (include_dirs): Make static.
3901
3902 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3903
3904 Hard coded _gfor_'s should not show up anymore.
3905 * g95.h (PREFIX): New macro.
3906 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
3907 hard-coded "_gfor".
3908 (g95_resolve_random_number): Likewise.
3909 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
3910 * trans-io.c: Remove 'prefix' macro. Replace all uses with
3911 the new PREFIX macro from g95.h.
3912
3913 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3914
3915 The troubles of forking... Andy implemented this just now too.
3916 Let's stick to that and keep the trees close.
3917 * g95.h (g95_st_label): 'format' member is now a g95_expr.
3918 * io.c: Revert previous changes.
3919 (g95_match_format): Match the format string as a character
3920 literal expression.
3921 * match.h (g95_statement_label): Declare external.
3922 * parse.c: Revert previous changes.
3923 * symbol.c (g95_free_st_label): Free a g95_expr instead
3924 if a 'char *'.
3925 * trans-io.c: Revert previous changes.
3926 (build_dt): Use set_string to set the format string.
3927
3928 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3929
3930 * io.c (format_string): Make non-static.
3931 (g95_match_format): Remember the format string.
3932 (terminate_io): Add I/O termination for empty I/O lists.
3933 * match.h: Declare external format_string.
3934 * parse.c (check_statement_label): Attack the format string
3935 to a format label for FORMAT statements.
3936 * trans-io.c (g95_add_field): Define prefix macro. Replace
3937 all uses of PREFIX define with a use of this macro.
3938 (build_dt): Implement formatted I/O for format labels.
3939
3940 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
3941
3942 * lang-options.h: Kill "-std=F".
3943 * options.c: Remove unimplemented "-std=F". Modify
3944 web address.
3945 * misc.c (g95_terminal_width): New function.
3946 * error.c (g95_error_init_1): Use g95_terminal_width.
3947 * g95.h: Add prototype for g95_terminal_width, remove
3948 fmode flag.
3949
3950 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
3951
3952 * Make-lang.in: Fix typo.
3953
3954 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3955
3956 * g95.h (struct g95_case): Remove unused cruft, new member
3957 'where' to keep track of the locus of the default case.
3958 * match.c (g95_match_case): Add locus to the current case.
3959 (match_case_selector): Likewise.
3960 * parse.c (parse_select_block): Move semantics check for
3961 multiple DEFAULT cases out of here to...
3962 * resolve.c (check_case_overlap): ...here. Return sooner
3963 when possible.
3964 (check_case_expr): Take two g95_cases now, use to sure the
3965 expression kinds are the same.
3966 (resolve_select): Cleanup.
3967
3968 2003-01-18 Paul Brook <paul@nowt.org>
3969
3970 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
3971 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
3972 variables.
3973 (g95_get_extern_function_decl): Put decls in the correct context.
3974
3975 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3976
3977 * trans-io.c: Port changes from Andy to set ERR flag.
3978
3979 2003-01-17 Paul Brook <paul@nowt.org>
3980
3981 * trans-array.c: Add various comments.
3982 (g95_ss_terminator): Declare as const.
3983 (g95_walk_expr): Remove first parameter and update all callers.
3984 (g95_walk_op_expr): Initialize scalar SS properly.
3985 * trans-array.h (g95_walk_expr): Update prototype.
3986 * trans-expr.c: Update for new g95_walk_expr.
3987 * trans-intrinsic.c: Ditto.
3988 * trans-io.c: Ditto.
3989 * trans.h: Various comments for SS chains.
3990
3991 2003-01-17 Paul Brook <paul@nowt.org>
3992
3993 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
3994 and RRSPACING.
3995 * intrinsic.c (add_functions): Use them.
3996 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
3997 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
3998
3999 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
4000
4001 Fallout of a small merge conflict:
4002 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
4003
4004 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
4005
4006 * initrinsic.c: New add_sym_* functions for strong typing.
4007 (add_conv): Make prototype strict.
4008 * dump-parse-tree.c, dependency.c: Include config.h
4009 * resolve.c, trans-io.c: Fix typos.
4010
4011 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
4012
4013 * dump-parse-tree.c (g95_show_code_node): Show the
4014 condition for a computed GOTO that was transformed
4015 to a SELECT CASE construct.
4016 * resolve.c (check_case_overlap): Revert previous switch
4017 to treaps, it was too slow and didn't catch all trouble.
4018 (resolve_symbol): Be more flexible about module procedures.
4019 * symbol.c (check_conflict): Point to relevant section in
4020 the standard for dubious conflict. Allow procedure
4021 dummy arguments to be optional again.
4022 * trans-io (add_field): Rename to g95_add_field. Change
4023 all callers.
4024 * trans-stmt (trans_select): Handle unbounded cases for
4025 integer SELECT CASE constructs. Fix/add more comment.
4026
4027 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
4028
4029 * g95.h: Uses GCC's function attribute macros.
4030 * error.c, module.c, parse.c, g95.h: More function attributes.
4031
4032 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
4033 Forgot a file...
4034 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
4035 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
4036 DECL_SOURCE_FILE.
4037
4038 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
4039
4040 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
4041 DECL_SOURCE_LINE.
4042 * trans.c (g95_trans_code): Use annotate_all_with_file_line
4043 instead of nowdead wrap_all_with_wfl.
4044
4045 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
4046
4047 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
4048 before generating code, so we can still see it even if the code
4049 generation phase dies.
4050
4051 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
4052
4053 * decl.c (build_sym): Split out initialization expression parts...
4054 (add_init_expr_to_sym): ...to here.
4055 (variable_decl): Add the symbol following an attribute list to the
4056 symbol tree before parsing the optional initialization expression
4057 if the symbol is not of a derived type.
4058 * primary.c (g95_match_rvalue): Don't assume a symbol always has
4059 a value if it is a PARAMETER.
4060
4061 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
4062
4063 * misc.c: Don't #include <mcheck.h>
4064 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
4065 ever was a glibc bug, then either this was never reported to
4066 glibc people, or it has been fixed for so long that there's
4067 no information you can find about it, anywhere.
4068
4069 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
4070
4071 Fix warnings:
4072 * module.c (attr_bits, bt_types, array_spec_types):
4073 Switch 'const' and 'static'.
4074 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
4075
4076 GNU'ify source code:
4077 * trans-io.c: Numerous fixes, one fixed warning and a few
4078 TODO markers so that we don't forget about them.
4079
4080 2003-01-13 Paul Brook <paul@nowt.org>
4081
4082 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
4083 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
4084 Add G95_ISYM_SCALE.
4085 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
4086 * match.c (g95_match_stop): Fix dumb == -> != error.
4087
4088 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
4089
4090 * dump-parse-tree.c (show_indent): Add line breaks. This
4091 whole dumping process needs cleanups.
4092 * f95-lang.c (g95_mark_addressable): Fix prototype to match
4093 the langhook. Fix 'return's accordingly.
4094 * g95-support.h: Adjust prototype.
4095 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
4096 * lang-options.h: Add '-fsyntax-only'.
4097 * options.c (g95_init_options): Init 'no_backend'.
4098 (g95_parse_arg): Deal with '-fsyntax-only'.
4099 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
4100 is set.
4101
4102 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
4103 Patch from Arnaud
4104 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
4105 arguments. Also make sure that if a symbol is marked INTRINSIC,
4106 an intrinsic with the symbol's name actually exists.
4107 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
4108 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
4109 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
4110
4111 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
4112
4113 * resolve.c (resolve_contained_functions): Fix condition, don't
4114 throw internal_error if a child namespace has no name. Apparently
4115 this can be the case?
4116
4117 2003-01-11 Paul Brook <paul@nowt.org>
4118
4119 Port changes from Andy's tree:
4120 * g95.h (g95_code): Add stop_code.
4121 * match.c (g95_match_stop): Detter syntax checking.
4122 * resolve.c (resolve_generic_f0): Return match type.
4123 (resolve_generic_f): Remove dead/duplicated code.
4124 (resolve_specific_f): Ditto.
4125 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
4126 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
4127 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
4128
4129 2003-01-11 Paul Brook <paul@nowt.org>
4130
4131 * trans-array.c: Various documentation/comment changes.
4132 * trans-stmt.c: Ditto.
4133
4134
4135 2003-01-10 Paul Brook <paul@nowt.org>
4136
4137 * options.c/h: Add -fdump-parse-tree as alias of -v.
4138
4139 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4140
4141 * dump-parse-tree.c (g95_show_namespace): Fixed another
4142 typo. Sorry, it's Friday...
4143
4144 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4145
4146 Spotted by Tobi:
4147 * trans-array.c, trans-array.h, trans.c, trans-const.c,
4148 trans-const.h, trans-decl.c, trans-expr.c, trans.h
4149 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
4150 trans-types.c: Fix bogus copyright years, add 2003.
4151 * trans-types.h: Give copyright header.
4152
4153 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4154
4155 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
4156 * expr.c, options.c, scanner.c: Add some more 'const' markers.
4157 * intrinsic.c: Some constant strings moved to read-only memory.
4158 * io.c (format_asterisk): Move to...
4159 * g95.h: ...here.
4160
4161 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4162
4163 * dump-parse-tree.c (g95_show_namespace): Dump implicit
4164 types for ranges instead of per-letter. Indent the
4165 'CONTAINS' just like everything else.
4166 * resolve.c (resolve_contained_functions): Clarify comment.
4167 Explain non-obvious conditional expression. Improve
4168 diagnostics if tyoe cannot be resolved.
4169 Port semi-fix from Andy's tree:
4170 (was_declared): Move up before first use.
4171 (generic_sym, specific_sym): New functions. Code moved
4172 out if procedure_kind.
4173 (procedure_kind): Simplify using new functions.
4174 (resolve_generic_f): Make sure the functions we find in
4175 a parent namespace is generic.
4176 (resolve_specific_f): Ditto for specific functions.
4177
4178 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4179
4180 * trans-stmt.c, trans.c: Fix some code style issues. Add
4181 some more comment (but still not enough!).
4182
4183 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
4184
4185 * symbol.c (flavors, procedures, intents, acces_types,
4186 access_types, ifsrc_types): Make const.
4187 * misc.c (g95_string2code): Make 'm' param 'const'.
4188 * module.c (find_enum, write_atom, mio_name): Make
4189 'm' param 'const'.
4190 (attr_bits, bt_types, array_spec_types, array_ref_types,
4191 ref_types, expr_types): Make const.
4192 * g95.h: Adjust external decls.
4193
4194 2003-01-09 Paul Brook <paul@nowt.org>
4195
4196 * Testsuite: Add a load of new cases.
4197
4198 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
4199
4200 * Make-file.in: Add dependency on back end header files;
4201 a parallel build should work now.
4202 * f95-lang-c (lang_identifier): Remove bogus comment.
4203 (g95_be_parse_file): Fix prototype.
4204 (g95_init): Make static.
4205 (g95_finish): Make static.
4206 * error.c (g95_syntax_error): Kill. Make define in...
4207 * g95.h (g95_syntax_error): Define.
4208 (g95.options): Make 'source' member 'const'.
4209 * interface.c (g95_match_interface): Explain
4210 hard-to-read condition.
4211 (g95_match_end_interface): Ditto.
4212 * trans_const.c (g95_build_string_const): Make 's' parameter
4213 'const'.
4214 * trans_const.h: Adjust protoype accordingly.
4215 * trans-decl.c: Include tree-dump.h
4216 (g95_generate_function_code): Build fixes for recent changes
4217 in the tree-ssa branch.
4218
4219 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
4220
4221 * format.c: Kill, move code from here...
4222 * io.c: ...to here.
4223 * Make-lang.in: Adjust.
4224 * MANIFEST: Ditto.
4225 * match.h: Ditto.
4226 * BUGS: Mention where to submit bugs. Move old content...
4227 * TODO: ...to here. New file.
4228
4229 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
4230 Fix most warnings, and suppress the ones we can't fix for now.
4231 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
4232 these warnings just clutter the screen and there's not much
4233 we can do about them for now anyway.
4234 * check.c, iresolve.c: Mark unused function parameters.
4235 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
4236 they should be resolved before they get here.
4237 * error.c: Remove unused FILE *status_out.
4238 * f95-lang.c (g95_init): Remove bogus cast.
4239 * Many files: Make things 'const' where required.
4240 * g95.h: Fix prototypes for all modified functions above.
4241 (g95_options): Remove 'object' member.
4242
4243 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
4244
4245 * Make-file.in: Cleanup bogus targets. Add more comment.
4246 * lang-options.h: New option '-w'.
4247 * g95.h: add no_options field to struct g95_options.
4248 * options.c (g95_init_options): Default no_warnings to off.
4249 (g95_parse_arg): Recognise the '-w' switch and its alias,
4250 '-fno-warnings'.
4251 * error.c (g95_warning, g95_warning_now): Don't emit warning if
4252 no_warning option is set.
4253 * iresolve.c (g95_resolve_shape): Fix warning.
4254
4255 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
4256
4257 * primary.c (g95_next_string_char): Rename next_string_char, and
4258 make static. Adjust callers accordingly.
4259 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
4260 callers accordingly.
4261 * g95.h: Split out all g95_match* functions to...
4262 * match.h: ...here. New file.
4263 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
4264 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
4265
4266 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
4267
4268 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
4269 g95_merge_new_implicit): New functions.
4270 (g95_match_implicit_none, g95_match_implicit): Move from here...
4271 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
4272 Modify to use the new functions in symbol.c.
4273 * g95.h: Add and move prototypes.
4274
4275 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4276
4277 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
4278 node compare function.
4279 (g95_insert_bbt): Likewise.
4280 (g95_insert_bbt_with_overlap): Likewise.
4281 (g95_delete_bbt): Likewise.
4282 (delete_treap): Likewise. Also fix a potential bug when calling it.
4283 * module.c (compare_pointers): Change proto to compare_fn.
4284 (compare_integers): Likewise.
4285 (compare_true_names): Likewise.
4286 (find_true_name): Adjust call to compare_true_names to match proto.
4287 (require_atom, write_atom, mio_name): Fix 'const' warnings.
4288 (init_pi_tree): Make compare a compare_fn instead of (int *).
4289 * resolve.c (compare_cases): Change proto to compare_fn.
4290 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
4291 it static, and rename to compare_symtree.
4292 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
4293 function.
4294 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
4295 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
4296
4297 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4298 * Make-lang.in: Fix spaces/tabs issues from previous patch.
4299 * patch.options: Blow away Paul's checkin mistake :-)
4300 * io.c (terminate_io): Fix memory leak (Arnaud).
4301
4302 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
4303
4304 * Make-lang.in: Teach about building DVI, info manual.
4305 * g95.texi: New file.
4306
4307 2003-01-02 Paul Brook <paul@nowt.org>
4308
4309 * trans-array.c (g95_reverse_ss): Make static and don't use.
4310 (g95_conv_ss_descriptor): Don't use g95_loopinfo
4311 (g95_conv_array_parameters): Modify for pointer assignments.
4312 (g95_walk_subexpr): New function.
4313 (g95_walk_expr*): Use it.
4314 * trans-array.h (g95_reverse_ss): Remove prototype.
4315 * trans-expr.c (g95_trans_pointer_assign): Implement.
4316 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
4317 * trans-intrinsic.c: Sync with scalarizer changes.
4318 * trans-io.c: Ditto.
4319
4320 2002-12-29 Paul Brook <paul@nowt.org>
4321
4322 * trans-array.c: Document calling convention for arrays.
4323
4324 2002-12-19 Paul Brook <paul@nowt.org>
4325
4326 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
4327 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
4328 optional parameters for some intrinsics.
4329 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
4330 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
4331 optional parameters.
4332 * trans.h (g95_se): Add ignore_optional flag.
4333
4334 2002-12-15 Paul Brook <paul@nowt.org>
4335
4336 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
4337 * trans-decl.c (g95_generate_function_code): Use TDI_original.
4338
4339 2002-12-14 Paul Brook <paul@nowt.org>
4340
4341 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
4342
4343 2002-12-12 Paul Brook <paul@nowt.org>
4344
4345 * trans-array.c (g95_trans_array_constructor_subarray): Fully
4346 initialize the scalarizer.
4347 (various): Update to new format of g95_expr->value.constructor.
4348
4349 2002-12-08 Paul Brook <paul@nowt.org>
4350
4351 * trans-array.c (g95_put_offset_into_var): New function.
4352 (g95_trans_array_constructor_subarray): New function.
4353 (g95_trans_array_constructor_value): Use it.
4354 (g95_array_cons_size): Don't abort() on array components.
4355
4356 2002-12-08 Paul Brook <paul@nowt.org>
4357
4358 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
4359 * support.c: Update #includes.
4360 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
4361 * trans-array.c: Update #includes.
4362 * trans.c: Ditto.
4363 * trans-const.c: Ditto.
4364 * trans-io.c: Ditto.
4365 * trans-types.c: Ditto.
4366 (g95_init_types): Set size_type_node.
4367 * trans-decl.c: Update #includes.
4368 (gfor_fndecl_adjust{l,r}): Declare and initialize.
4369 * trans-stmt.c: Update #includes.
4370 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
4371 (g95_trans_select): Fix check for unbounded ranges.
4372 * trans-expr.c: Update #includes.
4373 (g95_conv_string_tmp): New function.
4374 (g95_conv_concat_op): Use it.
4375 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
4376 * Trans-intrisic.c: Update #includes.
4377 (g95_conv_intrinsic_strcmp): New function.
4378 (g95_conv_intrinsic_adjust): Ditto.
4379 (g95_conv_intrinsic_function: Use them.
4380
4381 2002-11-30 Paul Brook <paul@nowt.org>
4382
4383 * trans-array.c (g95_walk_function_expr): Handle non-array return by
4384 reference.
4385 * trans-dec.c (g95_build_function_decl): Handle character return
4386 parammeters.
4387 (g95_get_fake_result_decl): Ditto.
4388 (g95_trans_deferred_vars): Ditto.
4389 * trans-expr.c (g95_conv_function_call): Ditto.
4390 (g95_trans_arrayfunc_assign) Limit to array valued functions.
4391 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
4392 (g95_conv_intrinsic_function): Use it.
4393 * trans-types.c (g95_sym_type): Handle functions returning strings.
4394 (g95_return_by_reference): Ditto.
4395 (g95_get_function_type): Ditto.
4396
4397 2002-11-18 Paul Brook <paul@nowt.org>
4398
4399 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
4400 requires a temporary.
4401 (g95_trans_select): Handle computed gotos.
4402 * trans-types.c (g95_build_array_type): Warn about non-functional
4403 assumed shape arrays.
4404 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
4405 blocks.
4406 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
4407 (g95_conv_intrinsic_int): New function.
4408 (g95_conv_intrinsic_mod): New function.
4409 (g95_conv_intrinsic_ichar): New function.
4410 (g95_conv_intrinsic_function): Use them.
4411 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
4412
4413 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
4414
4415 * trans-types.c (g95_build_array_type): Assumed
4416 sized arrays can have rank > 1.
4417 * trans.c (g95_trans_code): Remove erroneous
4418 warning about CONTINUE.
4419 * trans-expr.c (g95_conv_variable): Remove
4420 erroneous assert.
4421
4422 2002-11-15 Paul Brook <paul@nowt.org>
4423
4424 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
4425
4426 2002-10-31 Paul Brook <paul@nowt.org>
4427
4428 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
4429 * trans-expr.c (g95_conv_component_ref): Handle character string
4430 components.
4431 (g95_conv_string_parameter): Ditto.
4432 * trans-types.c (g95_get_derived_type): Add length decl to caracter
4433 string components.
4434
4435 2002-10-10 Paul Brook <paul@nowt.org>
4436
4437 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
4438 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
4439 check.
4440 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
4441 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
4442 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
4443 * trans-types.c (pvoid_type_node): Declare and initialize.
4444 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
4445 (g95_array_allocate): Fix when base==data.
4446 (g95_conv_array_parameter): Correctly handle reduced rank sections.
4447 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
4448
4449 2002-10-09 Paul Brook <paul@nowt.org>
4450
4451 * (g95_conv_expr_reference): Handle character strings correctly.
4452
4453 2002-10-07 Paul Brook <paul@nowt.org>
4454
4455 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
4456 langhook.
4457 * trans-array.c (g95_build_array_initializer): Remove.
4458 (g95_conv_array_initializer): New Function.
4459 (g95_trans_auto_arry_allocation): Cleanup.
4460 (g95_trans_init_character_array): Remove.
4461 * g95spec.c: Link in libgforbegin.
4462 * trans.c (g95_generate_code): Rename main function to MAIN__.
4463 (g95_create_var): New function.
4464 (g95_create_var_np): New function.
4465 (g95_evaluate_now): New function.
4466 (g95_start_block): New function.
4467 (g95_finish_block): New function.
4468 (g95_add_expr_to_block): New function.
4469 (g95_add_block_to_block): New function.
4470 * trans-expr.c (g95_conv_componen_ref): New function.
4471 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
4472 (F95_OBJS): Add dependency.o.
4473 * f95-lang.c (g95_is_simple_stmt): Remove.
4474 * f95-tree.c (mark_not_simple): New function.
4475 (unshare_all_trees): New function.
4476 (create_tmp_var, create_tmp_alias_var): Remove.
4477 * support.c (declare_tmp_vars, tree_last_decl): Remove.
4478 * trans*: Convert to new IR using GENERIC trees. Don't bother about
4479 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
4480
4481 2002-10-01 Paul Brook <paul@nowt.org>
4482
4483 * trans-array.c: Add support for descriptorless arrays.
4484 (g95_conv_array_data): New function.
4485 (g95_conv_array_base): New function.
4486 * trans-array.h: Declare these here.
4487 * trans-decl.c(g95_create_mopdule_variable): Perform variable
4488 initialization and creation here.
4489 (g95_create_module_vars): Instead of here.
4490 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
4491 * trans-intrinsic.c: Ditto.
4492 * trans-types.c (g95_is_nodesc_array): New function.
4493 (g95_get_nodesc_array_type): New function.
4494 (g95_sym_type, g95_get_derived_type): Use them.
4495 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
4496
4497 2002-09-28 Paul Brook <paul@nowt.org>
4498
4499 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
4500 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
4501 parameters.
4502
4503 2002-09-24 Paul Brook <paul@nowt.org>
4504
4505 * f95-lang.c (listify): Remove declaration.
4506 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
4507 (listify)
4508 * f95-tree.c (get_name): New function.
4509 * trans.c (module_namespace): Remove.
4510 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
4511 * trans-types.c: Ditto.
4512
4513 2002-09-19 Paul Brook <paul@nowt.org>
4514
4515 * trans-array.c (g95_get_array_cons_size): New Function.
4516 (g95_con_ss_startstride): Handle Array constructors.
4517 (g95_conv_loop_setup): Ditto.
4518 (g95_conv_array_parameter): Ditto.
4519 * tras-decl.c (g95_finish_var_decl): Make initializes variables
4520 static.
4521
4522 2002-09-19 Paul Brook <paul@nowt.org>
4523
4524 * trans.c (g95_simple_fold_tmp): Detect variables inside
4525 NON_LVALUE_EXPR.
4526 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
4527
4528 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
4529
4530 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
4531
4532 2002-09-14 Paul Brook <paul@nowt.org>
4533
4534 * trans.c (g95_create_module_variable): Move to trans-decl.c.
4535 * trans-const.c (g95_conv_string_init): New Function.
4536 * trans-const.h: Declare it.
4537 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
4538 variables. Don't bail on intrinsic symbols.
4539 (get_extern_function_decl): Handle specific intrinsic functions.
4540 * trans-types.c (g95_sym_type): Dummy functions don't return
4541 reference types.
4542 * trans-array.c (g95_build_array_initializer): New Function.
4543 (g95_trans_auto_array_allocation): Build initializer for static decls.
4544 Don't use mpz_addmul, it's GMP4 only.
4545
4546 2002-09-12 Paul Brook <paul@nowt.org>
4547
4548 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
4549 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
4550 assembler names for module procedures.
4551
4552 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
4553
4554 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
4555 dependency/
4556
4557 2002-09-10 Paul Brook <paul@nowt.org>
4558
4559 * trans-array.c: Change format of G95_SS_TEMP strictures.
4560 (g95_check_fncall_dependancy): New function.
4561 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
4562 offsets.
4563 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
4564 result variables.
4565 (g95_build_function_decl): Don't assume result arrays are packed.
4566 (g95_trans-deferred-vars): Handle array result variables.
4567 (g95_generate_fuction_code): Clear saved_function_decls.
4568 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
4569 reference.
4570 (g95_trans_arrayfunc_assign): New function.
4571 (g95_trans_assignment): Use it.
4572 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
4573 (g95_se): Add direct_byref.
4574 * trans-types.c: Use sym->result rather than sym where appropriate.
4575 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
4576 Update other functions to use this.
4577 (g95_is_intrinsic_libcall): New function.
4578 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
4579 (g95_walk_intrinsic_function): Ditto.
4580
4581 2002-09-08 Paul Brook <paul@nowt.org>
4582
4583 * trans-types.c: Change rank field to dtype field in array descriptor.
4584 * trans-array.c: Implement filling of dtype array descriptor field.
4585 * trans-intrinsic.c: Fix broken LEN intrinsic.
4586
4587 2002-09-07 Paul Brook <paul@nowt.org>
4588
4589 * trans-intrinsic.c: Remove outdated todo intrinsic list.
4590 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
4591 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
4592
4593 2002-09-06 Paul Brook <paul@nowt.org>
4594
4595 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
4596 (gt-f95-trans-types.h): Add dependancy information.
4597 * config-lang.in (gtfiles): Add trans-types.c
4598 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
4599 back to top-level code.
4600 * trans-array.c, trans-types.c: Change format of array descriptor.
4601 (g95_conv_descriptor_dimension): New function.
4602 * trans-types.h (g95_conv_descriptor_rank): define.
4603 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
4604 intrinsics.
4605
4606 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4607
4608 * trans-array.c, trans-types.c: Add rank information to descriptor.
4609
4610 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
4611
4612 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
4613
4614 2002-09-04 Paul Brook <paul@nowt.org>
4615
4616 * f95-lang.c (g95_create_decls): New function.
4617 (g95_init): Move initialization of external decls to above, and call
4618 from g95_be_parse_file.
4619 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
4620 * trans-types.c (g95_init_types): Always name integer and char types.
4621 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
4622
4623 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
4624
4625 * Make-lang.in: Add options.c to F95_PARSER_OBJS
4626
4627 2002-09-02 Paul Brook <paul@nowt.org>
4628
4629 * g95_generate_code: Clear the attr for __fortran_main.
4630 * trans-types.c (g95_finish_type): New function.
4631 * g95_init_io_state_type: Use g95_finish_type.
4632 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
4633
4634 2002-09-01 Paul Brook <paul@nowt.org>
4635
4636 * README.backend: Warn about the dangers of extra config.h files.
4637 Remove obsolete libgfor stuff.
4638 * config-lang.in: Add target-libgfor dependancy.
4639 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
4640
4641 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
4642
4643 * g95_conv_mpz_to_tree: Free storage pointed to by q,
4644 not by buff.
4645
4646 2002-08-30 Paul Brook <paul@nowt.org>
4647
4648 * trans-intrinsic.c (g95_conv_intrinsic_function,
4649 g95_walk_intrinsic_function): Added ANY and ALL.
4650 (g95_conv_intrinsic_anyall): New function.
4651 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in
4652 mangled name