OSDN Git Service

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