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