OSDN Git Service

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