1 2004-05-22 Steven G. Kargl <kargls@comcast.net>
3 * invoke.texi: Document -Wunderflow and spell check.
4 * lang.opt: Add Wunderflow.
5 * gfortran.h (gfc_option_t): Add warn_underflow option.
6 * options.c (gfc_init_options, set_Wall): Use it.
7 * primary.c (match_real_constant): Explicitly handle UNDERFLOW.
8 * arith.c (gfc_arith_uminus, gfc_arith_plus, gfc_arith_minus,
9 gfc_arith_times, gfc_arith_divide, gfc_arith_power, gfc_real2real,
10 gfc_real2complex, gfc_complex2real, gfc_complex2complex): Ditto.
11 * arith.c (common_logarithm): Fix typo in comment.
13 2004-05-21 Roger Sayle <roger@eyesopen.com>
15 * io.c (check_format): As a GNU extension, allow the comma after a
16 string literal to be optional in a format. Use gfc_notify_std to
17 issue an error/warning as appropriate.
19 2004-05-21 Roger Sayle <roger@eyesopen.com>
21 * io.c (check_format): Use gfc_notify_std to determine whether to
22 issue an error/warning for omitting the digits from the X format.
24 2004-05-20 Roger Sayle <roger@eyesopen.com>
26 * io.c (check_format): Allow the number before the X format to
27 be optional when not -pedantic.
29 2004-05-18 Feng Wang <fengwang@nudt.edu.cn>
30 Paul Brook <paul@codesourcery.com>
32 * f95-lang.c (gfc_init_builtin_functions): Use vold_list_node.
33 Create decls for __builtin_pow{,f}.
34 * gfortran.h (PREFIX_LEN): Define.
35 * trans-decl.c (gfor_fndecl_math_powi): Add.
36 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
37 (gfc_build_intrinsic_function_decls): Create decls for powi.
38 * trans-expr.c (powi_table): Add.
39 (gfc_conv_integer_power): Remove.
40 (gfc_conv_powi): New function.
41 (gfc_conv_cst_int_power): New function.
42 (gfc_conv_power_op): Use new powi routines.
43 * trans.h (struct gfc_powdecl_list): Add.
44 (gfor_fndecl_math_powi): Add.
45 (gfor_fndecl_math_powf, gfor_fndecl_math_pow): Remove.
47 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
49 * trans.c, trans-decl.c: Fix comment typos.
51 2004-05-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
53 * trans-const.c (gfc_conv_mpf_to_tree): Fix typo.
55 2004-05-18 Steve Kargl <kargls@comcast.net>
57 * arith.c (gfc_int2complex): Fix incorrect range checking.
59 2004-05-18 Paul Brook <paul@codesourcery.com>
62 * decl.c (add_init_expr_to_sym): Remove incorrect check.
63 (default_initializer): Move to expr.c.
64 (variable_decl): Don't assign default initializer to variables.
65 * expr.c (gfc_default_initializer): Move to here.
66 * gfortran.h (gfc_default_initializer): Add prototype.
67 * resolve.c (resolve_symbol): Check for illegal initializers.
68 Assign default initializer.
70 2004-05-17 Steve Kargl <kargls@comcast.net>
72 * arith.c (gfc_arith_power): Complex number raised to 0 power is 1.
74 2004-05-17 Steve Kargl <kargls@comcast.net>
76 * arith.c (gfc_real2complex): Range checking wrong part of complex
79 2004-05-16 Paul Brook <paul@codesourcery.com>
81 * options.c (gfc_handle_module_path_options): Fix buffer overrun.
83 2004-05-16 Paul Brook <paul@codesourcery.com>
85 * arith.c (gfc_range_check): Fix logic error.
87 2004-05-16 Steve Kargl <sgk@troutmask.apl.washington.edu>
89 * arith.c: Fix comment typos.
91 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
94 * decl.c (add_init_expr_to_sym): Verify that COMMON variable is
95 not initialized in a disallowed fashion.
96 * match.c (gfc_match_common): Likewise.
97 (var_element): Verify that variable is not in the blank COMMON,
100 2004-05-15 Joseph S. Myers <jsm@polyomino.org.uk>
102 * Make-lang.in (f95.generated-manpages): Remove.
104 (f95.info, fortran/gfortran.info, fortran/gfortran.dvi,
105 f95.maintainer-clean): Generate info and dvi files in objdir/doc.
108 (f95.install-info): Remove.
111 2004-05-15 Victor Leikehman <lei@haifasphere.co.il>
113 * decl.c (add_init_expr_to_sym): Check for variable size arrays.
115 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
117 * primary.c (match_boz_constant): Use gfc_notify_std() for
118 issuing a warning or an error.
120 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
123 * primary.c (match_structure_constructor): Rename ...
124 (gfc_match_structure_constructor): ... to this. Make non-static.
125 (gfc_match_rvalue): Call renamed function.
126 * match.h (gfc_match_structure_constructor): Declare.
127 * match.c (gfc_match_data_constant): Handle structure
130 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
134 * gfortran.h (gfc_linebuf): New typedef.
136 (gfc_file): Revamped, use new gfc_linebuf.
137 (locus): Revamped, use new types.
138 (gfc_current_file): Remove.
139 (gfc_current_form, gfc_source_file): New global variables.
140 * match.c (gfc_match_space, gfc_match_strings): Use
141 gfc_current_form to find source form.
142 * module.c (gfc_dump_module): Use gfc_source_file when printing
144 * error.c (show_locus, show_loci) Use new data structures to print
146 * scanner.c (first_file, first_duplicated_file, gfc_current_file):
148 (file_head, current_file, gfc_current_form, line_head, line_tail,
149 gfc_current_locus1, gfc_source_file): New global variables.
150 (gfc_scanner_init1): Set new global variables.
151 (gfc_scanner_done1): Free new data structures.
152 (gfc_current_locus): Return pointer to gfc_current_locus1.
153 (gfc_set_locus): Set gfc_current_locus1.
154 (gfc_at_eof): Set new variables.
155 (gfc_at_bol, gfc_at_eol, gfc_advance_line, gfc_next_char): Adapt
156 to new locus structure.
157 (gfc_check_include): Remove.
158 (skip_free_comments, skip_fixed_comments): Use gfc_current_locus1.
159 (gfc_skip_comments): Use gfc_current_form, find locus with
161 (gfc_next_char): Use gfc_current_form.
162 (gfc_peek_char, gfc_gobble_whitespace): Use gfc_current_locus1.
163 (load_line): Use gfc_current_form. Recognize ^Z as EOF. Fix
165 (get_file): New function.
166 (preprocessor_line, include_line): New functions.
167 (load_file): Move down, rewrite to match new data structures.
168 (gfc_new_file): Rewrite to match new data structures.
169 * parse.c (next_statement): Remove code which is now useless. Use
170 gfc_source_form and gfc_source_file where appropriate.
171 * trans-decl.c (gfc_get_label_decl): adapt to new data structures
172 when determining locus of frontend code.
173 * trans-io.c (set_error_locus): Same.
174 * trans.c (gfc_get_backend_locus, gfc_set_backend_locus): Likewise.
175 * lang-specs.h (@f77-cpp-input, @f95-cpp-input): Remove '-P' from
177 (all): Add missing initializers.
179 2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
181 * Make-lang.in (trans-common.o): Remove redundant dependency.
182 (data.c): Replace object file name ...
183 (data.o): ... by the correct one.
185 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
187 * dump-parse-tree.c (gfc_show_array_ref): Print colon only
188 for ranges when dumping array references.
190 2004-05-14 Victor Leikehman <lei@haifasphere.co.il>
192 * decl.c (variable_decl): Always apply default initializer.
194 2004-05-08 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
197 * trans-intrinsic.c (gfc_conv_intrinsic_rrspacing): Fixed to
198 handle zero correctly.
200 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
202 * match.c (gfc_match): Eliminate dead code.
204 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
206 * parse.c (gfc_statement_next_fixed): (Change from Andy's tree)
207 Detect bad continuation line in fixed form sources.
209 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
212 * iresolve.c (gfc_resolve_nearest): Add new function.
213 * intrinsic.h: ... declare it here.
214 * intrinsic.c (add_functions): ... add it as resolving function
217 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
220 * match.c (gfc_match_do): Allow infinite loops with
221 label-do-stmt. Do not enforce space after comma.
223 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
226 * parse.c (parse_interface): Allow empty INTERFACE, remove
229 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
231 * Make-lang.in, arith.c, arith.h, array.c, bbt.c, check.c,
232 decl.c, dependency.c, dependency.h, dump-parse-tree.c, error.c,
233 expr.c, f95-lang.c, gfortran.h, interface.c, intrinsic.c,
234 intrinsic.h, io.c, iresolve.c, lang-specs.h, match.c, match.h,
235 matchexp.c, misc.c, module.c, options.c, parse.c, parse.h,
236 primary.c, resolve.c, scanner.c, simplify.c, st.c, symbol.c,
237 trans-array.c, trans-array.h, trans-common.c, trans-const.c,
238 trans-const.h, trans-decl.c, trans-expr.c, trans-intrinsic.c,
239 trans-io.c, trans-stmt.c, trans-stmt.h, trans-types.c,
240 trans-types.h, trans.c, trans.h: Update copyright years and
242 * data.c: Likewise, also removed two whitespace-only lines.
243 * gfortranspec.c, lang.opt: Update copyright years.
245 2004-05-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
248 * trans-decl.c (generate_local_decl): Don't warn for unused
249 variables which are in common blocks.
251 2004-05-13 Diego Novillo <dnovillo@redhat.com>
253 * Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
254 trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
255 trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].
257 2004-05-13 Victor Leikehman <lei@haifasphere.co.il>
260 * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
262 2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
264 * gfortran.texi: Use @table @emph instead of @itemize @emph.
265 Remove "set DEVELOPMENT".
266 (Compiling GFORTRAN): Remove.
268 2004-05-09 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
270 * array.c (match_subscript, match_array_ref): Add comments
271 explaining argument 'init'.
272 * decl.c, f95-lang.c, match.c, resolve.c, trans-array.c,
273 trans-expr.c, trans.c: Fix some typos in comments.
274 * dump-parse-tree.c (gfc_show_expr): Remove wrong comment.
275 * primary.c (match_digits, match_integer_constant): Add comment
278 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
281 * primary.c: Include system.h and flags.h, needed for pedantic.
282 (match_boz_constant): Allow "x" for hexadecimal constants, warn if
285 2004-05-01 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
288 * match.c (match_data_constant): Handle case where
289 gfc_find_symbol sets sym to NULL
291 2004-04-28 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
293 * Make-lang.in (f95-lang.o, trans-intrinsic.o): Add missing
294 dependency on mathbuiltins.def
296 2004-04-24 Victor Leikehman <lei@il.ibm.com>
298 * trans-io.c (transfer_expr): Implemented recursive printing
301 2004-04-24 Andrew Pinski <pinskia@physics.uc.edu>
303 * gfortranspec.c: Do not include multilib.h.
305 2004-04-24 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
307 * trans-intrinsic.c: Fix comment, this is not trans-expr.c. Add
308 2004 to copyright years.
309 * trans-expr.c, trans-decl.c: Comment update, we now generate
310 GENERIC, not SIMPLE. Add 2004 to copyright years.
312 2004-04-24 Paul Brook <paul@codesourcery.com>
314 * Make-lang.in (gfortranspec.o): Add dependency on $(TM_H).
316 2004-04-24 Feng Wang <fengwang@nudt.edu.cn>
319 * arith.c (gfc_arith_divide): Fix complex divide.
321 2004-04-23 Andrew Pinski <pinskia@physics.uc.edu>
323 * gfortranspec.c: Include the target headers.
325 2004-04-18 Feng Wang <fengwang@nudt.edu.cn>
329 * arith.c (arctangent2): New function.
330 * arith.h (arctangent2): Add function prototype.
331 * simplify.c (gfc_simplify_atan2): Use it.
332 (gfc_simplify_log): Use it.
334 2004-04-12 Diego Novillo <dnovillo@redhat.com>
336 * fortran/f95-lang.c (gfc_expand_stmt): Remove.
337 (LANG_HOOKS_RTL_EXPAND_STMT): Remove.
339 2004-04-11 Bud Davis <bdavis9659@comcast.net>
342 * trans-io.c (build_dt): Change REC to value.
344 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
347 * trans-const.c (gfc_conv_mpf_to_tree): Loosen the maximum digits of
348 the real value when converting mpf to string.
350 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
353 * trans-intrinsic.c (gfc_conv_intrinsic_cmplx): Fix the imag part of
356 2004-04-11 Feng Wang <fengwang@nudt.edu.cn>
359 * simplify.c (simplify_min_max): Convert the type of the result.
361 2004-04-11 Paul Brook <paul@codesourcery.com>
363 * gfortran.texi: Use full target triplet.
365 2004-04-11 Paul Brook <paul@codesourcery.com>
367 * Make-lang.in (GFORTRAN_TEXI): Set it.
368 (fortran/dfortran.dvi): Use it. Add fortran to include paths.
369 (fortran/gfortran.info): Ditto.
370 * gfortran.texi: Major update.
371 * invoke.texi: New file.
373 2004-04-10 Paul Brook <paul@codesourcery.com>
375 * trans-array.c (gfc_trans_allocate_temp_array,
376 gfc_conv_tmp_array_ref): Don't use GFC_DECL_STRING.
377 * trans-decl.c (gfc_build_dummy_array_decl,
378 gfc_get_symbol_decl, gfc_build_function_decl,
379 gfc_create_module_variable): Ditto.
380 * trans-expr.c (gfc_conv_variable): Ditto.
381 * trans-intrinsic.c (gfc_conv_intrinsic_len): Ditto.
382 * trans.h (GFC_DECL_STRING): Remove.
383 (GFC_DECL_PACKED_ARRAY, GFC_DECL_PARTIAL_PACKED_ARRAY,
384 GFC_DECL_ASSIGN): Renumber flags.
386 2004-04-05 Paul Brook <paul@codesourcery.com>
390 * f95-lang.c (gfc_init_builtin_functions): Add stack_alloc, stack_save
392 * gfortran.h (struct gfc_charlen): Add backend_decl.
393 * trans-array.c (gfc_trans_allocate_temp_array,
394 gfc_conv_temp_array_ref, gfc_conv_resolve_dependencies,
395 (gfc_conv_loop_setup, gfc_array_allocate, gfc_conv_array_init_size):
396 Remove old, broken string handling.
397 (gfc_trans_auto_array_allocation, gfc_trans_g77_array,
398 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
399 gfc_trans_deferred_array): Handle character arrays.
400 * trans-const.c (gfc_conv_const_charlen): New function.
401 * trans-const.h (gfc_conv_const_charlen): Add prototype.
402 * trans-decl.c (gfc_finish_var_decl): Don't mark automatic variables
404 (gfc_build_dummy_array_decl): Handle arrays with unknown element size.
405 (gfc_create_string_length): New function.
406 (gfc_get_symbol_decl): Create lengths for character variables.
407 (gfc_get_fake_result_decl): Ditto.
408 (gfc_build_function_decl): Only set length for assumed length
410 (gfc_trans_dummy_character): New function.
411 (gfc_trans_auto_character_variable): Rewrite.
412 (gfc_trans_deferred_vars): Handle more types of character variable.
413 (gfc_create_module_variable): String lengths have moved.
414 (gfc_generate_function_code): Initialize deferred var chain earlier.
415 * trans-expr.c (gfc_conv_init_string_length): Rename ...
416 (gfc_trans_init_string_length): ... to this.
417 (gfc_conv_component_ref, gfc_conv_variable, gfc_conv_concat_op,
418 gfc_conv_function_call): Update to new format for character variables.
419 (gfc_conv_string_length): Remove.
420 (gfc_conv_string_parameter): Update assertion.
421 * trans-intrinsic.c (gfc_conv_intrinsic_len): Use new location.
422 * trans-io.c (set_string): Use new macro names.
423 * trans-stmt.c (gfc_trans_label_assign. gfc_trans_goto): Ditto.
424 * trans-types.c (gfc_get_character_type): Use existing length expr.
425 (gfc_is_nodesc_array): Make public.
426 (gfc_get_dtype_cst): Rename ...
427 (gfc_get_dtype): ... to this. Handle unknown size arrays.
428 (gfc_get_nodesc_array_type): Use new name.
429 (gfc_sym_type): New character variable code.
430 (gfc_get_derived_type): Ditto.
431 (gfc_get_function_type): Evaluate character variable lengths.
432 * trans-types.h (gfc_strlen_kind): Define.
433 (gfc_is_nodesc_array): Add prototype.
434 * trans.h: Update prototypes.
435 (struct lang_type): Update comments.
436 (GFC_DECL_STRING_LEN): New name for GFC_DECL_STRING_LENGTH.
437 (GFC_KNOWN_SIZE_STRING_TYPE): Remove.
439 2004-04-04 Paul Brook <paul@codesourcery.com>
441 * gfortran.h (struct gfc_option_t): Remove flag_g77_calls.
442 * options.c (gfc_init.options, gfc_handle_option): Ditto.
443 * trans-expr.c (gfc_conv_function_call): Ditto.
444 * trans-types.c (gfc_is_nodesc_array): Ditto
445 * lang.opt (fg77-calls): Remove.
447 2004-04-04 Paul Brook <paul@codesourcery.com>
449 * trans-array.c (OFFSET_FIELD): Rename from BASE_FIELD.
450 (gfc_conv_descriptor_base): Rename ...
451 (gfc_conv_descriptor_offset): ... to this.
452 (gfc_trans_allocate_array_storage): Set offset to zero.
453 (gfc_conv_array_base): Rename ...
454 (gfc_conv_array_offset): ... to this.
455 (gfc_conv_array_index_ref): Add offset parameter.
456 (gfc_conv_array_ref): Include offset.
457 (gfc_trans_preloop_setup): Use existing offset.
458 (gfc_trans_allocate_temp_array, gfc_array_allocate,
459 gfc_trans_auto_array_allocation, gfc_trans_g77_array,
460 gfc_trans_dummy_array_bias, gfc_conv_expr_descriptor,
461 gfc_conf_ss_descriptor): Set offset.
462 * trans-array.h: Rename prototypes.
463 * trans-const.h (gfc_index_zero_node): Define.
464 * trans-decl.c (gfc_build_qualified_array): Change base to offset.
465 * trans-types.c (gfc_get_array_type_bounds): Ditto.
466 (gfc_get_nodesc_array_type): Calculate offset before upper bound.
468 2004-03-25 Diego Novillo <dnovillo@redhat.com>
470 * convert.c (convert): Don't handle WITH_RECORD_EXPR.
472 2004-03-24 Bud Davis <bdavis9659@comcast.net>
475 * arith.c (gfc_convert_integer,gfc_convert_real): Removed leading '+'
476 before conversion by gmp library call.
478 2004-03-24 Bud Davis <bdavis9659@comcast.net>
481 * trans-io.c (gfc_trans_open): Change RECL= to a value parameter.
483 2004-02-24 Richard Henderson <rth@redhat.com>
485 * trans-array.c (gfc_trans_dummy_array_bias): Fix typo.
487 2004-02-19 Loren J. Rittle <ljrittle@acm.org>
489 * Make-lang.in ($(srcdir)/fortran/gfortran.info): Move...
490 (fortran/gfortran.info): ... to here.
493 2004-02-16 Richard Henderson <rth@redhat.com>
495 * Make-lang.in (f95-lang.o, trans-decl.o): Depend on cgraph.h.
496 * f95-lang.c (LANG_HOOKS_EXPAND_DECL): Remove.
497 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): New.
498 (gfc_expand_function): Rename from expand_function_body, make static,
499 don't do anything except invoke tree_rest_of_compilation.
500 (gfc_be_parse_file): Invoke cgraph.
501 (gfc_expand_decl): Remove.
502 (gfc_init_builtin_functions): Add __builtin_init_trampoline and
503 __builtin_adjust_trampoline.
504 * trans-decl.c (gfc_get_extern_function_decl): Don't set DECL_CONTEXT.
506 (gfc_generate_function_code): Use it. Lower nested functions.
507 * trans-expr.c (gfc_conv_function_call): Add static chain operand
509 * trans.c (gfc_build_function_call): Likewise.
510 * trans.h (expand_function_body): Remove.
512 2004-02-15 Victor Leikehman <lei@il.ibm.com>
515 * trans-decl.c (gfc_build_function_decl) For functions
516 returning CHARACTER pass an extra length argument,
517 following g77 calling conventions.
518 * trans-types.c (gfc_get_function_type) Ditto.
519 * trans-expr.c (gfc_conv_function_call) Ditto.
521 2004-02-14 Paul Brook <paul@codesourcery.com>
523 * f95-lang.c (gfc_init_builtin_functions): Build chain properly.
525 2004-02-12 Paul Brook <paul@nowt.org>
529 2004-02-08 Steve Kargl <sgk@troutmask.apl.washington.edu>
531 * gfortran.texi: Fix typos.
533 2004-02-07 Bud Davis <bdavis9659@comcast.net>
536 * intrinsic.c (add_conversions) Use logical conversion instead
538 * trans-types.c (gfc_get_logical_type) implemented logical*1
541 2004-01-17 Paul Brook <paul@codesourcery.com>
543 * lang-specs.h: Remove %<fixed-form.
545 2004-01-15 Toon Moene <toon@moene.indiv.nluug.nl>
547 * lang-specs.h: Enable preprocessing of source files
548 ending in .F, .fpp, .FPP, .F90 and .F95.
550 2004-01-13 Toon Moene <toon@moene.indiv.nluug.nl>
553 * lang-specs.h: Enable compilation of files ending
554 in .f, .for and .FOR.
556 2004-01-11 Paul Brook <paul@codesourcery.com>
558 * trans-stmt.c (gfc_trans_if_1): New function.
559 (gfc_trans_if): Use it.
561 2004-01-11 Erik Schnetter <schnetter@uni-tuebingen.de>
563 * gfortran.h (GFC_MAX_SYMBOL_LEN): Increase.
564 (gfc_option_t): Add max_identifier_length.
565 * lang.opt: Add fmax-identifier-length.
566 * match.c (parse_name): Use limit.
567 * options.c (gfc_init_options): Set max_identifier_length.
568 (gfc_handle_option): Ditto.
570 2004-01-11 Feng Wang <fengwang@nudt.edu.cn>
572 * intrinsic.c (add_functions): Add resolve function to dcmplx.
573 * intrinsic.h (gfc_resolve_dcmplx): Add prototype.
574 * iresolve.c (gfc_resolve_dcmplx): New function.
576 2004-01-10 Paul Brook <paul@codesourcery.com>
578 * trans-decl.c (gfc_get_symbol_decl): Don't set subroutine attr.
579 * trans-types.c (gfc_sym_type): Handle external dummy procedures.
580 (gfc_return_by_reference): Correct condition.
581 (gfc_get_function_type): Ditto.
583 2004-01-10 Paul Brook <paul@codesourcery.com>
585 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert mismatched
588 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
590 * iresolve.c: Use correct kind.
592 2004-01-10 Huang Chun <chunhuang73@hotmail.com>
595 * trans-decl.c (gfc_create_module_variable): Output array valued
598 2004-01-10 Paul Brook <paul@codesourcery.com>
600 * resolve.c (resolve_branch): Get error message right way round.
602 2004-01-10 Canqun Yang <canqun@nudt.edu.cn>
604 * trans-array (gfc_conv_loop_setup): Adjust comment to track
606 (gfc_array_allocate): Don't count size of element twice.
608 2004-01-04 Paul Brook <paul@codesourcery.com>
610 * lang.opt (i8, r8, std=*): Remove RejectNegative.
612 2004-01-04 Paul Brook <paul@codesourcery.com>
614 * error.c (gfc_notify_std): New function.
615 * gfortran.h (gfc_notify_std): Declare.
617 (gfc_option_t): Add warn_std and allow_std.
618 * intrinsic.c (gfc_init_expr_extensions): Fix logic.
619 (gfc_intrinsic_func_interface): Use gfc_notify_std.
620 * check.c (check_rest): Use gfc_notify_std.
621 * match.c (gfc_match_pause): Ditto.
622 (gfc_match_assign): Ditto.
623 (gfc_match_goto): Ditto.
624 * resolve.c (resolve_branch): Ditto.
625 * lang.opt: Add std=<foo> and w.
626 * options.c (gfc_init_options): Set allow_std and warn_std.
627 (gfc_handle_option): Handle OPT_std_* and OPT_w.
629 2004-01-01 Paul Brook <paul@codesourcery.com>
631 * array.c (gfc_append_constructor): Take constructor, not expression.
632 * data.c (struct gfc_expr_stack): Remove.
633 (expr_stack): Remove.
634 (find_con_by_offset): Rename from find_expr_in_con.
635 (find_con_by_component): Rename from find_component_in_con.
636 (gfc_get_expr_stack): Remove.
637 (gfc_assign_data_value): Rewrite.
638 (gfc_expr_push): Remove.
639 (gfc_expr_pop): Remove.
640 (gfc_advance_section): Rename from
641 gfc_modify_index_and_calculate_offset. Handle unbounded sections.
642 (gfc_get_section_index): Handle unbounded sections.
643 * gfortran.h: Update prototypes.
644 * resolve.c (check_data_variable): Array section maight not be the
647 2004-01-01 Paul Brook <paul@codesourcery.com>
650 * resolve.c (resolve_symbol): Allow assumed length function results.
652 2004-01-01 Steve Kargl <sgk@troutmask.apl.washington.edu>
654 * match.c (gfc_match_pause): Fix spelling.
656 2004-01-01 Steven Bosscher <stevenb@suse.de>
659 * trans-expr.c (gfc_conv_variable): Take the type kind of a substring
660 reference from the expression.
662 2003-12-26 Feng Wang <fengwang@nudt.edu.cn>
664 * dump-parse-tree.c (gfc_show_code_node): Add ASSIGN and ASSIGNED GOTO
666 * gfortran.h (gfc_statement): New ST_LABEL_ASSIGNMENT.
667 (gfc_exec_op): New EXEC_LABEL_ASSIGN.
668 (symbol_attribute):New variable attribute: assign.
669 * io.c (resolve_tag):Integer variable is allowed.
670 (match_dt_format): Add ASSIGN statement. Set assign flag.
671 * match.c (gfc_match_if): Change ST_NONE to ST_LABEL_ASSIGNMENT.
672 (gfc_match_assign): Add ASSIGN statement. Set assign flag.
673 (gfc_match_goto): Add ASSIGNED GOTO statement. Set assign flag.
674 * parse.c (decode_statement): Add ST_LABEL_ASSIGNMENT.
675 (next_statement): Add ST_LABEL_ASSIGNMENT.
676 (gfc_ascii_statement): Add ST_LABEL_ASSIGNMENT.
677 * resolve.c (resolve_code): Resolve ASSIGN and ASSIGNED GOTO statement.
678 (resolve_blocks): Resolve ASSIGNED GOTO statement label list.
679 * st.c (gfc_free_statement): Add EXEC_LABEL_ASSIGN.
680 * trans-decl.c (gfc_get_symbol_decl): Create the shadow variable for
681 assign. Put them into the stuct lang_decl.
682 * trans-io.c (set_string): Add the assign statement.
683 * trans-stmt.c (gfc_trans_label_assign): New function.
684 (gfc_trans_goto): Translate ASSIGNED GOTO statement.
685 * trans-stmt.h (gfc_trans_label_assign): Added function prototype.
686 * trans.c (gfc_trans_code): Add EXEC_LABEL_ASSIGN.
687 * trans.h (lang_decl):Add shadow variable decl tree needed by assign.
688 (GFC_DECL_ASSIGN_ADDR(node)): New macro to access this.
689 (GFC_DECL_ASSIGN(node)): New macro to access flag.
691 2003-12-31 Huang Chun <chunhuang73@hotmail.com>
694 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Fixed bug in
697 2003-12-22 Toon Moene <toon@moene.indiv.nluug.nl>
699 * options.c (gfc_init_options): Set flag_argument_noalias to 2, to indicate
700 that arguments to subroutines/functions can't alias themselves, nor global
703 2003-12-20 Steven Bosscher <stevenb@suse.de>
705 * trans-expr.c (gfc_conv_expr_op): Fold the result expression.
706 * trans.c (gfc_add_modify_expr, gfc_add_expr_to_block): Likewise.
708 2003-12-12 Huang Chun <chunhuang73@hotmail.com>
710 * primary.c (match_substring): Fix substring bug for start point
711 or end point is NULL.
712 * trans-expr.c (gfc_conv_substring): Ditto
713 * trans-types.c (gfc_sym_type): Get correct type of scalar
715 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle character in
718 2003-12-10 Richard Henderson <rth@redhat.com>
720 * options.c (gfc_post_options): Don't ever use rtl inlining.
722 2003-12-05 Canqun Yang <canqun@nudt.edu.cn>
724 * trans-common.c: Re-implement COMMON blocks and EQUIVALENCE lists.
725 * trans-equivalence.c: Remove.
726 * trans-decl.c (gfc_get_symbol_decl): Update to match.
727 (gfc_generate_function_code): Ditto.
728 * trans-array.c (gfc_conv_array_parameter): Ditto.
729 * Make-lang.in (F95_OBJS): Remove fortran/trans-equivalence.o
730 (F95_ADDITIONAL_OBJS): Add stor-layout.o
731 * trans.h (gfc_trans_equivalence): Remove.
732 * gfortran.h (struct gfc_equiv): Add used field.
733 (struct gfc_symbol): Remove addr_base, addr_offset, equiv_ring,
736 2003-12-05 Richard Henderson <rth@redhat.com>
738 * trans.c (gfc_build_addr_expr): New.
739 (gfc_build_indirect_ref, gfc_build_array_ref): New.
740 * trans.h: Declare them.
741 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-io.c,
742 trans-stmt.c, trans.c (*): Use them.
744 * f95-lang.c (gfc_post_options): Remove dead prototype.
745 * trans-array.c (gfc_trans_deferred_vars): Remove unused variable.
746 * trans-stmt.c (gfc_evaluate_where_mask): Fix temporary_list
749 2003-12-01 Feng Wang <fengwang@nudt.edu.cn>
751 * io.c (gfc_match_format): Check for missing format label.
753 2003-11-30 Huang Chun <chunhuang73@hotmail.com>
756 * trans-decl.c (gfc_sym_mangled_function_id): Don't mangle symbols
757 from interfaces in modules.
759 2003-11-30 Paul Brook <paul@nowt.org>
761 * trans-array.c (gfc_trans_g77_array): Make non-static.
762 (gfc_trans_assumed_size): Remove.
763 (gfc_trans_dummy_array_bias): Explicitly free temporary.
764 * trans-array.h (gfc_trans_g77_array): Add prototype.
765 (gfc_trans_assumed_size): Remove.
766 * trans-decls.c (gfor_fndecl_push_context): Remove.
767 (gfor_fndecl_pop_context): Remove.
768 (gfc_build_function)decls): Don't create them.
769 (gfc_trans_deferred_vars): Update to match. Remove dead code.
770 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Free temp.
772 2003-11-30 Kejia Zhao <kejia_zh@nudt.edu.cn>
774 * trans-array.c (gfc_conv_array_parameter): Simplify
775 array argument passing for array name actual argument.
776 * trans-expr.c (gfc_conv_function_call): Ditto
777 * trans-types.c (gfc_is_nodesc_array):Ditto.
779 2003-11-30 Paul Brook <paul@nowt.org>
781 * f95-lang.c (gfc_post_options): Move ...
782 * options.c (gfc_post_options): .. to here. Handle inlining options.
783 * gfortran.h (gfc_post_options): Add prototype.
785 2003-11-28 Richard Henderson <rth@redhat.com>
787 * trans.c (gfc_create_var_np): Use create_tmp_var_raw.
789 2003-11-28 Huang Chun <chunhuang73@hotmail.com>
791 * trans.h (has_alternate_specifier): New global variable.
792 * match.c (gfc_match_call): Handle actual arguments associated with
793 alternate return indicators.
794 * trans-expr.c (gfc_conv_function_call): Ditto
795 * trans-stmt.c (gfc_trans_call): Ditto
796 (gfc_trans_return): Handle return statement with value.
797 * trans-decl.c (gfc_generate_function_code): Handle functions with
799 (gfc_get_fake_result_decl): Ditto
800 * trans-types.c (gfc_get_function_type): Ditto
801 * resolve.c (resolve_actual_arglist): Check alternate return indicators.
802 (resolve_formal_arglist): Check asterisk dummy.
804 2003-11-27 Paul Brook <paul@nowt.org>
806 * trans-array.c (gfc_tran_allocate_array_storage): Use new memory
807 allocation interface.
808 (gfc_conv_ array_parameter): Ditto.
809 (gfc_trans_auto_array_allocation): Ditto. Also free the memory.
810 * trans-array.c: Update prototype.
811 * trans-decl.c (gfc_build_builtin_function_decls): Update prototypes.
812 (gfc_trans_auto_character_variable): Use new memory alloc interface.
813 * trans-expr.c (gfc_conv_string_tmp): Ditto.
814 (gfc_conv_function_call): Use gfc_conv_string_tmp.
815 * trans-stmt.c (gfc_do_allocate): Use new memory alloc interface.
816 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Ditto.
817 * trans.h (gfc_ss_info): Remove unused pdata field.
818 * trans.c (gfc_create_var_np): Change T to V.
820 2003-11-26 Richard Henderson <rth@redhat.com>
822 * mathbuiltins.def: Move acos, asin, cosh, log10, sinh, tanh from ...
823 * trans-intrinsic.c (gfc_intrinsic_map): ... here. Add SCALE,
824 FRACTION, NEAREST, SET_EXPONENT.
825 (gfc_intrinsic_map_t): Add libm_name, complex_available, is_constant.
826 Fix GTY marking. Remove unnecessary const's.
827 (LIBM_FUNCTION): Rename from I_LIB.
828 (LIBF_FUNCTION): New.
829 (gfc_get_intrinsic_lib_fndecl): Handle libm and libgfortran naming
830 conventions. Assume the expr signature is correct. Mark const.
831 (gfc_conv_intrinsic_exponent): Use library functions.
832 (gfc_conv_intrinsic_set_exponent): Remove.
833 (gfc_conv_intrinsic_scale): Remove.
834 (gfc_conv_intrinsic_nearest): Remove.
835 (gfc_conv_intrinsic_fraction): Remove.
836 (gfc_conv_intrinsic_function): Update.
837 * trans-decl.c (gfor_fndecl_math_exponent4): New.
838 (gfor_fndecl_math_exponent8): New.
839 (gfc_build_intrinsic_function_decls): Set them.
840 * trans.h: Declare them.
842 2003-11-25 Canqun Yang <canqun@nudt.edu.cn>
844 * trans-common.c (gfc_layout_global_equiv): Locate the error for
845 underflow COMMON block.
846 (gfc_trans_one_common): Fix bug for size of COMMON block containing
847 EQUIVALENCE object. Also fix typo in an error message.
849 2003-11-25 Diego Novillo <dnovillo@redhat.com>
851 * Make-lang.in: Add check-gfortran to lang_checks.
852 (check-f95): Alias for check-gfortran.
854 2003-11-25 Jason Merrill <jason@redhat.com>
856 * Make-lang.in (f95.tags): Create TAGS.sub files in each
857 directory and TAGS files that include them for each front end.
859 2003-11-24 Paul Brook <paul@nowt.org>
862 * trans-decl.c (gfc_greate_module_variable): Skip COMMON blocks.
864 2003-11-24 Paul Brook <paul@nowt.org>
866 * expr.c (simplify_const_ref): Return SUCCESS for things we don't
868 * resolve.c (gfc_resolve_expr): Resolve contents before rank/shape.
870 2003-11-24 Paul Brook <paul@nowt.org>
873 * array.c (gfc_array_ref_shape): Handle elemental dimensions.
874 * trans-array.c (gfc_trans_preloop_setup): Use correct dim lookup.
876 2003-11-20 Richard Henderson <rth@redhat.com>
878 * trans-array.c (gfc_trans_allocate_array_storage): Use convert.
879 (gfc_conv_array_base): Likewise.
880 * trans-decl.c (gfc_trans_auto_character_variable): Likewise.
881 * trans-expr.c (gfc_conv_string_tmp): Likewise.
882 * trans-intrinsic.c (gfc_conv_intrinsic_trim): Likewise.
883 * trans-stmt.c (gfc_trans_character_select): Likewise.
885 2003-11-13 Paul Brook <paul@nowt.org>
887 * trans-decl.c (gfc_sym_mangled_function_id): Dont mangle externals.
889 2003-11-13 Canqun Yang <canqun@nudt.edu.cn>
891 * resolve.c (gfc_resolve): Also resolve EQUIVALENCE objects.
892 (resolve_equivalence): New function.
893 (resolve_equivalence_derived): New function.
895 2003-11-12 Richard Henderson <rth@redhat.com>
897 * trans.c (gfc_trans_code): Use annotate_with_locus instead of
898 annotate_all_with_locus.
900 2003-11-11 Canqun Yang <canqun@nudt.edu.cn>
902 * options.c (gfc_init_options): Set flag_max_stack_var_size as 32768.
903 * trans-decl.c (gfc_finish_var_decl): Modified.
905 2003-11-08 Paul Brook <paul@nowt.org>
908 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Handle zero-size
911 2003-11-06 Paul Brook <paul@nowt.org>
913 * trans-intrinsic.c (gfc_conv_intrinsics_minmaxloc): Initialize pos.
915 2003-11-02 Canqun Yang <canqun@nudt.edu.cn>
917 * match.c (gfc_match_stopcode): Assign '0' to stop_code.
919 2003-10-27 Anthony Green <green@redhat.com>
921 * Make-lang.in (f95.stageprofile): Use tabs, not spaces.
922 (f95.stagefeedback): Ditto.
924 2003-10-27 Andrew Pinski <pinskia@physics.uc.edu>
927 * Make-lang.in (f95.stageprofile): Add.
928 (f95.stagefeedback): Add.
930 2003-10-23 Richard Henderson <rth@redhat.com>
932 * f96-lang.c (gfc_gimplify_expr): Remove.
933 (LANG_HOOKS_GIMPLIFY_EXPR): Remove.
934 (LANG_HOOKS_GIMPLE_BEFORE_INLINING): New.
936 2003-10-23 Richard Henderson <rth@redhat.com>
938 * f95-lang.c (gfc_gimplify_expr): Return gimplify_status.
940 2003-10-20 Paul Brook <paul@nowt.org>
942 * trans-expr.c (gfc_conv_integer_power): Use boolean_type_node.
943 * trans-stmt.c (gfc_trans_do_while): Ditto.
945 2003-10-17 Paul Brook <paul@nowt.org>
947 * simplify.c (gfc_simplify_shape): Use gfc_array_dimen_size.
949 2003-10-17 Paul Brook <paul@nowt.org>
951 * trans-io.c (gfc_build_io_library_fndecls): Set TREE_PUBLIC.
953 2003-10-17 Feng Wang <wf_cs@yahoo.com>
955 * iresolve.c (gfc_resolve_maxloc): Change the result's kind and type.
956 (gfc_resolve_minloc): Ditto.
957 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use correct types.
958 Return the value after subtracting the lower bound.
960 2003-10-16 Richard Henderson <rth@redhat.com>
962 * f95-lang.c (expand_function_body): Don't check flag_disable_gimple.
964 2003-10-16 Steven Bosscher <steven@gcc.gnu.org>
966 * lang.c: Remove -M option for now, it's in the way for C.
968 2003-10-14 Jason Merrill <jason@redhat.com>
970 * Make-lang.in (f95.tags): New rule.
972 2003-10-13 Richard Henderson <rth@redhat.com>
974 * trans.c (gfc_trans_code): Use annotate_all_with_locus.
976 2003-10-13 Paul Brook <paul@nowt.org>
978 * trans-decl.c (generate_local_decl): Don't create junk variables.
980 2003-10-13 Paul Brook <paul@nowt.org>
982 * resolve.c (resolve_formal_arglist): Use function result decl in
983 preference to function decl.
985 2003-10-12 Richard Henderson <rth@redhat.com>
987 * f95-lang.c (gfc_define_builtin): New const_p argument. Set
988 TREE_READONLY. Update all callers.
990 2003-10-12 Feng Wang <wf_cs@yahoo.com>
992 * iresolve.c (gfc_resolve_cshift): Change to match implementation.
993 * trans-intrinsic.c (gfc_conv_intrinsic_function): Remove CSHIFT.
994 (gfc_is_intrinsic_libcall): Add CSHIFT.
996 2003-10-12 Richard Henderson <rth@redhat.com>
998 * trans-array.c (gfc_trans_static_array_pointer): Set TREE_INVARIANT.
999 (gfc_trans_array_constructor_value): Likewise.
1000 (gfc_conv_array_initializer): Likewise.
1001 * trans-stmt.c (gfc_trans_character_select): Likewise.
1003 2003-11-12 Kejia Zhao <kejia_zh@yahoo.com.cn>
1005 * trans-intrinsic.c (integer_kind_info, real_kind_info): Remove.
1007 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1009 * check.c (gfc_check_repeat): Check arguments are scalar.
1010 (gfc_check_trim): New function.
1011 * intrinsic.h (gfc_check_trim): Add prototype.
1012 * intrinsic.c (add_functions): Use it.
1013 * trans.h (gfor_fndecl_string_trim, gfor_fndecl_string_repeat):
1015 * trans-decl.c: Ditto.
1016 (gfc_build_intrinsic_fucntion_decls): Set them.
1017 * trans-intrinsic.c (gfc_conv_intrinsic_len): Handle result vars.
1018 (gfc_conv_intrinsic_trim): New function.
1019 (gfc_conv_intrinsic_repeat): New function.
1020 (gfc_conv_intrinsic_function): Use them.
1022 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1024 * trans-types.c (gfc_sym_type): Handle result variables.
1026 2003-10-11 Huang Chun <jiwang@mail.edu.cn>
1028 * trans-intrinsic.c (gfc_conv_intrinsic_char): Don't use
1029 gfc_get_character_type.
1031 2003-10-11 Feng Wang <wf_cs@yahoo.com>
1033 * trans-expr.c (gfc_conv_variable): Check sym->ts, not the decl.
1035 2003-10-11 Paul Brook <paul@nowt.org>
1037 * iresolve.c (gfc_resolve_dint, gfc_resolve_dnint): New functions.
1038 (gfc_resolve_dprod): New function.
1039 (gfc_resolve_aint, gfc_resolve_anint): Only base name on arg type.
1040 * intrinsic.h (gfc_resolve_dint, gfc_resolve_dnint): Declare.
1041 (gfc_resolve_dprod): Declare.
1042 * intrinsic.c (add_functions): Use them.
1043 * trans-decl.c (gfc_get_extern_function_decl): Only pass one arg.
1045 2003-10-06 Richard Henderson <rth@redhat.com>
1047 * f95-lang.c (gfc_init_builtin_functions): Add clzll.
1048 * trans-intrinsic.c (call_builtin_clz): Use it.
1050 2003-10-05 Paul Brook <paul@nowt.org>
1052 * f95-lang.c (expand_function_body): Call (push|pop)_function_context.
1053 * trans-decl.c (gfc_generate_function_code): Set
1054 cfun->function_end_locus.
1056 2003-09-24 Jason Merrill <jason@redhat.com>
1058 * f95-lang.c, trans-decl.c: Use DECL_SOURCE_LOCATION instead of
1061 2003-09-21 Lifang Zeng <zlf605@hotmail.com>
1062 Paul Brook <paul@nowt.org>
1064 * Make-lang.in (F95_OBJS): Add fortran/data.o.
1065 * array.c (gfc_inser_constructor): New function.
1066 (gfc_get_constructor): New function.
1067 (gfc_free_constructor): Initialize offset and repeat.
1068 (iterator_stack): Remove.
1069 (expand_info): Add offset, component and repeat fields.
1070 (expand_constructor): Set them.
1071 (expand): Set new fields.
1072 (gfc_copy_constructor): Ditto. Avoid recursion.
1073 * gfortran.h: Add prototypes for new functions.
1074 (gfc_constructor): Add offset, component and repeat.
1075 (iteratio_stack): Move to here.
1076 * resolve.c (check_data_variable): Convert data values into variable
1078 (traverse_data_list): Build implicit loop chain.
1079 (gfc_resolve): Ditto.
1080 * trans-array.c (gfc_conv_array_intializer): Handle repeat count.
1081 * trans-decl.c (gfc_get_symbol_decl): Use gfc_conv_structure.
1082 * trans-expr.c (gfc_conv_structure): Handle array initializers.
1083 (gfc_conv_expr): Update to match.
1084 * trans.h (gfc_conv_structure): Declare.
1087 2003-09-20 Kejia Zhao <kejia_zh@yahoo.com.cn>
1089 * trans.h: Add declarations for gfor_fndecl_si_kind and
1090 gfor_fndecl_sr_kind.
1091 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1092 * trans-intrinsic.c (g95_conv_intrinsic_si_kind): New function.
1093 (g95_conv_intrinsic_sr_kind): New function.
1094 (g95_conv_intrinsic_function): Add SELECTED_INT_KIND and
1097 2003-09-17 Lars Segerlund <Lars.Segerlund@comsys.se>
1099 * iresolve.c (gfc_resolve_random_number): Generate _r4 & _r8
1100 instead of _4 and _8 as postfix for libgfortran calls.
1102 2003-09-16 Paul Brook <paul@nowt.org>
1104 * array.c (compare_bounds): New function.
1105 (gfc_compare_array_spec): Use it.
1107 2003-09-14 Paul Brook <paul@nowt.org>
1109 * primary.c (gfc_match_rvalue): Make sure sym->result is set.
1110 * trans-expr.c (gfc_conv_string_parameter): Also allow PRAM_DECLs.
1112 2003-09-14 Paul Brook <paul@nowt.org>
1114 * check.c (dim_rank_check): Allow assumed bounds if requested.
1115 (gfc_check_lbound): Call it.
1116 (gfc_check_ubound): Ditto.
1117 (gfc_check_size): Change to match.
1118 * simplify.c (gfc_simplify_bound): New function.
1119 (gfc_simplify_lbound): New function.
1120 (gfc_simplify_ubound): New function.
1121 * intrinsic.h: Declare them.
1122 * intrinsic.c (add_functions): Use them.
1124 2003-09-14 Paul Brook <paul@nowt.org>
1126 * io.c (format_lex): Initialize negative_flag.
1127 (check_format): Intialize repeat.
1128 * trans-io.c (gfc_new_nml_name_expr): Declare static.
1129 (gfc_new_var_expr): Ditto.
1131 2003-09-14 Paul Brook <paul@nowt.org>
1133 * trans-array.c (gfc_conv_array_initializer): Handle derived types.
1134 * trans-decl.c (gfc_get_symbol_decl): Only do local scalar values.
1136 2003-09-12 Paul Brook <paul@nowt.org>
1138 * trans-intrinsic.c (gfc_conv_intrinsic_sign): Call fold.
1140 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
1142 * fortran/trans.c (gfc_finish_block): Call rationalize_compound_expr
1143 for a correct expression.
1145 2003-09-10 Kejia Zhao <kejia_zh@yahoo.com.cn>
1147 * trans-intrinsic.c (real_compnt_info): New struct.
1148 (prepare_arg_info): New function.
1149 (gfc_conv_intrinsic_set_exponent): New function.
1150 (gfc_conv_intrinsic_scale): New function.
1151 (gfc_conv_intrinsic_nearest): New function.
1152 (gfc_conv_intrinsic_fraction): New function.
1153 (gfc_conv_intrinsic_exponent): New function.
1154 (gfc_conv_intrinsic_spacing): New function.
1155 (gfc_conv_intrinsic_rrspacing): New function.
1156 (gfc_conv_intrinsic_function): Use them.
1158 2003-08-24 XiaoQiang Zhang (zhangapache@yahoo.com>
1160 * trans-const.c (gfc_conv_mpz_to_tree): Fix bug, parameter for
1161 build_int_2 changed from (high, low) to (low, high).
1162 * trans-io.c (ioparm_namelist_name, ioparm_namelist_name_len,
1163 ioparm_namelist_read_mode, iocall_set_nml_val_int,
1164 iocall_set_nml_val_float, iocall_set_nml_val_char,
1165 iocall_set_nml_val_complex, iocall_set_nml_val_log): New declaration.
1166 (gfc_build_io_library_fndecls): Add variable initialization.
1167 (gfc_new_nml_name_expr, get_new_var_expr): New function.
1168 (build_dt): Add namelist support.
1169 * io.c (value): New variable.
1170 (check_format): Support FMT_H now.
1172 2003-09-07 Paul Brook <paul@nowt.org>
1174 * io.c (gfc_resolve_dt): Error if format label is not defined.
1176 2003-09-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
1178 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix two bugs. One is
1179 about case_switch's break. The other is about building the condition
1180 statement tree, which judges the argument in the range of the
1181 corresponding integer type.
1182 * trans-intrinsic.c (gfc_conv_intrinsic_mod): MOD and MODULO can work
1183 for the large values.
1185 2003-09-05 Paul Brook <paul@nowt.org>
1187 * f95-lang.c (expand_function_body): Gimplify the function.
1189 2003-09-04 Jeff Law <law@redhat.com>
1191 * f95-lang.c (DEFINE_MATH_BUILTIN): C arrays start at
1194 2003-09-04 Paul Brook <paul@nowt.org>
1196 * f95-lang.c (gfc_define_builtin): Also set implicit_built_in_decls.
1197 (gfc_expand_stmt): New function.
1198 (LANG_HOOKS_RTL_EXPAND_STMT): Define.
1199 (expand_function_body): Use tree_rest_of_compilation.
1200 * trans-decl.c (gfc_generate_function_code): Don't free cfun.
1202 2003-09-03 Jeff Law <law@redhat.com>
1204 * f95-lang.c (gfc_init_builtin_functions): C arrays start at
1207 2003-08-30 Paul Brook <paul@nowt.org>
1209 * f95-lang.c (builtin_function): Remove #if 0 code.
1210 (gfc_define_builtin): New function.
1211 (gfc_init_builtin_functions): Use mathbuiltins.def not ../builtins.def.
1212 * mathbuiltins.def: New file.
1213 * trans-intrinsic.c (gfc_intrinsic_map_t): Add builtin code fields.
1214 (gfc_intrinsic_map): Use mathbuiltins.def.
1215 (gfc_intrinsic_builtin_t): Remove.
1216 (gfc_build_intrinsic_lib_fndecls): Update.
1217 * trans-types.c (gfc_init_types): Remove redundant initilaization of
1218 signed_size_type_node.
1220 2003-08-29 Paul Brook <paul@nowt.org>
1222 * arith.c (gfc_real_kinds): Use correct minimum exponents.
1224 2003-08-22 Kejia Zhao <kejia_zh@yahoo.com.cn>
1226 * trans-instinsic.c (gfc_conv_intrinsic_mod): Also do MODULO.
1227 (gfc_conv_intrinsic_function): Add MODULO.
1229 2003-08-22 Jason Merrill <jason@redhat.com>
1231 * trans-array.c (gfc_conv_expr_descriptor): Update use of predicates.
1233 2003-08-22 Andreas Jaeger <aj@suse.de>
1235 * Make-lang.in (f95.install-common): Add DESTDIR support.
1236 * (f95.install-info): Likewise.
1237 (f95.uninstall): Likewise.
1239 2003-08-19 Diego Novillo <dnovillo@redhat.com>
1241 * trans-types.c (gfc_init_types): Initialize
1242 signed_size_type_node with size_type_node.
1244 2003-08-18 Paul Brook <paul@nowt.org>
1246 * dependency.c (gfc_dependency): New enum.
1247 (check_another_array_ref): Remove.
1248 (gfc_get_array_from_component): Remove.
1250 (get_range): Remove.
1251 (get_no_of_elements): Use mpz_t, not mpf_t.
1252 (transform_sections): New function.
1253 (gfc_check_range_range): Rename ...
1254 (gfc_check_section_vs_section): ... to this. Use new function.
1255 (gfc_is_inside_range): Rewrite to match.
1256 (gfc_check_element_vs_section): Ditto.
1257 (gfc_check_element_vs_element): Ditto.
1259 (gfc_dep_resolver): Ditto. Remove unused parameter.
1260 * Dependency.h (gfc_check_range_range, gfc_check_element_vs_section,
1261 gfc_check_element_vs_element, gfc_is_inside_range,
1262 gfc_get_array_from_component): Remove prototypes for static functions.
1263 (gfc_dep_resolver): Update prototype.
1264 * trans-array.c (gfc_conv_resolve_dependencies): Change to match.
1266 2003-08-15 Paul Brook <paul@nowt.org>
1268 * trans-decl.c (gfc_build_qualified_array): Don't add symbols for
1269 return values to parent scope.
1270 (gfc_build_dummy_array_decl): Ditto.
1272 2003-08-14 Paul Brook <paul@nowt.org>
1274 * trans-stmt.c (gfc_trans_allocate): Handle NULL refs. Allocate the
1275 size of the type, not the pointer.
1276 * resolve.c (resolve_symbol): Give more accurate error message.
1278 2003-08-10 Paul Brook <paul@nowt.org>
1280 * trans-decl.c (gfc_build_function_decl): Only mangle global symbols.
1282 2003-08-10 Paul Brook <paul@nowt.org>
1284 * trans-stmt.c (gfc_trans_allocate): Correctly handle non-array derived
1287 2003-08-10 Chun Huang <compiler@sohu.com>
1289 * resolve.c (resolve_formal_arglist): Resolve STATEMENT function.
1290 (resolve_symbol): Ditto.
1291 * trans-expr.c (gfc_conv_statement_function): New function.
1292 (gfc_conv_function_expr): Use it.
1294 2003-08-10 Paul Brook <paul@nowt.org>
1296 * trans-array.c (gfc_conv_ss_startstride): Handle functions.
1297 (walk_function_expr): Set section rank.
1298 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1300 2003-08-10 Paul Brook <paul@nowt.org>
1302 * intrinsic.c (add_sym): Prefix names with correct string.
1303 (add_sym_0s): New function.
1304 (add_subroutines): Register abort.
1306 2003-08-10 Erik Schnetter <schnetter@uni-tuebingen.de>
1308 * gfortran.h: Introduce options to control the mangling.
1309 * lang.opt: Likewise.
1310 * options.c (gfc_init_options): Handle the options.
1311 * trans-common.c (gfc_sym_mangled_common_id): New function.
1312 (gfc_build_common_decl): Call it.
1313 * trans-decl.c (gfc_sym_mangled_function_id): New function.
1314 (gfc_get_extern_function_decl, gfc_build_function_decl): Call it.
1316 2003-08-09 Paul Brook <paul@nowt.org>
1318 * module.c (mio_symbol): Always ouput a namespace for formal args.
1319 (load_needed): Namespace now belong to their proper symbol.
1320 (gfc_dump_module): Change G95=>GFORTRAN.
1322 2003-08-05 Paul Brook <paul@nowt.org>
1324 * options.c: Force -fg77-calls.
1326 2003-08-02 Paul Brook <paul@nowt.org>
1328 * Makelang.in: Rename G95_* to GFORTRAN_*.
1329 * All sources: Rename G95_* to GFC_*.
1331 2003-08-01 Paul Brook <paul@nowt.org>
1333 * fortran/Make-lang.in: Use GMPLIBS.
1334 * fortran/config-lang.in: Set need_gmp.
1335 * trans-expr.c (gfc_conv_variable): Remove incorrect assertion.
1337 2003-07-27 Andreas Jaeger <aj@suse.de>
1339 * trans-decl.c (gfc_generate_constructors): Convert prototype to
1341 * trans-const.c (gfc_init_constants): Likewise.
1342 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Likewise.
1344 * gfortranspec.c: Convert to ISO C90.
1345 (lang_specific_driver): Correct copyright, remove ALT_LIBM usage.
1347 2003-07-26 Paul Brook <paul@nowt.org>
1349 * lang.opt: Add -fdump-parse-tree.
1350 * options.c (gfc_handle_option): Ditto.
1351 * resolve.c (resolve_forall_iterators): Convert to proper type.
1352 * trans-stmt.c (gfc_trans_forall_1): Create temp var with correct type.
1354 2003-07-26 Paul Brook <paul@nowt.org>
1356 * Makefile.in: Add build dependencies on files common with rest of gcc.
1358 2003-07-26 Lifang Zeng <zlf605@hotmail.com>
1360 * trans.h: Declare g95_trans_pointer_assignment.
1361 * trans-expr.c (g95_trans_pointer_assignment): New function.
1362 (g95_trans_pointer_assign): Use it.
1363 * trans-stmt.c (g95_trans_forall_1): Handle pointer assignment.
1364 (g95_trans_pointer_assign_need_temp): New function.
1366 2003-07-26 Paul Brook <paul@nowt.org>
1368 * gfortran.texi: Replace references to g95.
1370 2003-07-26 Paul Brook <paul@nowt.org>
1372 Rename g95_* to gfc_*.
1374 2003-07-25 Paul Brook <paul@nowt.org>
1376 * gfortran.h: Rename from g95.h.
1377 * trans-types.c (boolean_type_node, booelan_true_node,
1378 boolean_false_node): Remove.
1379 * trans-types.h: Ditto.
1381 2003-07-25 Chun Huang <compiler@sohu.com>
1383 * parse.c (accept_statement): Implement BLOCK DATA statement.
1384 * trans-expr.c (g95_conv_variable): Fix bug for dereference pointer
1387 2003-07-24 Lifang Zeng <zlf605@hotmail.com>
1389 * trans-stmt.c (temporary_list): Define.
1390 (g95_trans_assign_need_temp): New function.
1391 (g95_trans_forall_1): Modified for WHERE.
1392 (g95_trans_where_assign): Modified.
1393 (g95_trans_where_2): Modified.
1394 (g95_evaluate_where_mask): Modified.
1395 (g95_trans_where): Modified.
1396 (g95_get_temp_expr): Removed.
1397 (g95_add_to_where_stmt_list): Removed.
1398 (compute_overall_iter_number): Modified for WHERE.
1399 * trans.h: Remove where_stmt_list.
1401 2003-07-24 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1403 * lang.opt: Correct description of options -J and -M.
1405 2003-07-23 Steven Bosscher <steven@gcc.gnu.org>
1407 * lang.opt: Move help text to here.
1408 * lang-options.h: Remove.
1410 2003-07-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1411 * iresolve.c (g95_resolve_transpose): Proper variable in switch.
1412 * simplify.c (g95_simplify_nearest): Fix typo and use a correct test
1415 2003-07-22 Steven Bosscher <steven@gcc.gnu.org>
1416 Paul Brook <paul@nowt.org>
1418 * check.c (check_rest): Use global pedantic flag.
1419 * io.c (data_desc): Ditto.
1420 * error.c (g95_warning, g95_warning_now): Use global flag.
1421 * f95-lang.c (LANG_HOOKS_HANDLE_OPTION): Rename from DECODE.
1422 (expand_function_body): Update to new prototypes.
1423 (g95_init): Use new option names.
1424 * g95.h (g95_option_t): Standardize names.
1425 (g95_init_options, g95_handle_option): Update prototypes.
1426 * interface.c: Use new option names.
1433 * simplify.c: Ditto.
1435 * trans-array.c: Ditto.
1436 * trans-expr.c: Ditto.
1437 * trans-types.c: Ditto.
1438 * trans-decl.c: Ditto.
1439 (g95_build_library_function_decl): Remove obsolete VPARAMS.
1441 * options.c (g95_display_help): Remove.
1442 (g95_init_options): Convert to new scheme.
1444 (g95module_option): Ditto, rename from g95_parse_arg.
1445 (g95_handle_module_path_options): New function.
1446 * trans-equivalence.c: Fix error message.
1447 * lang.opt: Corrections.
1449 2003-07-21 Steven Bosscher <steven@gcc.gnu.org>
1451 * lang.opt: New file.
1453 2003-07-21 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1455 * decl.c (match_attr_spec): Set colon_seen.
1457 2003-07-14 Paul Brook <paul@nowt.org>
1459 * trans-array.c: Update comment.
1460 (g95_trans_array_constructor_subarray): Cleanup loopinfo data.
1461 * trans-intrinsic.c (g95_conv_intrinsic_anyall,count,arith,
1462 minmaxloc,minmaxval): Ditto.
1463 * trans-io.c (g95_trans_transfer): Ditto.
1464 * trans-stmt.c: Remove unneeded prototypes.
1465 (generate_loop_for_lhs_to_rhs): Rename vars. Add loop post chain.
1466 (generate_loop_for_rhs_to_temp): Rename vars. Don't share loopinfo.
1467 (compute_inner_temp_size): Remove bits of dead code. Add comments.
1468 Don't share loopinfo.
1469 (compute_overall_iter_number): Declare as static.
1470 (allocate_temp_for_forall_nest): Ditto.
1471 (g95_trans_forall_1): Don't pass shared loopinfo.
1472 * trans.c (g95_start_block): Expand comment.
1474 2003-07-12 Paul Brook <paul@nowt.org>
1476 * arith.c (g95_index_integer_kind): Remove unused initializer.
1477 * trans-stmt.c (generate_loop_for_temp_to_lhs): Don't multiply array
1478 index by size of element.
1479 (generate_loop_for_rhs_to_temp): Ditto.
1480 (allocate_temp_for_forall_nest): Use element size, not index size.
1482 2003-07-11 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1484 * arith.c (g95_index_integer_kind): Add a TODO.
1485 * simplify.c (g95_simplify_nearest): Add a TODO.
1487 2003-07-09 Chun Huang <compiler@sohu.com>
1489 * trans.h: Add declarations for gfor_fndecl_string_scan and
1490 gfor_fndecl_string_verify.
1491 * trans-decl.c (g95_build_intrinsic_function_decls): Build them.
1492 * trans-intrinsic.c (g95_conv_intrinsic_scan): New function.
1493 (g95_conv_intrinsic_verify): New function.
1494 (g95_conv_intrinsic_function): Add SCAN and VERIFY.
1495 * simplify.c (g95_simplify_scan, g95_simplify_verify): Fix bug in case
1496 of parameter 'BACK=.TRUE.'
1498 2003-07-05 Lifang Zeng <zlf605@hotmail.com>
1500 * trans-stmt.c (iter_info, forall_info): Define.
1501 (g95_trans_forall_block): Remove.
1502 (g95_trans_forall_loop): Use forall info blocks.
1503 (g95_trans_nested_forall_loop): New function.
1504 (g95_do_allocate): Handle things other than logical masks.
1505 (generate_loop_for_temp_to_lhs): New function.
1506 (generate_loop_for_rsh_to_temp): New function.
1507 (compute_inner_temp_size): New function.
1508 (compute_overall_iter_number): New function.
1509 (allocate_temp_for_forall_nest): New function.
1510 (g95_trans_forall): Move body ...
1511 (g95_trans_forall_1): ... to here. Handle loops with temporaries.
1513 2003-07-02 Paul Brook <paul@nowt.org>
1515 * trans-decl.c (create_index_var, g95_build_qualified_array): Put vars
1516 in correct scope. Change callers to match.
1517 * trans-types.c (g95_get_dtype_cst): Allow rank 7 arrays.
1518 * iresolve.c (g95_resolve_reshape): Only use constant shapes.
1520 2003-07-02 Paul Brook <paul@nowt.org>
1522 * trans-array.c (g95_conv_loop_setup): Remove dead var. Use
1523 expression shape for all expressions.
1524 * trans-decl.c (g95_symbol_init): Allow adding at very end of list.
1526 2003-07-03 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1528 * g95.h (g95_option_t), lang-options.h, options.c (g95_init_options,
1529 g95_parse_arg), intrinsic.c (g95_convert_type): support of
1531 * intrinsic.c, g95.h: Add g95_convert_type_warn,
1532 * resolve.c (g95_resolve_index): Call it.
1534 2003-07-02 Paul Brook <paul@nowt.org>
1536 * iresolve.c (g95_resolve_reshape): Set expression shape.
1537 (g95_resolve_shape): Ditto.
1538 * simplify.c (g95_simplify_shape): Move common code outside condition.
1539 * trans-array.c (g95_conv_array_initializer): Teach it how to count.
1541 2003-07-01 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1543 * array.c (g95_array_dimen_size): Deal with EXPR_ARRAY to improve
1546 2003-06-29 Paul Brook <paul@nowt.org>
1548 * array.c (g95_simplify_iterator_var): Don't bother with return value.
1549 * expr.c (find_array_element, find_component_ref): New functions.
1550 (remove_subobject_ref): New function.
1551 (simplify_const_ref): Use them. Rename from simplify_component_ref.
1552 (simplify_ref_chain): New function.
1553 (g95_simplify_expr): Use it. Simplify parameter variable subobjects.
1554 (g95_specification_expr): Simplify the expression.
1555 * resolve.c (resolve_operator): Check simplifications return code.
1556 (g95_resolve_expr): Ditto.
1558 2003-06-26 Paul Brook <paul@nowt.org>
1560 * expr.c (simplify_component_ref): New function.
1561 (g95_simplify_expr): Use it.
1562 * resolve.c (resolve_structure_cons): Handle references.
1564 2003-06-25 Paul Brook <paul@nowt.org>
1566 * trans-io.c (build_dt): Handle internal units.
1568 2003-06-25 Canqun Yang <canqun@yahoo.com.cn>
1570 * trans-common.c (g95_build_common_decl): Array index range starts at 0.
1571 (g95_build_common_decl, g95_layout_global_equiv, g95_trans_one_common):
1572 Use g95_array_index_type instead of integer_type_node.
1573 (g95_build_common_decl, g95_set_common_master_type): Use
1574 g95_character1_type_node instead of char_type_node.
1575 * trans-equivalence.c (g95_layout_local_equiv): As above.
1577 2003-06-24 Steven G. Kargl <kargls@attbi.com>
1579 * g95.h (g95_option_t), options.c (g95_init_options, g95_parse_arg):
1580 remove last remains of -fquiet.
1582 2003-06-22 Paul Brook <paul@nowt.org>
1584 * resolve.c (resolve_operator): Don't fail if we can't simplify.
1585 (g95_resolve_expr): Ditto.
1586 (resolce_code): Mark as static.
1587 * trans-stmt.c (g95_trans_chaaracter_select): Mark labels because the
1588 gimplifer doesn't (yet).
1590 2003-06-20 Paul Brook <paul@nowt.org>
1592 * g95.h: Add ST_PAUSE and EXEC_PAUSE.
1593 * match.c (g95_match_if): Add ST_PAUSE.
1594 (g95_match_stopcode): New function.
1595 (g95_match_pause, g95_match_stop): Use it.
1596 * parse.c (g95_ascii_statement): Handle ST_PAUSE.
1597 (decode_stmt, next_statement, parse_executable): Ditto.
1598 * resolve.c (resolve_code): Ditto.
1599 * st.c (g95_free_statement): Ditto.
1600 * trans-stmt.c (g95_trans_pause): New function.
1601 * trans-stmt.h: Declare it.
1602 * trans.c (g95_trans_code): Use it.
1603 * trans-decl.c (gfor_fndecl_pause_numeric, gfor_fndecl_pause_string):
1605 (g95_build_builtin_function_decls): Initialize them.
1607 * dump-parse-tree.c (g95_show_code_node): Handle EXEC_PAUSE.
1609 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1611 * io.c (g95_match_open , g95_match_close, g95_match_inquire,
1612 match_filepos): Fix error handling.
1614 2003-06-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1616 * array.c (spec_dimen_size, ref_dimen_size, g95_array_dimen_size):
1617 Add assertions on arguments.
1618 * resolve.c (expression_shape): Remove useless &.
1619 * simplify.c (get_kind, g95_simplify_bit_size, g95_simplify_digits,
1620 g95_simplify_ibclr, g95_simplify_ibits, g95_simplify_ibset,
1621 g95_simplify_ishft,g95_simplify_ishftc, g95_simplify_maxexponent,
1622 g95_simplify_minexponent, g95_simplify_radix, g95_simplify_range
1623 g95_simplify_rrspacing, g95_simplify_scale, g95_simplify_spacing,
1624 g95_simplify_tan, g95_simplify_tiny): Clean predicates and assertions.
1625 (g95_simplify_not, g95_simplify_scale): Add assertions.
1627 2003-06-15 Paul Brook <paul@nowt.org>
1629 Clean up stuff to work with the ssa optimizers.
1630 * convert.c (convert): Handle BOOLEAN_TYPEs.
1631 * f95-lang.c (g95_truthvalue_conversion): Implement.
1632 * trans-array.c (g95_trans_array_constructor_value): Group multiple
1634 * trans.h (g95_truthvalue_conversion): Declare.
1635 * trans-intrinsic.c (g95_conv_intrinsic_anyall): Use bool constants.
1636 * trans-stmt.c (g95_trans_character_select): Don't create array
1637 assignments. Mark labels as indirect jump targets.
1638 * trans-types.h (g95_init_types): Use BOOLEAN_TYPE nodes.
1639 (g95_get_dtype_cst): Handle LOGICAL types.
1641 2003-06-14 Paul Brook <paul@nowt.org>
1643 * f95-lang.c (g95_gimplify_expr): New function.
1644 * trans-array.c (g95_trans_array_constructor_value): Don't create
1646 (g95_conv_expr_descriptor): Rename simple->gimple.
1647 * trans-expr.c (conv_expr_op): Use proper logical operators.
1648 * trans-intrinsic.c (build_fixbound_expr): New function.
1649 (build_fix_expr): Ditto.
1650 (g95_conv_intinsic_aint): Use them. Use builtin functions.
1651 (g95_conv_intrinsic_function): Add FLOOR and CEILING.
1653 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1655 * array.c (g95_compare_array_spec): Remove unreachable code.
1656 * expr.c (g95_copy_expr): Likewise.
1657 * intrinsic.c (g95_convert_type): Likewise.
1658 * misc.c (g95_code2string): Likewise.
1659 * simplify.c (g95_simplify_ishft, g95_simplify_real,
1660 g95_simplify_reshape, g95_simplify_sign, g95_simplify_sqrt): Likewise.
1661 * trans-stmt.c (g95_trans_select): Likewise.
1662 * primary.c (extend_ref): Add an assertion.
1663 * simplify.c (g95_convert_constant): Add const.
1664 * intrinsic.h: Remove g95_check_x_ni.
1665 * f95-lang.c (g95_finish): Call g95_release_include_path.
1667 2003-06-10 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1669 * resolve.c (resolve_contained_functions): Fix typo introduced on
1672 2003-06-09 Paul Brook <paul@nowt.org>
1674 * g95.h: Include system.h not hwint.h.
1675 * many: use safe-ctype.h not ctype.h. Change isalpha -> ISALPHA, etc.
1676 * misc.c (g95_getmem): Use xmalloc/memset instead of calloc.
1678 2003-06-09 Paul Brook <paul@nowt.org>
1680 * g95.h (g95_symbol): Add fields for COMMON and EQUIVALENCE variables.
1681 * Make-lang.in (F95_OBJS): Add files for COMMON and EQUIVALENCE.
1682 * trans-decl.c (g95_add_decl_to_functions): Make non-static.
1683 (g95_get_symbol_decl): Handle COMMON and EQUIVALENCE objects.
1684 (g95_generate_function_code): Translate COMMON and EQUIVALENCE
1686 * trans.h (g95_trans_equivalence, g95_trans_common,
1687 g95_add_decl_to_function): Declare.
1688 * trans-common.c, trans-equivalence.c: New files.
1690 2003-06-08 Steven Bosscher <steven@gcc.gnu.org>
1692 * intrinsic.c (g95_intrinsic_extension): Remove.
1693 (add_functions): Substitute g95_check_x for g95_check_x_ni
1695 (g95_init_expr_extensions): New function.
1696 (g95_intrinsic_func_interface): Use it.
1697 * intrinsic.h: Remove extern decl for g95_intrinsic_extension.
1698 * check.c (g95_check_digit, g95_check_huge, g95_check_kind,
1699 g95_check_precision, g95_check_present, g95_check_radix,
1700 g95_check_range, g95_check_selected_real_kind): Do not set
1701 g95_intrinsic_extension.
1702 (g95_check_x_ni): Remove now duplicate of g95_check_x.
1704 * expr.c (check_inquiry): Add FIXME, fixup some code style.
1706 2003-06-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1708 * g95.h (ref_type): Name this type explicitly.
1709 * module.c (MIO_NAME): Add specialisations of mio_name.
1710 (mio_symbol_attribute, mio_typespec, mio_array_ref,
1711 mio_array_spec, mio_ref, mio_expr, mio_symbol): Use them.
1712 (ab_attribute): Name this type explicitly.
1713 (mio_symbol_attribute, mio_expr): Add cast to call to find_enum.
1715 2003-06-05 Kejia Zhao <kejia_zh@yahoo.com.cn>
1717 * trans-intrinsic.c (g95_conv_allocated): New function.
1718 (g95_conv_intrinsic_function): Make G95_ISYM_ALLOCATED work.
1720 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
1722 * f95-lang.c: Don't include g95-support.h
1723 (g95_mark_addressable): Add prototype.
1724 (g95_init_decl_processing): Remove C front end hack.
1725 * f95-tree.c: Remove file.
1726 * support.c: Remove file.
1727 * g95-support.h: Remove file.
1728 * trans-types.c (g95_init_types): Set up boolean
1729 type related tree nodes.
1730 * Make-lang.in: Remove rules for dead files and
1731 dependencies on them.
1733 2003-06-05 Steven Bosscher <steven@gcc.gnu.org>
1735 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove the final
1736 C front end dependency. Also, convert.c does not depend on
1737 g95-support.h anymore.
1738 * convert.c: Don't include c-common.h and g95-support.h
1739 * f95-lang.c: Don't inlude c-common.h and c-common.def (3x).
1740 (g95_stmt_tree, g95_scope_stmt_stack, anon_aggr_type_p,
1741 stmts_are_full_exprs_p, current_stmt_tree,
1742 current_scope_stmt_stack): Remove.
1743 * g95-support.h (unsigned_conversion_warning): Kill proto.
1744 (boolean_type_node, boolean_true_node, boolean_false_node):
1745 Don't define here. Instead, make then true tree nodes in
1747 * support.c (c_global_trees): Die, C front end, die!!!
1748 (g95_init_c_decl_hacks): Don't touch intmax_type_node,
1749 uintmax_type_node, string_type_node and const_string_type_node.
1750 (decl_constant_value, overflow_warning): Make static functions.
1751 They are in death row too, though.
1752 (default_conversion, c_expand_asm_operands): Remove.
1753 * trans-array.c, trans-expr.c, trans-intrinsic.c, trans-stmt.c,
1754 trans.c: Don't include c-common.h.
1755 * trans-types.c (boolean_type_node, boolean_true_node,
1756 boolean_false_node): Make them real tree nodes.
1757 * trans-types.h (intmax_type_node, string_type_node,
1758 const_string_type_node): Hack to work around C dependencies
1759 in builtin-types.def.
1761 2003-06-04 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1763 * decl.c (decl_types): Add some iterators-like sentinels.
1764 * decl.c (match_attr_spec): Use them.
1765 Use "decl_types" instead of "int".
1766 Add cast in call to g95_match_strings.
1767 * dump-parse-tree.c (g95_show_namespace): Use "g95_intrinsic_op"
1769 * g95.h (g95_intrinsic_op): Add some iterators-like sentinels.
1770 (g95_interface_info): Use "g95_intrinsic_op".
1771 * dump-parse-tree.c (g95_show_namespace): Use them.
1772 * interface.c (g95_check_interfaces): Use them.
1773 * module.c (read_module, write_module): Use them.
1774 * symbol.c (g95_get_namespace, g95_free_namespace): Use them.
1775 Use "g95_intrinsic_op".
1776 * interface.c (check_operator_interface): Use "g95_intrinsic_op".
1777 Add a default case in switch statement.
1778 * intrinsic.h (g95_generic_isym_id): Moved to...
1779 * g95.h (g95_generic_isym_id): here.
1780 (g95_intrinsic_sym): Use "g95_generic_isym_id".
1781 * intrinsic.c (make_generic): Use "g95_generice_isym_id".
1782 * trans-intrinsic.c (g95_intrinsic_map_t,
1783 g95_conv_intrinsic_lib_funtion): Use "g95_generice_isym_id".
1784 * match.c (g95_match_intrinsic_op): Add cast in call to
1787 2003-06-03 Steven Bosscher <steven@gcc.gnu.org>
1789 * support.c (skip_evaluation, warn_conversion, lvalue_p,
1790 lvalue_or_else, pedantic_lvalue_warning, warn_for_assignment,
1791 constant_fits_type_p, convert_and_check,
1792 unsigned_conversion_warning): Remove these ugly remnants
1793 we inherited from the C front end.
1794 (function_types_compatible): Remove '#if 0'-edcode.
1795 (build_modify_expr): Likewise.
1796 (convert_for_assignment): Don't use the deceased functions.
1797 The parameter fundecl is now unused.
1798 (decl_constant_value): Always just return decl. In fact
1799 this function is not used at present, but it might be in
1800 the future, when we start using the tree inliner.
1801 (overflow_warning, default_conversion, c_expand_asm_operands):
1802 Abort when these are called, they are part of the C type
1803 checking implementation and therefore poison to Fortran.
1805 2003-06-04 Steven Bosscher <steven@gcc.gnu.org>
1807 * Make-lang.in (F95_ADDITIONAL_OBJS): Don't depend on
1808 c-pretty-print.o and c-dump.o. Add a comment on why we
1809 depend on c-semantics.c.
1810 * f95-lang.c (LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN):
1811 Don't use the C front end tree dumper hook to dump the
1812 language specific tree representation -- we don't have
1813 one. So instead, inherit the default langhook.
1815 2003-06-02 Paul Brook <paul@nowt.org>
1817 * trans-expr.c (g95_conv_variable): Remove incorrent assertion.
1819 2003-06-02 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1821 * check.c (g95_check_associated): Use proper types. Remove
1822 extraneous argument in call to g95_error().
1824 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
1826 * resolve.c (resolve_operator): Make logical operands convert to the
1827 type with higher kind.
1829 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
1831 * check.c (g95_check_associated): Make sure both pointer and target has
1832 the same type and rank. Null pointer or array section with vector
1833 subscript as target are not allowed.
1834 * trans.h: Declare gfor_fndecl_associated.
1835 * trans-decl.c: (g95_build_builtin_function_decls): Initialize
1836 gfor_fndecl_associated.
1837 * trans-intrinsic.c (g95_conv_associated): New function.
1838 (g95_conv_intrinsic_function): Make G95_ISYM_ASSOCIATED work.
1840 2003-06-02 Kejia Zhao <kejia_zh@yahoo.com.cn>
1842 * trans-array.c (g95_conv_expr_descriptor): Set the base of POINTER
1843 according to POINTER itself rather than TARGET.
1844 (g95_conv_expr_descriptor): Make lbound start at 1.
1845 * trans-expr.c (g95_trans_pointer_assign): Fix a bug for Nullify.
1847 2003-06-01 Paul Brook <paul@nowt.org>
1849 * expr.c (g95_type_convert_binary): Make it match the standard.
1850 * g95.texi: Remove dead link.
1852 2003-06-01 Steven Bosscher <steven@gcc.gnu.org>
1854 * g95.texi: Cleanup somewhat in preparation for inclusion
1857 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1858 Canqun Yang <canqun@yahoo.com.cn>
1860 * resolve.c (compare_bound_int, resolve_where_shape): Proper return
1862 (g95_find_forall_index): Return proper value.
1863 (g95_resolve_assign_in_forall, g95_resolve_forall): Use proper type to
1864 compare the return value from g95_find_forall_index.
1866 2003-05-23 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
1867 * g95.h, io.c (g95_st_label): Remove "length".
1868 (g95_symtree): Remove "link".
1869 (g95_case): Remove "code".
1870 * arith.c, arith.h (g95_compare_string, g95_convert_integer,
1871 g95_convert_real): Make an argument pointer to const.
1872 * decl.c (colon_seen): Add a TODO.
1873 * interface.c (g95_compare_types): Fix typo.
1874 * interface.c (compare_interfaces): Preserve value of "p".
1875 * intrinsic.c (sort_actual): Remove "i".
1876 * match.c (g95_match_assign): Proper type in call to g95_match().
1877 * parse.c (next_free): Avoid duplicate call due to macro.
1878 * parse.c (check_statement_label): wrong type in call to g95_error.
1879 * primary.c (match_real_constant): Add a TODO.
1880 * resolve.c (resolve_select): Remove useless conditional.
1881 * simplify.c (g95_simplify_repeat): Proper assignment to
1882 "value.character.string".
1883 * simplify.c (g95_simplify_reshape): Wrong variable in call to
1886 2003-05-20 Canqun Yang <canqun@yahoo.com.cn>
1888 * trans-stmt.c: Remove unnecessary include file defaults.h.
1890 2003-05-19 Lifang Zeng <zlf605@hotmail.com>
1892 * trans-stmt.c (g95_trans_forall_loop): Handle FORALL with negative
1894 (g95_trans_forall): Allow arbitrary number of FORALL indexes and
1895 actual variables used as FORALL indexes.
1897 2003-05-15 Paul Brook <paul@nowt.org>
1899 * trans-array.c (g95_trans_static_array_pointer): Use
1901 (g95_trans_deferred_array): Initialize static array pointers.
1902 * trans-expr.c (g95_conv_function_call): Use formal arglist to
1903 correctly pass POINTER and absent CHARACTER arguments.
1905 2003-05-14 Lifang Zeng <zlf605@hotmail.com>
1907 * resolve.c (g95_resolve_forall): Resolve FORALL construct/statement.
1908 (g95_resolve_forall_body): Resolve FORALL body.
1909 (g95_resolve_where_code_in_forall): Resolve WHERE inside FORALL.
1910 (g95_resolve_assign_in_forall): Resolve assignment inside FORALL.
1911 (g95_find_forall_index): Check whether the FORALL index appears in
1912 the expression or not.
1913 (resolve_code): Modified.
1915 2003-05-14 Paul Brook <paul@nowt.org>
1917 * iresolve.c (g95_resolve_spread): Convert ncopies to index_type.
1919 2003-05-13 Paul Brook <paul@nowt.org>
1921 * trans-types.c (g95_max_array_element_size): Now a tree node.
1922 (g95_init_types): Work out max size properly.
1923 (g95_get_dtype_cst): Modify to match.
1925 2003-05-11 Paul Brook <paul@nowt.org>
1927 * trans-io.c (add_case): Create a label decl for case labels.
1929 2003-05-11 Paul Brook <paul@nowt.org>
1931 * arith.c (g95_integer_index_kind): New variable.
1932 * f95-lang.c (g95_init): Move frontend initialization here ...
1933 (g95_post_options): ... from here.
1934 * g95.h (g95_index_integer_kind, g95_resolve_index): Declare.
1935 * intrinsic.c (add_functions): Use index kinds.
1936 * iresolve.c: Convert to index_kind where needed.
1937 * resolve.c (g95_resolve_index): Make public, use index_kind.
1938 (resolve_array_ref): Adjust to match.
1939 * trans-array.c: Rename g95_array_index_kind to g95_index_integer_kind.
1940 * trans-stmt.c: Ditto.
1941 * trans-types.c: Ditto.
1942 * trans-types.h (g95_array_index_kind): Remove declaration.
1943 * trans-expr.c (g95_conv_expr_present): Use null_pointer_node.
1945 2003-05-07 Paul Brook <paul@nowt.org>
1947 * trans-const.c (g95_conv_mpz_to_tree): Typecast constant.
1948 * trans-intrinsic.c (g95_conv_intrinsic_bound): Convert type
1951 2003-05-07 Paul Brook <paul@nowt.org>
1953 * trans-array.c (trans_static_array_pointer,
1954 g95_trans_array_constructor_value, g95_conv_array_initializer,
1955 g95_conv_structure): CONSTRUCTOR nodes only have one operand.
1956 (g95_add_loop_ss_code): Convert subscripts to the correct type.
1957 * trans-stmt.c (g95_trans_character_select): Ditto.
1958 * trans-types.c (g95_init_types): Ditto.
1960 2003-05-07 Steven Bosscher <steven@gcc.gnu.org>
1962 * f95-lang.c (expand_function_body): Use input_line, not lineno.
1963 * trans-decl.c (g95_generate_function_code,
1964 g95_generate_constructors): Likewise.
1965 * trans.c (g95_trans_runtime_check, g95_add_block_to_block,
1966 g95_get_backend_locus, g95_set_backend_locus, g95_trans_code):
1969 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
1970 * trans-types.c (g95_get_derived_type): Fix bug for DERIVED type
1971 with components point to the DERIVED type itself, and two DERIVED
1972 type with components point to each other.
1973 * trans-expr.c (g95_conv_componet_ref): Modified
1975 2003-05-07 Kejia Zhao <kejia_zh@yahoo.com.cn>
1976 * trans-expr.c (g95_conv_expr): Translate EXPR_NULL into
1978 (g95_trans_pointer_assign): Implement Nullify.
1980 2003-05-01 Paul Brook <paul@nowt.org>
1982 * trans-array.c (g95_walk_function_expr): Cope with NULL esym.
1983 * trans-decl.c (g95_get_symbol_decl): Don't mangle dummy functions.
1985 2003-05-01 Paul Brook <paul@nowr.org>
1987 * trans-array.c, trans.c, trans-expr.c, trans-intrinsic.c,
1988 trans-stmt.c: Replace empty_stmt_node with build_empty_stmt () and
1991 2003-05-01 Canqun Yang <canqun@yahoo.com.cn>
1993 * trans-stmt.c (g95_trans_integer_select): Add a parameter to build
1996 2003-04-28 Paul Brook <paul@nowt.org>
1998 * iresolve.c (g95_resolve_transpose): COMPLEX types are twice as big
1999 as their kind suggests.
2000 (g95_resolve_reshape): Ditto.
2002 2003-04-28 Chun Huang <compiler@sohu.com>
2004 * trans-expr.c (g95_conv_substring_expr): New function.
2005 (g95_conv_expr): Use it.
2007 2003-04-28 Paul Brook <paul@nowt.org>
2009 * iresolve.c (g95_resolve_transpose): Make it match the
2011 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add TRANSPOSE.
2013 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2015 * trans-types.c (g95_add_field_to_struct): New function to
2016 add a field to a UNION_TYPE or RECORD_TYPE.
2017 * trans-types.h (g95_add_field_to_struct): Prototype.
2018 (g95_get_derived_type): Use g95_add_field_to_struct to add
2020 * trans-io.c (g95_add_field): Remove.
2021 (ADD_FIELD): Use new g95_add_field_to_struct function.
2022 (ADD_STRING): Likewise.
2023 * trans-stmt.c (g95_trans_select): Likewise.
2024 (g95_add_field): Remove duplicated function.
2026 2003-04-18 Canqun Yang <canqun@yahoo.com.cn>
2028 Port implementation for CHARACTER SELECT from Andy's tree.
2029 * trans-stmt.c (g95_trans_character_select): Implement character
2030 select. (g95_add_field): New function.
2031 * trans-decl.c: Declare 'gfor_gndecl_select_string'.
2032 (g95_build_builtin_function_decls): Add 'gfor_fndecl_select_string'.
2033 * g95.h (struct g95_case): Add field 'int n'.
2034 * trans.h: Declare 'gfor_fndecl_select_string'.
2036 2003-04-18 Steven Bosscher <steven@gcc.gnu.org>
2038 * bbt.c (duplicate_key, g95_insert_bbt_with_overlap): Remove.
2039 (g95_insert_bbd): Die on duplicates.
2040 * g95.h (g95_insert_bbt_with_overlap): Delete prototype.
2042 2003-04-14 Steven Bosscher <steven@gcc.gnu.org>
2044 * g95.texi: Require GMP 4.0 -- like we actually
2045 do. Explain the testsuite and what-goes-where.
2046 Don't use undefined texinfo symbol. Break very
2047 long line. Remove finished item from the list
2050 2003-04-11 Canqun Yang <canqun@yahoo.com.cn>
2052 * trans-stmt.c (g95_evaluate_where_mask): Give mask temporaries
2055 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2057 * trans-stmt.c (g95_trans_forall): Implement WHERE inside FORALL.
2058 (g95_trans_forall_body): New function.
2060 2003-04-10 Canqun Yang <canqun@yahoo.com.cn>
2062 * resolve.c (resove_where): New function.
2063 (resolve_where_shape): New function.
2064 (resolve_code): Add call to 'resolve_where'
2065 * trans-stmt.c (g95_trans_where): Modified.
2066 (g95_trans_where_2): New function.
2067 (g95_trans_where_assign): New function.
2068 (g95_evaluate_where_mask): New function.
2069 (g95_add_to_stmt_list): New function.
2070 (g95_get_temp_expr): New function.
2071 * trans.h (where_stmt_list): New structure.
2073 2003-04-10 Paul Brook <paul@nowt.org>
2075 * g95spec.c (DEFAULT_SWITCH_TAKES_ARG): Remove.
2076 (DEFAULT_WORD_SWITCH_TAKES_ARG): Ditto.
2078 2003-04-10 Steven Bosscher <steven@gcc.gnu.org>
2080 Update after mainline -> tree-ssa-branch merge.
2081 * f95-lang.c (g95_mark_addressable): Update put_var_into_stack
2083 (g95_init): Update for new lang_hooks definition.
2084 (g95_post_options): New langhook.
2085 (LANG_HOOK_POST_OPTIONS): Clear, then define to g95_post_options.
2086 * scanner.c (g95_new_file): Comment update.
2088 2003-04-09 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2090 * g95.h, lang-options.h: Add -Wimplicit-interface.
2091 * options.c (g95_init_options, g95_parse_arg): Set it.
2092 * interface.c (check_intents): Warn about call with implicit
2094 * resolve.c (resolve_unknown_f, resolve_unknown_s): Call
2097 2003-04-05 Paul Brook <paul@nowt.org>
2099 * iresolve.c (g95_resolve_spread): Don't resole based on type.
2100 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_SPREAD.
2102 2003-03-29 Paul Brook <paul@nowt.org>
2104 * iresolve.c (g95_resolve_pack): Don't bother resolving based on type.
2105 (g95_resolve_unpack): Ditto.
2106 * trans-intrinsic.c (g95_conv_intrinsic_merge): New Function.
2107 (g95_conv_intrinsic_function): Use it. Remove PACK and UNPACK.
2108 (g95_is_intrinsic_libcall): Add PACK and UNPACK.
2110 2003-03-25 Paul Brook <paul@nowt.org>
2112 * arith.c (g95_unary_user, g95_user): Remove dead functions.
2114 * array.c (g95_free_array_ref): Ditto.
2116 * symbol.c (g95_use_derived_tree): Ditto.
2117 * intrinsic.c (add_functions): Use simplification for SCALE.
2118 * primary.c (g95_match_rvalue): Test sym, not symtree.
2120 2003-03-25 Paul Brook <paul@nowt.org>
2122 * trans-decl.c (build_function_decl): Add parameter before it gets
2123 turned into a constant.
2124 * iresolve.c (g95_resolve_eoshift): Resolve to a useful name.
2125 * trans-intrinsic.c (g95_is_intrinsic_libcall): Add G95_ISYM_EOSHIFT.
2126 * trans-decl.c (g95_create_module_variable): Don't pushdecl constants.
2128 2003-03-22 Paul Brook <paul@nowt.org>
2130 * trans-array.c (g95_conv_array_initializer): Allow scalar
2132 * trans-decl.c (g95_finish_var_decl): Result variables are not
2134 * trans-intrinsic.c (g95_conv_intrinsic_transfer): New function.
2135 (g95_conv_intrinsic_function): Use it.
2136 * trans-types.h (g95_type_spec): Remove dead declaration.
2138 2003-03-21 Paul Brook <paul@nowt.org>
2140 * trans-decl.c (g95_build_function_decl): Mark string parameters.
2142 2003-03-20 Paul Brook <paul@nowt.org>
2144 * trans-decl.c (g95_build_function_decl): Put character length
2145 parameters at the end of the function declaration.
2146 * trans-expr.c (g95_conv_function_call): Ditto.
2147 * trans-types.c (g95_get_function_type): Ditto.
2149 2003-03-20 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2151 * resolve.c (resolve_formal_arglist): Don't impose intent for
2152 procedure arguments of pure functions.
2153 (resolve_select): Remove redundant assignment.
2155 2003-03-19 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2157 * arith.c (validate_logical), g95.h, options.c (g95_init_options):
2159 * g95.h, intrinsic.c(g95_get_intrinsic_sub_symbol): Add const.
2160 * iresolve.c(g95_resolve_cpu_time, g95_resolve_random_number): Add
2162 * lang-options.h: Remove -finline-repack-arrays. Add -fg77-calls.
2164 * symbol.c (g95_add_type): Fix typo in comment.
2167 2003-03-16 Paul Brook <paul@nowt.org>
2169 * dump-parse-tree.c (g95_show_code_node): Print resolved sym name.
2170 * expr.c (g95_build_call): Remove.
2171 * f95-lang.c (puchdecl_top_level): New function.
2172 * g95.h (g95_code): Store resolved symbol, not just the name.
2173 * intrinsic.c (g95_intrinsic_namespace): New global namespace.
2174 (g95_intirinsic_init_1, g95_intrinsic_done_1): Use it.
2175 (g95_get_intrinsic_sub_symbol): New function.
2176 * iresolve.c (g95_resolve_cpu_time): Use it.
2177 (g95_resolve_random_number): Ditto.
2178 * resolve.c: Set code->resolved_sym instead of code->sub_name.
2179 * trans-decl.c (g95_get_extern_function_decl): Give external decls
2180 the correct DECL_CONTEXT. Add global symbold to the global scope.
2181 * trans-stmt.c (g95_trans_code): Remove hacks now the fronted is
2184 2003-03-16 Paul Brook <paul@nowt.org>
2186 * g95.h (g95_option_t): Add g77_calls. Remove inline_repack_arrays.
2187 * options.c (g95_parse_arg): Ditto.
2188 * module.c (mio_symbol_attribute): Handle the always_explicit bit.
2189 * resolve.c (resolve_formal_arglist): The always_explicit sould be set
2190 for the procedure, not the parameter.
2191 * trans-array.c (g95_trans_g77_array): New function.
2192 (g95_trans_assumed_size): Use it.
2193 (g95_trans_dummy_array_bias): Ditto.
2194 (g95_conv_array_parameter): Handle g77 arrays. Move existing body ...
2195 (g95_conv_expr_descriptor): ... to here. Update callers.
2196 * trans-decl.c (g95_build_dummy_array_decl): Handle g77 arrays.
2197 (g95_get_symbol_decl): Avoid processing g77 arrays multiple times.
2198 * trans-expr.c (g95_conv_function_call): Handle g77 arrays.
2199 * trans-intrinsic.c (g95_get_symbol_for_expr): Never use g77 arrays.
2200 * trans-types.c (g95_is_nodesc_array): Handle g77 arrays.
2201 (g95_sym_type): Ditto.
2203 2003-03-15 Paul Brook <paul@nowt.org>
2205 * trans-array.c (g95_walk_elemental_function_args): Don't amputate the
2207 * trans-expr.c (g95_conv_function_call): Use the resolved symbol.
2209 2003-03-14 Paul Brook <paul@nowt.org>
2211 * trans-array.c (g95_array_is_packed): Remove.
2212 (g95_conv_array_base): Correctly handle all descriptorless cases.
2213 (g95_conv_array_stride): Use descriptorless strides.
2214 (g95_trans_dummy_array_bias): Don't always repack the array.
2215 (g95_build_dummy_array_decl): Automatic dummy arrays are only partial
2217 * trans-types.c (g95_get_nodesc_array_type): Differentiate between
2218 dummy and non-dummy arrays...
2219 (g95_sym_type, g95_get_derived_type): ... like these.
2220 (g95_get_array_type_bounds): Allow discontiguous arrays.
2222 2003-03-12 Paul Brook <paul@nowt.org>
2224 * array.c (g95_resolve_array_spec): Fix comment.
2225 * g95.h (symbol_attributes): New flag always_explicit.
2226 * resolve.c (resolve_formal_arglist): Set it always_explicit.
2227 * iresolve.c (g95_resolve_lbound, g95_resolve_ubound): Simplify.
2228 * trans-array.c (g95_conv_descriptor_dimension): Remove dead assert.
2229 (g95_trans_array_bounds): Allow assumed shape arrays.
2230 (g95_trans_repack_array): Remove.
2231 (g95_trans_dummy_array_bias): Rewite to use descriptorless arrays.
2232 * trans-decl.c (g95_build_qualified_array): Only ignore absent
2233 bounds for assumed size arrays.
2234 (g95_build_dummy_array_decl): Use descriptorless arrays.
2235 * trans-expr.c (g95_conv_expr_present): Allow descriptorless arrays.
2236 (g95_trans_pointer_assign): Fix typo.
2237 * trans-intrinsic.c (g95_conv_intrinsic_function_args): Remove dead
2239 (g95_conv_intrinsic_bound): Rewrite to handle descriptorless arrays.
2240 * trans-types.c (g95_get_nodesc_array_type): Allow non-packed arrays.
2241 Also modify callers.
2242 * trans-types.h (g95_get_nodesc_array_type): Modify prototype.
2244 2003-03-08 Paul Brook <paul@nowt.org>
2246 * trans-array.c (g95_walk_elemental_functions): Don't reverse the SS.
2247 (g95_conv_array_ubound): Provide dummy value for assumed size arrays.
2248 * resolve.c (compare_spec_to_ref): Allow full array sections.
2250 2003-03-08 Paul Brook <paul@nowt.org>
2252 * expr.c (g95_simplify_expr): Also simplify array index and
2253 substring expressions.
2254 * resolve.c (compare_spec_to_ref): Check for assumed size bounds.
2255 * trans-array.c (g95_trans_array_bounds): New function.
2256 (g95_trans_auto_array_allocation): Use it.
2257 (g95_trans_assumed_size): Rewrite.
2258 * trans-decl.c (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2259 (gfor_fndecl_repack): Remove.
2260 (g95_build_qualified_array): Handle absent upper bounds.
2261 (g95_build_dummy_array_decl): Assumed shape arrays are descriptorless.
2262 (g95_get_symbol_decl): Update.
2263 (g95_build_intrinsic_function_decls): Initialize new decls.
2264 * trans.h (gfor_fndecl_in_pack, gfor_fndecl_in_unpack): Declare.
2265 (gfor_fndecl_repack): Remove.
2266 * trans-io.c (g95_build_io_library_fndecls): Correct prototypes.
2267 * trans-types.c: (g95_build_array_type): Merge duplicated code..
2268 (g95_get_nodesc_array_type): Handle absent bounds.
2269 * trans-types.h (g95_get_nodesc_array_type): Declare.
2271 2003-03-04 Paul Brook <paul@nowt.org>
2273 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_3): Define before including
2276 2003-03-02 Paul Brook <paul@nowt.org>
2278 * options.c (g95_init_options): Drfault to 1.
2279 (g95_pasrse_arg): Add -frepack-arrays, use strcmp.
2280 * trans-array.c (g95_conv_array_data, g95_conv_array_base,
2281 g95_conv_array_stride,g95_conv_array_lbound, g95_conv_array_ubound):
2282 Handle non-constant size automatic arrays.
2283 (g95_conv_section_upper_bound, g95_conv_section_startstride): Use
2284 generic bound functions.
2285 (g95_trans_auto_array_allocation): Don't create a descriptor.
2286 (g95_trans_assumed_size): New function (broken).
2287 (g95_trans_dummy_array_bias): Remove unused var.
2288 * trans-array.h (g95_trans_assumed_size): Declare.
2289 * trans-decl.c (create_index_var): New fuction.
2290 (g95_build_qualified_array): New function.
2291 (g95_get_symbol_decl): Use it.
2292 (g95_trans_deferred_vars): Handle assumed shape seperately.
2293 * trans-types.c (get_element_type): Handle heap allocated arrays.
2294 (g95_is_nodesc_array): Include non-const size arrays.
2295 (g95_get_nodesc_array_type): Ditto.
2297 2003-02-23 Paul Brook <paul@nowt.org>
2299 * trans-array.c (g95_array_init_size): Should use stride, not size of
2302 2003-02-18 Paul Brook <paul@nowt.org>
2304 * trans-expr.c (g95_trans_arrayfunc_assign): Nove elemental check
2305 after intrinsic function check.
2307 2003-02-18 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2309 * io.c (match_io): Fix missing return value and remove useless
2311 * match.c (g95_match): Remove useless assignment.
2312 * module.c (parse_string): Remove useless post increment.
2313 * simplify.c (g95_simplify_verify): Remove useless assignment.
2315 2003-02-15 Paul Brook <paul@nowt.org>
2317 * expr.c (restricted_intrinsic): Handle bad values gracefully.
2318 * g95.h (symbol_attribute): Add referenced member.
2319 (g95_symbol): Add dummy_order member.
2320 (g95_set_sym_referenced): Declare.
2321 * match.c (g95_match_assignment, g95_match_call): Use it
2322 * primary.c (match_actual_arg, g95_match_rvalue,
2323 g95_match_variable): Ditto.
2324 * symbol.c (next_dummy_order): New variable.
2325 (g95_set_sym_referenced): New function.
2326 (check_done): New function.
2327 (g95_add_*): Use it.
2328 * trans-decl.c: Make formatting conform to GCC standards.
2329 (g95_defer_symbol_init): Add dummy variables in the right order.
2330 (g95_get_symbol_decl): Only accept referenced variables.
2331 (g95_create_module_variable): Module variables are always required.
2332 (generatr_local_decls): New function.
2333 (generate_local_vars): New function.
2334 (g95_generate_function_code): Use it.
2336 2003-02-13 Paul Brook <paul@nowt.org>
2338 * trans-decl.c (g95_conv_struct_cons): Remove.
2339 (g95_get_symbol_decl): Use g95_conv_expr for structure initializers.
2340 * trans-expr.c (g95_conv_structure): New function.
2341 (g95_conv_expr): Use it.
2343 2003-02-09 Paul Brook <paul@nowt.org>
2345 * trans-array.c (g95_array_init_size): Don't evaluate the linit
2346 expressions multiple times.
2347 (g95_trans_auto_arry_allocation): Use pointer not tmp.
2349 2003-02-08 Paul Brook <paul@nowt.org>
2351 * module.c (mio_symtree_ref): Declare as static.
2352 (mio_expr): Remove dead code.
2353 (read_module): Set the symtree link for fixups.
2354 * trans-intrinsic.c (g95_conv_intrinsic_round): Rename...
2355 (build_round_expr): ... to this.
2356 (g95_conv_intrinsic_aint): New function.
2357 (g95_conv_intrinsic_function): Use it.
2359 2003-02-08 Paul Brook <paul@nowt.org>
2361 * trans-array.c (g95_trans_array_constructor_value): Use the acutal
2362 offset after modificaton, not the increment expression.
2363 * dependency.c: Kill excess whitespace.
2365 2003-02-07 Sanjiv Gupta <sanjivg@noida.hcltech.com>
2367 * dependency.h: Remove some function declarations.
2368 * dependency.c (get_no_of_elements): Change this function not to
2370 * other: Add comments for all modified functions.
2372 2003-02-06 Paul Brook <paul@nowt.org>
2374 * g95spec.c (lang_specific_functions): Fix initializer warning.
2375 * dump-parse-tree.c (g95_show_expr): Use typespec instead of symtree
2376 for structure type names.
2377 * trans-decl.c (g95_cons_structure_cons): New function.
2378 (g95_get_symbol_decl): Use it.
2379 * trans-expr.c (g95_conv_component_ref): Remove duplicate pointer
2382 2003-02-06 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2384 * resolve.c (compare_cases): Add const to casts.
2386 2003-01-30 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2388 * g95.h (g95_check_f): Change a1 to f1m.
2389 * intrinsic.c (add_sym_1m, check_specific,
2390 g95_intrinsic_func_interface): Use it.
2392 * module.c (init_pi_tree): Remove useless cast.
2393 (fp2): Fix argument type.
2395 * parse.c (parse_select_block): Add comment.
2397 2003-02-05 Toon Moene <toon@moene.indiv.nluug.nl>
2399 * lang-options.h: Fix warning involving C90 concatenated
2402 2003-02-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
2403 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2405 * io.c (format_asterisk): Complete initializer to kill warning.
2406 * arith.c (DEF_G95_INTEGER_KIND, DEF_G95_LOGICAL_KIND,
2407 DEF_G95_REAL_KIND, MPZ_NULL, MPF_NULL): New #defines.
2408 (g95_integer_kinds, g95_logical_kinds, g95_real_kinds): Use the
2409 new defines to complete initializers. Kills all warnings.
2411 * Make-lang.in: Comment cleanup.
2413 2003-02-05 Paul Brook <paul@nowt.org>
2415 * array.c (g95_free_constructor): Handle NULL expressions.
2416 * resolve.c (resolve_structure_cons): Ditto.
2417 * decl.c (g95_match_null): New Function.
2418 (variable_decl): Use it.
2419 * module.c (mio_expr): Don't bother saving symtree for EXPR_STRUCTURE.
2420 * primary.c (g95_match_runtime): Don't use symtree for EXPR_STRUCTURE.
2421 * trans-types.c (g95_set_decl_attributes): Remove empty function.
2423 2003-02-05 Paul Brook <paul@nowt.org>
2425 * trans.h (build1_v): New macro.
2426 (build_v): Remove pointless and incorrect prototype.
2427 * various: Use build1_v for GOTO_EXPR and LABEL_EXPRs.
2428 * f95-lang.c (g95_init_builtin_decls): DEF_BUILTIN takes 10 args.
2430 2003-02-01 Steven Bosscher <s.bosscher@student.tudelft.nl>
2432 * Make-lang.in (F95_OBJS): Remove one more dead file.
2434 2003-02-01 Paul Brook <paul@nowt.org>
2436 * lang-specs.h: Don't pass -ffixed-form to the linker.
2437 * trans-decl.c (g95_generate_function_code): Clear saved decl chain.
2439 2003-02-01 Paul Brook <paul@nowt.org>
2441 * Make-lang.in (F95_OBJS): Remove dead files.
2442 * trans-array.c (g95_array_init_size): Do the right thing when
2444 * trans-decl.c (g95_generate_function_code): Initialize deffered
2445 symbol list before translating contained subroutines.
2446 * trans-expr.c (g95_conv_expr, g95_conv_expr_reference): Substitute
2447 scalar invariant values here...
2448 (g95_conv_variable, g95_conv_function_call): ... instead of here ...
2449 * trans-intrinsic.c (g95_conv_intrinsic_function_args): .. and here.
2451 2003-01-29 Paul Brook <paul@nowt.org>
2453 * trans-array.c (g95_add_loop_code): Put pre code in the right block.
2454 (g95_walk_elemental_function_args): Reverse chains before adding.
2455 (g95_reverse_ss): Move about a bit.
2456 * trans-expr.c (g95_conv_function_call): Handle scalar intrinsic
2459 2003-01-28 Paul Brook <paul@nowt.org>
2461 * intrinsic.c (resolve_intrinsic): Use correct union member.
2462 * trans-array.c (g95_trans_dummy_array_bias): Don't touch absent
2464 * trans-decl.c (g95_get_symbol_decl): Don't translate initializers for
2465 use associated variables.
2466 * trans-intrinsic.c (g95_conv_intrinsic_present): Move body ...
2467 * trans-expr.c (g95_conv_expr_present): ... to here.
2468 * trans.h: Declare it.
2469 * trans-types.c (g95_sym_type): Assume subroutine if not specified.
2471 2003-01-28 Arnaud Desitter <arnaud.desitter@geography.oxford.ac.uk>
2473 * array.c (expand_iterator): Suppress useless assignment.
2474 * decl.c (match_char_spec): Ditto.
2475 * io.c (match_io_iterator): Ditto.
2476 * primary.c (match_real_constant): Ditto.
2477 * interface.c (fold_unary, g95_free_interface, g95_extend_expr):
2478 Ditto. Also, use g95_intrinsic_op not int for intrinsic operators.
2479 * matchexp.c (match_add_operand, match_level_5): Likewise.
2480 * module.c (parse_atom, find_enum): Likewise.
2481 * resolve.c: move #include <string.h>
2482 (resolve_select): Fix serious typo.
2484 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.n>
2486 * Make-lang.in: Don't build with broken tree-ssa-pre.
2488 2003-01-28 Steven Bosscher <s.bosscher@student.tudelft.nl>
2490 * resolve.c (resolve_index): Add a TODO.
2491 * symbol.c: Remove useless "#include <ctype.h>".
2493 2003-01-27 Paul Brook <paul@nowt.org>
2495 * check.c (check_rest): Allow different type kinds as an extension.
2496 * g95.h (g95_resolve_f): Add f1m.
2497 * intrinsic.c (add_sym_1m, resolve_intrinsic): Use it.
2498 * intrinsic.h: Chenge prototypes for MIN and MAX.
2499 * iresolve.c (g95_resolve_minmax): New function.
2500 (g95_resolve_min, g95_resolve_max): Use it.
2501 * trans-intrinsic.c (g95_trans_intrinsic_minmax): Only evaluate
2503 (g95_conv_intrinsic_present): Fix logic.
2505 2003-01-27 Steven Bossche <s.bosscher@student.tudelft.nl>
2507 * g95.h (g95_case): Don't be a tree, be a double linked list.
2508 * match.c (match_case_selector): Remove redundant semantics check.
2509 Clean up a few goto's to make it a tiny little bit faster.
2510 * resolve.c (case_tree): Die.
2511 (compare_cases): Accept and compare unbounded cases too.
2512 (check_case_overlap): Don't build a tree. Instead, merge-sort the
2513 whole list of g95_cases passed from resolve_select.
2514 (sane_logical_select): Die.
2515 (check_case_expr): Return FAILURE if a CASE label is of the wrong
2517 (resolve_select): Fixup case expression for computed GOTOs, put it
2518 in expr, not expr2, for easier handing in the parse tree dumper and
2519 the code generator. Rewrite the rest of the function: Kill
2520 unreachable case labels and unreachable case blocks.
2521 * dump-parse-tree.c (g95_show_code_node): Always dump expr for
2522 an EXEC_SELECT, not case2 anymore.
2523 * trans-const.c (g95_conv_constant_to_tree): New function.
2524 (g95_conv_constant): Use it.
2525 * trans-const.h: Declare prototype for the new function.
2526 * trans-stmt.c (g95_trans_integer_select, g95_trans_logical_select,
2527 g95_trans_character_select): New static functions.
2528 (g95_trans_select): Rewrite.
2530 2003-01-26 Paul Brook <paul@nowt.org>
2532 * intrinsic.c (add_fnctions): Properly add dreal.
2533 * trans-intrinsic.c (g95_conv_intrinsic_present): New function.
2534 (g95_conv_intrinsic_function): Use it.
2535 * trans-io.c (build_dt): Abort on internal files (unimplemented).
2537 2003-01-26 Paul Brook <paul@nowt.org>
2539 Widespread changes to the handling of symbols in expressions. These
2540 are now linked via g95_symtree nodes.
2541 * parse.c (g95_fixup_sibling symbols): New function.
2542 (parse_contained): Use it.
2543 * g95.h (symbol_attribute): Add contained. Indicates a symbol is a
2544 contained procedure that has bee correctly fixed up.
2545 (g95_code, g95_expr): Point to a g95_symtree, not a g95_symbol.
2547 2003-01-24 Paul Brook <paul@nowt.org>
2549 * trans-array.c (g95_walk_expr): Function result attributes are in
2551 * trans-expr.c (g95_conv_function_call,
2552 g95_trans_arrayfunc_assign): Ditto.
2553 * trans-decl.c (g95_get_symbol_for_expr): Set sym->result.
2555 2003-01-23 Steven Bosscher <s.bosscher@student.tudelft.nl>
2557 * expr.c (check_restricted): Fix error message.
2558 * symbol.c (free_st_labels): Plug memleak.
2560 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
2562 * arith.c (reduce_unary, reduce_binary_ac, reduce_binary_ca,
2563 reduce_binary_aa, reduce_binary, eval_intrinsic,
2564 eval_intrinsic_f2): Use typesafe prototypes for eval functions.
2565 * g95.h (g95_check_f, g95_simplify_f, g95_resolve_f): New unions
2566 for typesafe intrinsics helper functions.
2567 (g95_intrinsic_sym): Use them.
2568 * intrinsic.c (do_check, add_sym, add_sym_0, add_sym_1,
2569 add_sym_1s, add_sym_1m, add_sym_2, add_sym_3, add_sym_4,
2570 add_sym_5, add_conv, resolve_intrinsic, do_simplify,
2571 check_specific, g95_intrinsic_func_interface,
2572 g95_intrinsic_sub_interface): Adjust all calls to intrinsics
2574 * trans-decl.c (g95_get_extern_function_decl): Likewise.
2575 * Make-lang.in: Don't disable warnings for strict prototypes
2576 any longer, everything is typesafe now.
2578 2003-01-22 Steven Bosscher <s.bosscher@student.tudelft.nl>
2580 * bbt.c (duplicate_node): Make static.
2581 * module.c (module_name): Make static.
2582 * scanner.c (include_dirs): Make static.
2584 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2586 Hard coded _gfor_'s should not show up anymore.
2587 * g95.h (PREFIX): New macro.
2588 * iresolve.c (g95_resolve_cpu_time): Use PREFIX, not
2590 (g95_resolve_random_number): Likewise.
2591 * trans-decl.c (g95_build_intrinsic_function_decls): Likewise.
2592 * trans-io.c: Remove 'prefix' macro. Replace all uses with
2593 the new PREFIX macro from g95.h.
2595 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2597 The troubles of forking... Andy implemented this just now too.
2598 Let's stick to that and keep the trees close.
2599 * g95.h (g95_st_label): 'format' member is now a g95_expr.
2600 * io.c: Revert previous changes.
2601 (g95_match_format): Match the format string as a character
2603 * match.h (g95_statement_label): Declare external.
2604 * parse.c: Revert previous changes.
2605 * symbol.c (g95_free_st_label): Free a g95_expr instead
2607 * trans-io.c: Revert previous changes.
2608 (build_dt): Use set_string to set the format string.
2610 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2612 * io.c (format_string): Make non-static.
2613 (g95_match_format): Remember the format string.
2614 (terminate_io): Add I/O termination for empty I/O lists.
2615 * match.h: Declare external format_string.
2616 * parse.c (check_statement_label): Attack the format string
2617 to a format label for FORMAT statements.
2618 * trans-io.c (g95_add_field): Define prefix macro. Replace
2619 all uses of PREFIX define with a use of this macro.
2620 (build_dt): Implement formatted I/O for format labels.
2622 2003-01-20 Steven Bosscher <s.bosscher@student.tudelft.nl>
2624 * lang-options.h: Kill "-std=F".
2625 * options.c: Remove unimplemented "-std=F". Modify
2627 * misc.c (g95_terminal_width): New function.
2628 * error.c (g95_error_init_1): Use g95_terminal_width.
2629 * g95.h: Add prototype for g95_terminal_width, remove
2632 2003-01-19 Steven Bosscher <s.bosscher@student.tudelft.nl>
2634 * Make-lang.in: Fix typo.
2636 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
2638 * g95.h (struct g95_case): Remove unused cruft, new member
2639 'where' to keep track of the locus of the default case.
2640 * match.c (g95_match_case): Add locus to the current case.
2641 (match_case_selector): Likewise.
2642 * parse.c (parse_select_block): Move semantics check for
2643 multiple DEFAULT cases out of here to...
2644 * resolve.c (check_case_overlap): ...here. Return sooner
2646 (check_case_expr): Take two g95_cases now, use to sure the
2647 expression kinds are the same.
2648 (resolve_select): Cleanup.
2650 2003-01-18 Paul Brook <paul@nowt.org>
2652 * trans-io.c: Fix typos in ported IO work (set_fla[tg]).
2653 * trans-decl.c (g95_set_symbol_decl): Handle non-array result
2655 (g95_get_extern_function_decl): Put decls in the correct context.
2657 2003-01-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
2659 * trans-io.c: Port changes from Andy to set ERR flag.
2661 2003-01-17 Paul Brook <paul@nowt.org>
2663 * trans-array.c: Add various comments.
2664 (g95_ss_terminator): Declare as const.
2665 (g95_walk_expr): Remove first parameter and update all callers.
2666 (g95_walk_op_expr): Initialize scalar SS properly.
2667 * trans-array.h (g95_walk_expr): Update prototype.
2668 * trans-expr.c: Update for new g95_walk_expr.
2669 * trans-intrinsic.c: Ditto.
2670 * trans-io.c: Ditto.
2671 * trans.h: Various comments for SS chains.
2673 2003-01-17 Paul Brook <paul@nowt.org>
2675 * intrinsic.h (g95_generic_isym_id): Add G95_ISYM_S?_KIND, SPACING
2677 * intrinsic.c (add_functions): Use them.
2678 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto.
2679 * trans-expr.c (g95_conv_expr_lhs): Abort on impossible error.
2681 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2683 Fallout of a small merge conflict:
2684 * intrinsic.c: Un-revert lost patch (G95_ISYM_SCALE).
2686 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2688 * initrinsic.c: New add_sym_* functions for strong typing.
2689 (add_conv): Make prototype strict.
2690 * dump-parse-tree.c, dependency.c: Include config.h
2691 * resolve.c, trans-io.c: Fix typos.
2693 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2695 * dump-parse-tree.c (g95_show_code_node): Show the
2696 condition for a computed GOTO that was transformed
2697 to a SELECT CASE construct.
2698 * resolve.c (check_case_overlap): Revert previous switch
2699 to treaps, it was too slow and didn't catch all trouble.
2700 (resolve_symbol): Be more flexible about module procedures.
2701 * symbol.c (check_conflict): Point to relevant section in
2702 the standard for dubious conflict. Allow procedure
2703 dummy arguments to be optional again.
2704 * trans-io (add_field): Rename to g95_add_field. Change
2706 * trans-stmt (trans_select): Handle unbounded cases for
2707 integer SELECT CASE constructs. Fix/add more comment.
2709 2003-01-17 Steven Bosscher <s.bosscher@student.tudelft.nl>
2711 * g95.h: Uses GCC's function attribute macros.
2712 * error.c, module.c, parse.c, g95.h: More function attributes.
2714 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
2716 * trans-decl.c (get_label_decl): Use TREE_LINENO instead
2717 of DECL_SOURCE_LINE, and TREE_FILENAME instead of
2720 2003-01-16 Steven Bosscher <s.bosscher@student.tudelft.nl>
2722 * f95-lang.c (pushdecl): Use TREE_LINENO instead of
2724 * trans.c (g95_trans_code): Use annotate_all_with_file_line
2725 instead of nowdead wrap_all_with_wfl.
2727 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
2729 * parse.c (g95_parse_file): In verbose mode, dump the parse tree
2730 before generating code, so we can still see it even if the code
2731 generation phase dies.
2733 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
2735 * decl.c (build_sym): Split out initialization expression parts...
2736 (add_init_expr_to_sym): ...to here.
2737 (variable_decl): Add the symbol following an attribute list to the
2738 symbol tree before parsing the optional initialization expression
2739 if the symbol is not of a derived type.
2740 * primary.c (g95_match_rvalue): Don't assume a symbol always has
2741 a value if it is a PARAMETER.
2743 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
2745 * misc.c: Don't #include <mcheck.h>
2746 * module.c: Ditto. Kill uses of mtrace, muntrace. If there
2747 ever was a glibc bug, then either this was never reported to
2748 glibc people, or it has been fixed for so long that there's
2749 no information you can find about it, anywhere.
2751 2003-01-14 Steven Bosscher <s.bosscher@student.tudelft.nl>
2754 * module.c (attr_bits, bt_types, array_spec_types):
2755 Switch 'const' and 'static'.
2756 * iresolve.c (g95_resolve_reshape): Make __resolve0 non-'const'.
2758 GNU'ify source code:
2759 * trans-io.c: Numerous fixes, one fixed warning and a few
2760 TODO markers so that we don't forget about them.
2762 2003-01-13 Paul Brook <paul@nowt.org>
2764 * intrinsic.c (add_functions): Add G95_ISYM_SCALE.
2765 * intrinsic.h (g95_generic_isym_id): Remove bogus G95_ISYM_ANINIT.
2767 * trans-intrinsic.c (g95_conv_intrinsic_function): Ditto
2768 * match.c (g95_match_stop): Fix dumb == -> != error.
2770 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
2772 * dump-parse-tree.c (show_indent): Add line breaks. This
2773 whole dumping process needs cleanups.
2774 * f95-lang.c (g95_mark_addressable): Fix prototype to match
2775 the langhook. Fix 'return's accordingly.
2776 * g95-support.h: Adjust prototype.
2777 * g95.h: Add 'no_backend' member to 'g95_option_t' struct.
2778 * lang-options.h: Add '-fsyntax-only'.
2779 * options.c (g95_init_options): Init 'no_backend'.
2780 (g95_parse_arg): Deal with '-fsyntax-only'.
2781 * parse.c (g95_parse_file): Do not generate code if 'no_backend'
2784 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
2786 * resolve.c (resolve_symbol): Assumed shape arrays must be dummy
2787 arguments. Also make sure that if a symbol is marked INTRINSIC,
2788 an intrinsic with the symbol's name actually exists.
2789 (check_conflict): Make EXTERNAL and DIMENSION attributes conflict.
2790 Do not allow PROCEDURES to have the SAVE, POINTER, TARGET,
2791 ALLOCATABLE, RESULT, IN_NAMESPACE, OPTIONAL or FUNCTION attribute.
2793 2003-01-13 Steven Bosscher <s.bosscher@student.tudelft.nl>
2795 * resolve.c (resolve_contained_functions): Fix condition, don't
2796 throw internal_error if a child namespace has no name. Apparently
2797 this can be the case?
2799 2003-01-11 Paul Brook <paul@nowt.org>
2801 Port changes from Andy's tree:
2802 * g95.h (g95_code): Add stop_code.
2803 * match.c (g95_match_stop): Detter syntax checking.
2804 * resolve.c (resolve_generic_f0): Return match type.
2805 (resolve_generic_f): Remove dead/duplicated code.
2806 (resolve_specific_f): Ditto.
2807 * dump-parse-tree.c (g95_show_code_node): Handle new STOP format.
2808 * trans-decl.c (gfor_fndel_stop_*): New fndecl nodes.
2809 * trans-stmt.c (g95_trans_stop): Handle new STOP format.
2811 2003-01-11 Paul Brook <paul@nowt.org>
2813 * trans-array.c: Various documentation/comment changes.
2814 * trans-stmt.c: Ditto.
2817 2003-01-10 Paul Brook <paul@nowt.org>
2819 * options.c/h: Add -fdump-parse-tree as alias of -v.
2821 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2823 * dump-parse-tree.c (g95_show_namespace): Fixed another
2824 typo. Sorry, it's Friday...
2826 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2829 * trans-array.c, trans-array.h, trans.c, trans-const.c,
2830 trans-const.h, trans-decl.c, trans-expr.c, trans.h
2831 trans-intrinsic.c, trans-io.c, trans-stmt.c, trans-stmt.h
2832 trans-types.c: Fix bogus copyright years, add 2003.
2833 * trans-types.h: Give copyright header.
2835 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2837 * dump-parse-tree.c (g95_show_namespace): Fixed typo.
2838 * expr.c, options.c, scanner.c: Add some more 'const' markers.
2839 * intrinsic.c: Some constant strings moved to read-only memory.
2840 * io.c (format_asterisk): Move to...
2843 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2845 * dump-parse-tree.c (g95_show_namespace): Dump implicit
2846 types for ranges instead of per-letter. Indent the
2847 'CONTAINS' just like everything else.
2848 * resolve.c (resolve_contained_functions): Clarify comment.
2849 Explain non-obvious conditional expression. Improve
2850 diagnostics if tyoe cannot be resolved.
2851 Port semi-fix from Andy's tree:
2852 (was_declared): Move up before first use.
2853 (generic_sym, specific_sym): New functions. Code moved
2854 out if procedure_kind.
2855 (procedure_kind): Simplify using new functions.
2856 (resolve_generic_f): Make sure the functions we find in
2857 a parent namespace is generic.
2858 (resolve_specific_f): Ditto for specific functions.
2860 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2862 * trans-stmt.c, trans.c: Fix some code style issues. Add
2863 some more comment (but still not enough!).
2865 2003-01-10 Steven Bosscher <s.bosscher@student.tudelft.nl>
2867 * symbol.c (flavors, procedures, intents, acces_types,
2868 access_types, ifsrc_types): Make const.
2869 * misc.c (g95_string2code): Make 'm' param 'const'.
2870 * module.c (find_enum, write_atom, mio_name): Make
2872 (attr_bits, bt_types, array_spec_types, array_ref_types,
2873 ref_types, expr_types): Make const.
2874 * g95.h: Adjust external decls.
2876 2003-01-09 Paul Brook <paul@nowt.org>
2878 * Testsuite: Add a load of new cases.
2880 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
2882 * Make-file.in: Add dependency on back end header files;
2883 a parallel build should work now.
2884 * f95-lang-c (lang_identifier): Remove bogus comment.
2885 (g95_be_parse_file): Fix prototype.
2886 (g95_init): Make static.
2887 (g95_finish): Make static.
2888 * error.c (g95_syntax_error): Kill. Make define in...
2889 * g95.h (g95_syntax_error): Define.
2890 (g95.options): Make 'source' member 'const'.
2891 * interface.c (g95_match_interface): Explain
2892 hard-to-read condition.
2893 (g95_match_end_interface): Ditto.
2894 * trans_const.c (g95_build_string_const): Make 's' parameter
2896 * trans_const.h: Adjust protoype accordingly.
2897 * trans-decl.c: Include tree-dump.h
2898 (g95_generate_function_code): Build fixes for recent changes
2899 in the tree-ssa branch.
2901 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
2903 * format.c: Kill, move code from here...
2905 * Make-lang.in: Adjust.
2908 * BUGS: Mention where to submit bugs. Move old content...
2909 * TODO: ...to here. New file.
2911 2003-01-08 Steven Bosscher <s.bosscher@student.tudelft.nl>
2912 Fix most warnings, and suppress the ones we can't fix for now.
2913 * Make-lang.in: Suppress warnings about bad proto's in g95.h,
2914 these warnings just clutter the screen and there's not much
2915 we can do about them for now anyway.
2916 * check.c, iresolve.c: Mark unused function parameters.
2917 * dump-parse-tree.c (g95_show_array_spec): Punt on AS_UNKNOWN,
2918 they should be resolved before they get here.
2919 * error.c: Remove unused FILE *status_out.
2920 * f95-lang.c (g95_init): Remove bogus cast.
2921 * Many files: Make things 'const' where required.
2922 * g95.h: Fix prototypes for all modified functions above.
2923 (g95_options): Remove 'object' member.
2925 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
2927 * Make-file.in: Cleanup bogus targets. Add more comment.
2928 * lang-options.h: New option '-w'.
2929 * g95.h: add no_options field to struct g95_options.
2930 * options.c (g95_init_options): Default no_warnings to off.
2931 (g95_parse_arg): Recognise the '-w' switch and its alias,
2933 * error.c (g95_warning, g95_warning_now): Don't emit warning if
2934 no_warning option is set.
2935 * iresolve.c (g95_resolve_shape): Fix warning.
2937 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
2939 * primary.c (g95_next_string_char): Rename next_string_char, and
2940 make static. Adjust callers accordingly.
2941 * resolve.c (resolve_generic_f0): Return try, not match. Adjust
2942 callers accordingly.
2943 * g95.h: Split out all g95_match* functions to...
2944 * match.h: ...here. New file.
2945 * array.c, decl.c, expr.c, format.c, interface.c, io.c, match.c,
2946 matchexp.c, module.c, parse.c, primary.c: Inlcude match.h
2948 2003-01-07 Steven Bosscher <s.bosscher@student.tudelft.nl>
2950 * symbol.c (g95_clear_new_implicit, g95_add_new_implicit_range,
2951 g95_merge_new_implicit): New functions.
2952 (g95_match_implicit_none, g95_match_implicit): Move from here...
2953 * match.c (g95_match_implicit_none, g95_match_implicit): ... to here.
2954 Modify to use the new functions in symbol.c.
2955 * g95.h: Add and move prototypes.
2957 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
2959 * bbt.c (insert): Use a typedef'ed compare_fn prototype for the
2960 node compare function.
2961 (g95_insert_bbt): Likewise.
2962 (g95_insert_bbt_with_overlap): Likewise.
2963 (g95_delete_bbt): Likewise.
2964 (delete_treap): Likewise. Also fix a potential bug when calling it.
2965 * module.c (compare_pointers): Change proto to compare_fn.
2966 (compare_integers): Likewise.
2967 (compare_true_names): Likewise.
2968 (find_true_name): Adjust call to compare_true_names to match proto.
2969 (require_atom, write_atom, mio_name): Fix 'const' warnings.
2970 (init_pi_tree): Make compare a compare_fn instead of (int *).
2971 * resolve.c (compare_cases): Change proto to compare_fn.
2972 * symbol.c (g95_compare_symtree): Change proto to compare_fn, make
2973 it static, and rename to compare_symtree.
2974 (delete_symtree, g95_undo_symbols, g95_new_symtree): Use renamed
2976 * g95.h: Kill g95_compare_symtree prototype. Adjust prototypes
2977 of g95_insert_bbt, g95_insert_bbt_with_overlap, and g95_delete_bbt.
2979 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
2980 * Make-lang.in: Fix spaces/tabs issues from previous patch.
2981 * patch.options: Blow away Paul's checkin mistake :-)
2982 * io.c (terminate_io): Fix memory leak (Arnaud).
2984 2003-01-06 Steven Bosscher <s.bosscher@student.tudelft.nl>
2986 * Make-lang.in: Teach about building DVI, info manual.
2987 * g95.texi: New file.
2989 2003-01-02 Paul Brook <paul@nowt.org>
2991 * trans-array.c (g95_reverse_ss): Make static and don't use.
2992 (g95_conv_ss_descriptor): Don't use g95_loopinfo
2993 (g95_conv_array_parameters): Modify for pointer assignments.
2994 (g95_walk_subexpr): New function.
2995 (g95_walk_expr*): Use it.
2996 * trans-array.h (g95_reverse_ss): Remove prototype.
2997 * trans-expr.c (g95_trans_pointer_assign): Implement.
2998 (Many): Set se.want_pointer before calling g95_conv_array_parameter.
2999 * trans-intrinsic.c: Sync with scalarizer changes.
3000 * trans-io.c: Ditto.
3002 2002-12-29 Paul Brook <paul@nowt.org>
3004 * trans-array.c: Document calling convention for arrays.
3006 2002-12-19 Paul Brook <paul@nowt.org>
3008 * trans-intrinsic.c (g95_conv_intrsinsic_function): Remove incorrect
3009 assertion. Remove intrinsic subroutine G95_ISYM_* cases. Always pass
3010 optional parameters for some intrinsics.
3011 (g95_is_intrinsic_libcall): Add G95_ISYM_RESHAPE.
3012 * trans-expr.c (g95_conv_function_call): Pass NULL for absent
3013 optional parameters.
3014 * trans.h (g95_se): Add ignore_optional flag.
3016 2002-12-15 Paul Brook <paul@nowt.org>
3018 * trans-array.c (g95_conv_array_parameter): Fix partial rank sections.
3019 * trans-decl.c (g95_generate_function_code): Use TDI_original.
3021 2002-12-14 Paul Brook <paul@nowt.org>
3023 * trans-stmt.c (g95_trans_call): Use resolved symbol name.
3025 2002-12-12 Paul Brook <paul@nowt.org>
3027 * trans-array.c (g95_trans_array_constructor_subarray): Fully
3028 initialize the scalarizer.
3029 (various): Update to new format of g95_expr->value.constructor.
3031 2002-12-08 Paul Brook <paul@nowt.org>
3033 * trans-array.c (g95_put_offset_into_var): New function.
3034 (g95_trans_array_constructor_subarray): New function.
3035 (g95_trans_array_constructor_value): Use it.
3036 (g95_array_cons_size): Don't abort() on array components.
3038 2002-12-08 Paul Brook <paul@nowt.org>
3040 * Make-lang.in (F95_ADDITIONAL_OBJS): Remove tree-dchain.o.
3041 * support.c: Update #includes.
3042 (statement_code_p, c_size_in_bytes, s_size_type_node): Remove.
3043 * trans-array.c: Update #includes.
3045 * trans-const.c: Ditto.
3046 * trans-io.c: Ditto.
3047 * trans-types.c: Ditto.
3048 (g95_init_types): Set size_type_node.
3049 * trans-decl.c: Update #includes.
3050 (gfor_fndecl_adjust{l,r}): Declare and initialize.
3051 * trans-stmt.c: Update #includes.
3052 (g95_trans_do_while): Generate LABEL_EXPR, not GOTO_EXPR.
3053 (g95_trans_select): Fix check for unbounded ranges.
3054 * trans-expr.c: Update #includes.
3055 (g95_conv_string_tmp): New function.
3056 (g95_conv_concat_op): Use it.
3057 * trans.h (g95_conv_string_tmp, gfor_fndecl_adjust{l,r}): Declare.
3058 * Trans-intrisic.c: Update #includes.
3059 (g95_conv_intrinsic_strcmp): New function.
3060 (g95_conv_intrinsic_adjust): Ditto.
3061 (g95_conv_intrinsic_function: Use them.
3063 2002-11-30 Paul Brook <paul@nowt.org>
3065 * trans-array.c (g95_walk_function_expr): Handle non-array return by
3067 * trans-dec.c (g95_build_function_decl): Handle character return
3069 (g95_get_fake_result_decl): Ditto.
3070 (g95_trans_deferred_vars): Ditto.
3071 * trans-expr.c (g95_conv_function_call): Ditto.
3072 (g95_trans_arrayfunc_assign) Limit to array valued functions.
3073 * trans-intrinsic.c (g95_conv_intrinsic_char): New function.
3074 (g95_conv_intrinsic_function): Use it.
3075 * trans-types.c (g95_sym_type): Handle functions returning strings.
3076 (g95_return_by_reference): Ditto.
3077 (g95_get_function_type): Ditto.
3079 2002-11-18 Paul Brook <paul@nowt.org>
3081 * trans-stmt.c (g95_trans_if): Fix IF statements when the condition
3082 requires a temporary.
3083 (g95_trans_select): Handle computed gotos.
3084 * trans-types.c (g95_build_array_type): Warn about non-functional
3085 assumed shape arrays.
3086 * trans-expr.c (g95_trans_scalar_assign): Correctly handle post
3088 * trans-intrinsic.c (g95_conv_intrinsic_round): New function.
3089 (g95_conv_intrinsic_int): New function.
3090 (g95_conv_intrinsic_mod): New function.
3091 (g95_conv_intrinsic_ichar): New function.
3092 (g95_conv_intrinsic_function): Use them.
3093 (g95_conv_intrinsic_dim): Use g95_evaluate_now.
3095 2002-11-17 Toon Moene <toon@moene.indiv.nluug.nl>
3097 * trans-types.c (g95_build_array_type): Assumed
3098 sized arrays can have rank > 1.
3099 * trans.c (g95_trans_code): Remove erroneous
3100 warning about CONTINUE.
3101 * trans-expr.c (g95_conv_variable): Remove
3104 2002-11-15 Paul Brook <paul@nowt.org>
3106 * trans-array.c (g95_conv_array_parameter): Check for NULL stride.
3108 2002-10-31 Paul Brook <paul@nowt.org>
3110 * f95-tree.c: Remove tree copying stuff that's now in gimple.c
3111 * trans-expr.c (g95_conv_component_ref): Handle character string
3113 (g95_conv_string_parameter): Ditto.
3114 * trans-types.c (g95_get_derived_type): Add length decl to caracter
3117 2002-10-10 Paul Brook <paul@nowt.org>
3119 * trans-decl.c (gfor_fndecl_size?): Declare and initialize.
3120 * trans-expr.c (g95_conv_function_call): Remove unreliable return value
3122 * trans-intrinsic.c (g95_conv_intrinsic_size): New function.
3123 (g95_conv_intrinsic_function): Handle size and shape intrinsics.
3124 (g95_is_intrinsic_libcall): Add G95_ISYM_SHAPE.
3125 * trans-types.c (pvoid_type_node): Declare and initialize.
3126 * trans-array.c: Fix typo COMPONENT_REF->REF_COMPONENT
3127 (g95_array_allocate): Fix when base==data.
3128 (g95_conv_array_parameter): Correctly handle reduced rank sections.
3129 * trans-io.c (g95_trans_write): Correctly handle string modifiers.
3131 2002-10-09 Paul Brook <paul@nowt.org>
3133 * (g95_conv_expr_reference): Handle character strings correctly.
3135 2002-10-07 Paul Brook <paul@nowt.org>
3137 (g95_expand_decl): Rename from f95_expand_decl_stmt and use as
3139 * trans-array.c (g95_build_array_initializer): Remove.
3140 (g95_conv_array_initializer): New Function.
3141 (g95_trans_auto_arry_allocation): Cleanup.
3142 (g95_trans_init_character_array): Remove.
3143 * g95spec.c: Link in libgforbegin.
3144 * trans.c (g95_generate_code): Rename main function to MAIN__.
3145 (g95_create_var): New function.
3146 (g95_create_var_np): New function.
3147 (g95_evaluate_now): New function.
3148 (g95_start_block): New function.
3149 (g95_finish_block): New function.
3150 (g95_add_expr_to_block): New function.
3151 (g95_add_block_to_block): New function.
3152 * trans-expr.c (g95_conv_componen_ref): New function.
3153 * Make-lang.in (F95_ADDITIONAL_OBJS): Add gimplify.o.
3154 (F95_OBJS): Add dependency.o.
3155 * f95-lang.c (g95_is_simple_stmt): Remove.
3156 * f95-tree.c (mark_not_simple): New function.
3157 (unshare_all_trees): New function.
3158 (create_tmp_var, create_tmp_alias_var): Remove.
3159 * support.c (declare_tmp_vars, tree_last_decl): Remove.
3160 * trans*: Convert to new IR using GENERIC trees. Don't bother about
3161 SIMPLE/GIMPLE rules, this is now done by Lang-independant code.
3163 2002-10-01 Paul Brook <paul@nowt.org>
3165 * trans-array.c: Add support for descriptorless arrays.
3166 (g95_conv_array_data): New function.
3167 (g95_conv_array_base): New function.
3168 * trans-array.h: Declare these here.
3169 * trans-decl.c(g95_create_mopdule_variable): Perform variable
3170 initialization and creation here.
3171 (g95_create_module_vars): Instead of here.
3172 * trans.h (G95_TYPE_ARRAY_*: Rename from G95_TYPE_DESCRIPTOR_*.
3173 * trans-intrinsic.c: Ditto.
3174 * trans-types.c (g95_is_nodesc_array): New function.
3175 (g95_get_nodesc_array_type): New function.
3176 (g95_sym_type, g95_get_derived_type): Use them.
3177 * trans-const.c (g95_conv_mpf_to_tree): Remove workaround.
3179 2002-09-28 Paul Brook <paul@nowt.org>
3181 * trans-const.c (g95_conv_mpf_to_tree): Work around backend bug.
3182 * trans-intrinsic.c (g95_conv_intrinsic_abs): Correctly detect complex
3185 2002-09-24 Paul Brook <paul@nowt.org>
3187 * f95-lang.c (listify): Remove declaration.
3188 (expand_function_body): Use optimize >=1 instead of flag_tree_saa.
3190 * f95-tree.c (get_name): New function.
3191 * trans.c (module_namespace): Remove.
3192 * trans-decl.c: Use g95_chainon_list rather than chainon(listify()).
3193 * trans-types.c: Ditto.
3195 2002-09-19 Paul Brook <paul@nowt.org>
3197 * trans-array.c (g95_get_array_cons_size): New Function.
3198 (g95_con_ss_startstride): Handle Array constructors.
3199 (g95_conv_loop_setup): Ditto.
3200 (g95_conv_array_parameter): Ditto.
3201 * tras-decl.c (g95_finish_var_decl): Make initializes variables
3204 2002-09-19 Paul Brook <paul@nowt.org>
3206 * trans.c (g95_simple_fold_tmp): Detect variables inside
3208 * trans-stmt.c (g95_trans_arithmetic_if): Implement this.
3210 2002-09-18 Steven Bosscher <s.bosscher@student.tudelft.nl>
3212 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree-ssa-dce.o
3214 2002-09-14 Paul Brook <paul@nowt.org>
3216 * trans.c (g95_create_module_variable): Move to trans-decl.c.
3217 * trans-const.c (g95_conv_string_init): New Function.
3218 * trans-const.h: Declare it.
3219 * trans-decl.c (g95_get_symbol_decl): Handle initializers for static
3220 variables. Don't bail on intrinsic symbols.
3221 (get_extern_function_decl): Handle specific intrinsic functions.
3222 * trans-types.c (g95_sym_type): Dummy functions don't return
3224 * trans-array.c (g95_build_array_initializer): New Function.
3225 (g95_trans_auto_array_allocation): Build initializer for static decls.
3226 Don't use mpz_addmul, it's GMP4 only.
3228 2002-09-12 Paul Brook <paul@nowt.org>
3230 * trans-decl.c (g95_generate_code): Fix thinko with return variable.
3231 (g95_get_extern_function_decl, g95_build_function_decl): Mangle
3232 assembler names for module procedures.
3234 2002-09-11 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3236 * trans-array.c,h trans-expr.c, trans-stmt.c: Correct spelling of
3239 2002-09-10 Paul Brook <paul@nowt.org>
3241 * trans-array.c: Change format of G95_SS_TEMP strictures.
3242 (g95_check_fncall_dependancy): New function.
3243 (trans_dummy_array_bias): stride[n], not stride[n-1]. for calculating
3245 * trans-decl.c (g95_get_symbol_decl): move assertion after handling of
3247 (g95_build_function_decl): Don't assume result arrays are packed.
3248 (g95_trans-deferred-vars): Handle array result variables.
3249 (g95_generate_fuction_code): Clear saved_function_decls.
3250 * trans-expr.c (g95_conv_fnction_call): Handle direct array return by
3252 (g95_trans_arrayfunc_assign): New function.
3253 (g95_trans_assignment): Use it.
3254 * trans.h (g95_ss): Add temp struct for G95_SS_TEMP.
3255 (g95_se): Add direct_byref.
3256 * trans-types.c: Use sym->result rather than sym where appropriate.
3257 * trans-intrinsic.c (g95_conv_intrinsic_funcall): New function.
3258 Update other functions to use this.
3259 (g95_is_intrinsic_libcall): New function.
3260 (g95_conv_intrinsic_function): Add MATMUL and PRODUCT intrinsics.
3261 (g95_walk_intrinsic_function): Ditto.
3263 2002-09-08 Paul Brook <paul@nowt.org>
3265 * trans-types.c: Change rank field to dtype field in array descriptor.
3266 * trans-array.c: Implement filling of dtype array descriptor field.
3267 * trans-intrinsic.c: Fix broken LEN intrinsic.
3269 2002-09-07 Paul Brook <paul@nowt.org>
3271 * trans-intrinsic.c: Remove outdated todo intrinsic list.
3272 (g95_get_symbol_for_expr): Remove hack for fortran based intrinsics.
3273 (g95_walk_intrinsic_function): Add MINLOC and MAXLOC.
3275 2002-09-06 Paul Brook <paul@nowt.org>
3277 * Make-lang.in (F95_ADDITIONAL_OBJS): Add tree_alias_comon.o.
3278 (gt-f95-trans-types.h): Add dependancy information.
3279 * config-lang.in (gtfiles): Add trans-types.c
3280 * f95-lang.c (g95_be_parse_file): Pass error and warning counts
3281 back to top-level code.
3282 * trans-array.c, trans-types.c: Change format of array descriptor.
3283 (g95_conv_descriptor_dimension): New function.
3284 * trans-types.h (g95_conv_descriptor_rank): define.
3285 * trans-intrinsic.c: Implement PRODUCT, COUNT. MINLOC and MAXLOC
3288 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3290 * trans-array.c, trans-types.c: Add rank information to descriptor.
3292 2002-09-06 Tobias Schlueter <Tobias.Schlueter@physik.uni-muenchen.de>
3294 * trans-stmt.c (g95_trans_allocate): Fix when ref==NULL.
3296 2002-09-04 Paul Brook <paul@nowt.org>
3298 * f95-lang.c (g95_create_decls): New function.
3299 (g95_init): Move initialization of external decls to above, and call
3300 from g95_be_parse_file.
3301 * trans.c (g95_finish_stmt): Don't amputate the decl chain.
3302 * trans-types.c (g95_init_types): Always name integer and char types.
3303 (g95_get_array_type_bounds): TYPE_NAME may be a TYPE_DECL.
3305 2002-09-02 Steven Bosscher <s.bosscher@student.tudelft.nl>
3307 * Make-lang.in: Add options.c to F95_PARSER_OBJS
3309 2002-09-02 Paul Brook <paul@nowt.org>
3311 * g95_generate_code: Clear the attr for __fortran_main.
3312 * trans-types.c (g95_finish_type): New function.
3313 * g95_init_io_state_type: Use g95_finish_type.
3314 * g95_conv_intrinsic_anyall: Fix thinko in result initialization.
3316 2002-09-01 Paul Brook <paul@nowt.org>
3318 * README.backend: Warn about the dangers of extra config.h files.
3319 Remove obsolete libgfor stuff.
3320 * config-lang.in: Add target-libgfor dependancy.
3321 * g95_conv_mpf_to_tree: Use & free allocated buffer p rather than buff.
3323 2002-09-01 Toon Moene <toon@moene.indiv.nluug.nl>
3325 * g95_conv_mpz_to_tree: Free storage pointed to by q,
3328 2002-08-30 Paul Brook <paul@nowt.org>
3330 * trans-intrinsic.c (g95_conv_intrinsic_function,
3331 g95_walk_intrinsic_function): Added ANY and ALL.
3332 (g95_conv_intrinsic_anyall): New function.
3333 * iresolve.c (g95_resolve_any, g95_resolve_all): Include rank in