OSDN Git Service

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