module.c (mio_array_ref): The dimen_type fields of an array ref are an enumerated...
[gcc.git] / gcc / fortran / ChangeLog
1 2007-01-20 Roger Sayle <roger@eyesopen.com>
2
3 * module.c (mio_array_ref): The dimen_type fields of an array ref
4 are an enumerated type and can't be read/written directly with a
5 call to mio_integer. Instead loop over and cast each element.
6
7 2007-01-20 Roger Sayle <roger@eyesopen.com>
8
9 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
10 i.e. that the ARRAY_REF doesn't mention components.
11 * trans-array.c (gfc_constant_array_constructor_p): Export external
12 function renamed from constant_array_constructor_p.
13 (gfc_build_constant_array_constructor): Export.
14 (gfc_trans_array_constructor): Update call to the renamed function
15 constant_array_constructor_p.
16 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
17 (gfc_build_constant_array_constructor): Likewise.
18 * trans-expr.c (gfc_build_memcpy_call): New helper function split
19 out from gfc_trans_array_copy.
20 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
21 (gfc_trans_array_constructor_copy): New function to optimize
22 assigning an entire array from a constant array constructor.
23 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
24 when appropriate.
25
26 2007-01-20 Roger Sayle <roger@eyesopen.com>
27
28 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
29 implementation for the SIGN intrinsic with integral operands.
30 (gfc_conv_intrinsic_minmax): Fix whitespace.
31
32 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
33
34 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
35 * lang.opt: Add -fallow-leading-underscore.
36 * match.c (gfc_match_name): Allow leading underscore in symbol
37 name if -fallow-leading-underscore is used.
38 * symbol.c (gfc_get_default_type): Add special case for symbol
39 names beginning with an underscore.
40 * trans-decl.c (gfc_get_extern_function_decl,
41 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
42 library symbols selected_int_kind, selected_real_kind and
43 all specifics.
44 * options.c (gfc_init_options, gfc_handle_option): Handle the
45 new -fallow-leading-underscore option.
46
47 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
48
49 PR fortran/30446
50 * options.c (gfc_handle_module_path_options): Path used in -J
51 option is now added to the module search path.
52
53 2007-01-20 Richard Guenther <rguenther@suse.de>
54
55 PR fortran/30223
56 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
57 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
58 sincos builtins if the target has sincos.
59
60 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
61
62 * intrinsic.texi (MATMUL): Corrected a typo.
63 (MAX): Separated @var arguments.
64 (MIN): Separated @var arguments.
65
66 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
67
68 * intrinsic.texi: general whitespace cleanup.
69 (menu): Added TIME8, removed UNMASK.
70 (AINT): Clarified argument requirement.
71 (ANINT): Clarified argument requirement.
72 (CEILING): Clarified argument requirement.
73 (CHAR): Clarified argument requirement.
74 (CMPLX): Clarified argument requirement.
75 (DCMPLX): Clarified argument requirement.
76 (FGET): Line rewrapping.
77 (FLOOR): Clarified argument requirement.
78 (GMTIME): Added documentation.
79 (IAND): Added cross-reference.
80 (IBCLR): Added cross-reference.
81 (IBSET): Added cross-reference.
82 (IEOR): Added cross-reference.
83 (INT): Collapsed examples, clarified argument requirement.
84 (IOR): Added cross-references.
85 (LEN_TRIM): Corrected result kind.
86 (LINK): Added cross-reference.
87 (LLT): Removed "documentation pending".
88 (LOGICAL): Added documentation.
89 (LSHIFT): Added documentation.
90 (LTIME): Added documentation.
91 (MATMUL): Added documentation.
92 (MAX): Added documentation.
93 (MAXLOC): Added documentation.
94 (MAXVAL): Added documentation.
95 (MERGE): Added documentation.
96 (MIN): Added documentation.
97 (MINLOC): Added documentation.
98 (MINVAL): Added documentation.
99 (MVBITS): Moved to correct place, added documentation.
100 (NOT): Added documentation.
101 (PERROR): Added documentation.
102 (RAN): Moved to correct place, added documentation.
103 (REAL): Clarified argument requirement.
104 (RENAME): Added documentation.
105 (RSHIFT): Clarified argument requirement.
106 (SIGN): Corrected table specification.
107 (SYMLNK): Added documentation.
108 (SYSTEM): Added documentation.
109 (TIME): Added documentation.
110 (TIME8): Added section and documentation.
111 (UNMASK): Removed erroneous section.
112
113 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
114
115 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
116
117 2007-01-18 Roger Sayle <roger@eyesopen.com>
118
119 * trans-expr.c (copyable_array_p): Consider user derived types without
120 allocatable components to be copyable.
121
122 2007-01-18 Roger Sayle <roger@eyesopen.com>
123
124 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
125 the number of interations in unconditional FORALL nests with constant
126 bounds.
127
128 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
129 Tobias Burnus <burnus@net-b.de>
130
131 PR libfortran/29649
132 * gfortran.h (gfc_option_t): Add flag_dump_core.
133 * lang.opt: Add -fdump-core option.
134 * invoke.texi: Document the new options.
135 * trans-decl.c (gfc_build_builtin_function_decls): Add new
136 options to the call to set_std.
137 * options.c (gfc_init_options, gfc_handle_option): Set the
138 new options.
139
140 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
141
142 PR fortran/30476
143 * module.c (load_generic_interfaces): Make the marking of the
144 symbol as ambiguous conditional on the module names being
145 different.
146 (write_generic): Ensure that the generic interface has a
147 non-NULL module field.
148
149 2007-01-16 Roger Sayle <roger@eyesopen.com>
150
151 PR fortran/30404
152 * trans-stmt.c (forall_info): Remove pmask field.
153 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
154 NVAR covers all the interation variables in the current forall_info.
155 Add an extra OUTER parameter, which specified the loop header in
156 which to place mask index initializations.
157 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
158 Change the semantics of MASK_FLAG to only control the mask in the
159 innermost loop.
160 (compute_overall_iter_number): Optimize the trivial case of a
161 top-level loop having a constant number of iterations. Update
162 call to gfc_trans_nested_forall_loop. Calculate the number of
163 times the inner loop will be executed, not to size of the
164 iteration space.
165 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
166 sizeof(type) == 1. Tidy up.
167 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
168 to gfc_trans_nested_forall_loop.
169 (gfc_trans_pointer_assign_need_temp): Likewise.
170 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
171 LENVAR local variables. Split mask allocation into a separate
172 hunk/pass from mask population. Use allocate_temp_for_forall_nest
173 to allocate the FORALL mask with the correct size. Update calls
174 to gfc_trans_nested_forall_loop.
175 (gfc_evaluate_where_mask): Update call to
176 gfc_trans_nested_forall_loop.
177 (gfc_trans_where_2): Likewise.
178
179 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
180
181 PR fortran/28172
182 * trans-stmt.c (gfc_trans_call): If it does not have one, get
183 a backend_decl for an alternate return.
184
185 PR fortran/29389
186 * resolve.c (pure_function): Statement functions are pure. Note
187 that this will have to recurse to comply fully with F95.
188
189 PR fortran/29712
190 * resolve.c (resolve_function): Only a reference to the final
191 dimension of an assumed size array is an error in an inquiry
192 function.
193
194 PR fortran/30283
195 * resolve.c (resolve_function): Make sure that the function
196 expression has a type.
197
198 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
199
200 PR fortran/30410
201 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
202 symbols must not have the module name prepended.
203
204 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
205
206 PR libfortran/30415
207 * iresolve.c (gfc_resolve_maxloc): If the rank
208 of the return array is nonzero and we process an
209 integer array smaller than default kind, coerce
210 the array to default integer.
211 * iresolve.c (gfc_resolve_minloc): Likewise.
212
213 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
214
215 * simplify.c: Update copyright to 2007.
216 * scanner.c: Same.
217
218 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
219
220 PR fortran/30430
221 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
222 only once!
223
224 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
225
226 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
227 (gfc_simplify_ibset): Same.
228
229 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
230
231 PR 30381
232 PR 30420
233 * simplify.c (convert_mpz_to_unsigned): New function.
234 (convert_mpz_to_signed): New function, largely based on
235 twos_complement().
236 (twos_complement): Removed.
237 (gfc_simplify_ibclr): Add conversions to and from an
238 unsigned representation before bit-twiddling.
239 (gfc_simplify_ibset): Same.
240 (gfc_simplify_ishftc): Add checks for overly large
241 constant arguments, only check the third argument if
242 it's present, carry over high bits into the result as
243 appropriate, and perform the final conversion back to
244 a signed representation using the correct sign bit.
245 (gfc_simplify_not): Removed unnecessary masking.
246
247 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
248
249 PR fortran/30408
250 * resolve.c (resolve_code): Use the code->expr character length
251 directly to set length of llen.
252
253 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
254
255 PR fortran/30408
256 * lang.opt: Add Wcharacter_truncation option.
257 * options.c (gfc_init_options): Initialize
258 gfc_option.warn_character_truncation to zero.
259 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
260
261 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
262
263 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
264 iresolve.c, match.c: Update Copyright years. Whitespace.
265
266 2007-01-08 Richard Guenther <rguenther@suse.de>
267
268 * trans-io.c (transfer_array_desc): Use build_int_cst instead
269 of build_int_cstu.
270
271 2007-01-08 Roger Sayle <roger@eyesopen.com>
272
273 * trans-array.c (constant_array_constructor_p): New function to
274 determine whether an array constructor consists only of constant
275 elements, and if so return it's size.
276 (gfc_build_constant_array_constructor): Construct a statically
277 initialized gfortran array for a given EXPR_ARRAY.
278 (gfc_trans_constant_array_constructor): Efficiently scalarize
279 a constant array constructor.
280 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
281 Special case scalarization of constant array constructors, all of
282 whose elements are specified, using constant_array_constructor_p
283 and gfc_trans_constant_array_constructor.
284 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
285 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
286
287 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
288
289 gfortran.texi: Fix typos.
290
291 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
292
293 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
294 convert.c: Update Copyright dates. Fix whitespace.
295
296 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
297
298 * data.c (gfc_assign_data_value): Fix whitespace.
299
300 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
301
302 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
303 Commentary typo fix.
304
305 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
306
307 PR fortran/27698
308 * match.c (gfc_match_name): Print diagnostics for invalid
309 character in names.
310
311 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
312
313 * array.c: Fix whitespace in comment table.
314
315 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
316
317 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
318
319 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
320
321 * arith.c: Update copyright years. Whitespace.
322
323 2007-01-05 Roger Sayle <roger@eyesopen.com>
324
325 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
326 array assignments split out from gfc_trans_assignment.
327 (gfc_trans_array_copy): New function to implement array to array
328 copies via calls to __builtin_memcpy.
329 (copyable_array_p): New helper function to identify an array of
330 simple/POD types, that may be copied/assigned using memcpy.
331 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
332 whole array assignments considered suitable by copyable_array_p.
333 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
334
335 2007-01-05 Roger Sayle <roger@eyesopen.com>
336
337 * trans-array.c (gfc_trans_array_constructor_value): Make the
338 static const "data" array as TREE_READONLY.
339 * trans-stmt.c (gfc_trans_character_select): Likewise.
340
341 2007-01-05 Roger Sayle <roger@eyesopen.com>
342
343 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
344 stride is one, to avoid fold_build2 introducing a useless
345 NON_LVALUE_EXPR node.
346
347 2007-01-05 Tobias Burnus <burnus@net-b.de>
348
349 * symbol.c (check_conflict): Fix error message.
350
351 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
352
353 PR fortran/23232
354 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
355 functions to signal that a DATA statement is being matched.
356 (gfc_match_data): Call gfc_set_in_match_data on entry and on
357 exit.
358 * gfortran.h : Add prototypes for above.
359 * expr.c (check_init_expr): Avoid check on parameter or
360 variable if gfc_in_match_data is true.
361 (gfc_match_init_expr): Do not call error on non-reduction of
362 expression if gfc_in_match_data is true.
363
364 PR fortran/27996
365 PR fortran/27998
366 * decl.c (gfc_set_constant_character_len): Add boolean arg to
367 flag array constructor resolution. Warn if string is being
368 truncated. Standard dependent error if string is padded. Set
369 new arg to false for all three calls to
370 gfc_set_constant_character_len.
371 * match.h : Add boolean arg to prototype for
372 gfc_set_constant_character_len.
373 * gfortran.h : Add warn_character_truncation to gfc_options.
374 * options.c (set_Wall): Set warn_character_truncation if -Wall
375 is set.
376 * resolve.c (resolve_code): Warn if rhs string in character
377 assignment has to be truncated.
378 * array.c (gfc_resolve_character_array_constructor): Set new
379 argument to true for call to gfc_set_constant_character_len.
380
381 2007-01-05 Tobias Burnus <burnus@net-b.de>
382
383 PR fortran/29624
384 * interface.c (compare_parameter_intent): New function.
385 (check_intents): Support pointer intents.
386 * symbol.c (check_conflict): Support pointer intents,
387 better conflict_std message.
388 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
389 Support pointer intents.
390 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
391 Support pointer intents.
392
393 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
394
395 PR 30371
396 * check.c (gfc_check_kill_sub): Add checks for non-scalar
397 arguments.
398
399 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
400
401 * intrinsic.texi: Minor cleanup, reflowing overlong
402 paragraphs, and correcting whitespace.
403
404 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
405
406 * intrinsic.texi (LBOUND): Add documentation.
407 (LGE): Add documentation.
408 (LGT): Add documentation.
409 (LINK): Add documentation.
410 (LLE): Add documentation.
411 (LLT): Add documentation.
412 (LNBLNK): Add documentation.
413 (UBOUND): Add documentation.
414 (UNLINK): Add documentation.
415
416 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
417
418 * intrinsic.texi (IAND): Clarify argument specifications.
419 (IBCLR): Add documentation.
420 (IBITS): Add documentation.
421 (IBSET): Add documentation.
422 (IEOR): Add documentation.
423 (IERRNO): Add documentation.
424 (INDEX): Add documentation.
425 (IOR): Add documentation.
426 (ISHFT): Add documentation.
427 (ISHFTC): Add documentation.
428 (KILL): Add documentation.
429 (LEN_TRIM): Add documentation.
430
431 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
432
433 PR 30235
434 * interface.c (compare_actual_formal): check for
435 alternate returns when iterating over non-present
436 arguments.
437
438 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
439
440 * invoke.texi: Update manpage copyright to include 2007.
441
442 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
443
444 * gfortran.texi: Update copyright to include 2007.
445 * intrinsic.texi: Update copyright to include 2007.
446 * invoke.texi: Update copyright to include 2007.
447
448 2007-01-02 Tobias Burnus <burnus@net-b.de>
449 Jakub Jelinek <jakub@redhat.com>
450
451 PR fortran/30276
452 * scanner.c (open_included_file): Revert patch.
453 (gfc_open_included_file): Support absolute pathnames.
454 (gfc_open_intrinsic_module): Support absolute pathnames.
455
456 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
457
458 * gfortran.texi (GNU Fortran and GCC): Rewrite
459
460 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
461
462 * gfortran.texi (Introduction): Lower "Part I:
463 Introduction" to a chapter, renumber Parts II and III to
464 Parts I and II.
465 * intrinsic.texi (Introduction): Rename to "Introduction
466 to Intrinsics" to avoid conflict with the new chapter.
467
468 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
469
470 * intrinsic.texi (Introduction): Rewrite first paragraph.
471
472 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
473
474 * invoke.texi (OpenMP): Added index entry.
475 * gfortran.texi (title page): Removed erroneous '*'.
476
477 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
478
479 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
480 to description.
481 (Extensions): Miscellaneous minor rewriting and copyediting.
482 (BOZ-literal constants): Renamed from Hexadecimal constants.
483 (Hollerith constants support): Added explanation and
484 suggestions for standard-conforming modern equivalents.
485
486 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
487
488 * intrinsic.texi: Improvements to index entries; change
489 @findex entries to @cindex entries.
490 * invoke.texi: Standardize and improve index entries.
491 * gfortran.texi: Fix @code in one index entry.
492
493 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
494
495 * invoke.texi: Change @code-type macros to appropriate
496 variants (@command, @option, etc.)
497 * gfortran.texi: Same.
498
499 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
500
501 * intrinsic.texi: Various minor cleanups.
502
503 2007-01-02 Steven G. Kargl <kargls@comcast.net>
504
505 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
506 build_int_cst.
507
508 2007-01-02 Tobias Burnus <burnus@net-b.de>
509
510 PR fortran/30276
511 * scanner.c (open_included_file): Support full-path filenames.
512
513 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
514
515 PR fortran/20896
516 * interface.c (check_sym_interfaces): Remove call to
517 resolve_global_procedure.
518 gfortran.h : Remove prototype for resolve_global_procedure.
519 resolve.c (resolve_global_procedure): Add static attribute
520 to function declaration.
521
522 2007-01-01 Steven G. Kargl <kargls@comcast.net>
523
524 * ChangeLog: Copy to ...
525 * ChangeLog-2006: here.