OSDN Git Service

ce305532ed80faabadf1f1fd6ef31ba5befc3d5c
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2007-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2
3         * options.c (set_default_std_flags): New function to consolidate
4         setting the flags.
5         (gfc_init_options): Use new function.
6         (gfc_handle_option): Use new function.
7
8 2007-02-22  Brooks Moses  <brooks.moses@codesourcery.com>
9
10         * gfortran.texi (Old-style kind specifications): Document
11         special handling of old-style kind specifiers for COMPLEX.
12         * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
13         assumptions in comment.
14
15 2007-02-21  Bernhard Fischer  <aldot@gcc.gnu.org>
16
17         * parse.c (next_free): Gooble spaces after OpenMP sentinel.
18
19 2007-02-20  Thomas Koenig  <Thomas.Koenig@online.de>
20
21         PR fortran/30869
22         * match.c (gfc_match_iterator): Remove conflict between
23         loop variable and pointer.
24
25 2007-02-20  Tobias Burnus  <burnus@net-b.de>
26
27         PR fortran/30522
28         * symbol.c (gfc_add_volatile): Allow to set VOLATILE
29           attribute for host-associated variables.
30         * gfortran.h (symbol_attribute): Save namespace
31           where VOLATILE has been set.
32         * trans-decl.c (gfc_finish_var_decl): Move variable
33           declaration to the top.
34
35 2007-02-20  Tobias Burnus  <burnus@net-b.de>
36
37         PR fortran/30783
38         * resolve.c (resolve_symbol): Add character dummy VALUE check.
39
40 2007-02-19  Thomas Koenig  <Thomas.Koenig@online.de>
41
42         PR libfortran/30533
43         * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
44         argument to default integer.
45         (gfc_resolve_minloc): Likewise.
46
47 2007-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
48
49         PR fortran/30681
50         * options.c (gfc_init_options): Relax warning level for obsolescent.
51         * match.c (match_arithmetic_if): Change to obsolescent from deleted.
52         (gfc_match_if): Same.
53
54 2007-02-18  Roger Sayle  <roger@eyesopen.com>
55
56         * trans-array.c (gfc_build_constant_array_constructor): When the
57         shape of the constructor is known, use that to construct the
58         gfc_array_spec.
59         (gfc_trans_constant_array_constructor): Initialize the "info"
60         information for all of the dimensions of the array constructor.
61         (constant_array_constructor_loop_size): New function.
62         (gfc_trans_array_constructor): Use it to determine whether a
63         loop is suitable for "constant array constructor" optimization.
64
65         * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
66         instead of build2, to avoid conditions like "(a != b) != 0".
67
68 2007-02-18  Roger Sayle  <roger@eyesopen.com>
69             Paul Thomas <pault@gcc.gnu.org>
70
71         PR fortran/30400
72         * match.c (match_forall_iterator): Use gfc_match_expr instead
73         of gfc_match_variable to match the iterator variable.  Return
74         MATCH_NO if not a variable.  Remove the reset of the symbol's
75         flavor in cleanup.
76
77 2007-02-16  Tobias Burnus  <burnus@net-b.de>
78
79         PR fortran/30793
80         * trans-decl.c (gfc_generate_function_code): Do not initialize
81         pointers to derived components.
82
83 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
84             Brooks Moses  <brooks.moses@codesourcery.com>
85             Lee Millward  <lee.millward@codesourcery.com>
86
87         * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
88         (gfc_conv_string_tmp): Likewise.
89         (gfc_conv_concat_op): Likewise.
90         (gfc_build_compare_string): Likewise.
91         (gfc_conv_function_call): Use build_call_list instead of build3.
92
93         * trans-array.c (gfc_trans_allocate_array_storage): Use
94         build_call_expr.
95         (gfc_grow_array): Likewise.
96         (gfc_trans_array_ctor_element): Likewise.
97         (gfc_trans_array_constructor_value): Likewise.
98         (gfc_array_allocate): Likewise.
99         (gfc_array_deallocate): Likewise.
100         (gfc_trans_auto_array_allocation): Likewise.
101         (gfc_trans_dummy_array_bias): Likewise.
102         (gfc_conv_array_parameter): Likewise.
103         (gfc_trans_dealloc_allocated): Likewise.
104         (gfc_duplicate_allocatable): Likewise.
105
106         * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
107         (gfc_trans_omp_flush): Likewise.
108
109         * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
110         (gfc_trans_pause): Likewise.
111         (gfc_trans_stop): Likewise.
112         (gfc_trans_character_select): Likewise.
113         (gfc_do_allocate): Likewise.
114         (gfc_trans_assign_need_temp): Likewise.
115         (gfc_trans_pointer_assign_need_temp): Likewise.
116         (gfc_trans_forall_1): Likewise.
117         (gfc_trans_where_2): Likewise.
118         (gfc_trans_allocate): Likewise.
119         (gfc_trans_deallocate): Likewise.
120
121         * trans.c (gfc_trans_runtime_check): Use build_call_expr.
122
123         * trans-io.c (gfc_trans_open): Use build_call_expr.
124         (gfc_trans_close): Likewise.
125         (build_filepos): Likewise.
126         (gfc_trans_inquire): Likewise.
127         (NML_FIRST_ARG): Delete.
128         (NML_ADD_ARG): Delete.
129         (transfer_namelist_element): Use build_call_expr.
130         (build_dt): Likewise.
131         (gfc_trans_dt_end): Likewise.
132         (transfer_expr): Likewise.
133         (transfer_array-desc): Likewise.
134
135         * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
136         (gfc_generate_constructors): Likewise.
137
138         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
139         (gfc_conv_intrinsic_fdate): Likewise.
140         (gfc_conv_intrinsic_ttynam): Likewise.
141         (gfc_conv_intrinsic_array_transfer): Likewise.
142         (gfc_conv_associated): Likewise.
143         (gfc_conv_intrinsic_si_kind): Likewise.
144         (gfc_conv_intrinsic_trim): Likewise.
145         (gfc_conv_intrinsic_repeat: Likewise.
146         (gfc_conv_intrinsic_iargc): Likewise.
147
148 2007-02-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
149
150         PR fortran/30779
151         * scanner.c (gfc_next_char_literal): Add check for end of file after
152         call to advance_line.
153
154 2007-02-14  Steven G. Kargl  <kargl@gcc.gnu.org>
155
156         PR fortran/30799
157         * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
158         kind.
159
160 2007-02-14  Steven G. Kargl  <kargl@gcc.gnu.org>
161
162         * misc.c (gfc_typename): Fix potential buffer overflow.
163
164 2007-02-13  Paul Thomas  <pault@gcc.gnu.org>
165
166         PR fortran/30554
167         * module.c (read_module): Set pointer_info to referenced if the
168         symbol has no namespace.
169
170 2007-02-12  Nick Clifton  <nickc@redhat.com>
171
172         * lang.opt: Add Warning attribute to warning options.
173
174 2007-02-11  Daniel Franke  <franke.daniel@gmail.com>
175
176         * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
177         (SLEEP): Added section and documentation.
178
179 2007-02-11  Tobias Schlüter  <tobi@gcc.gnu.org>
180
181         PR fortran/30478
182         * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
183         (variable_decl): Likewise.  Rewrap comment.
184         (match_attr_spec): Remove ENUM specific code.
185         (gfc_match_enum): Fix typo in error message.
186         (enumerator_decl): New function.
187         (gfc_match_enumerator_def): Use enumerator_decl instead of
188         variable_decl.  Adapt code accordingly.
189
190 2007-02-11  Paul Thomas  <pault@gcc.gnu.org>
191
192         PR fortran/30554
193         * module.c (find_symtree_for_symbol): New function to return
194         a symtree that is not a "unique symtree" given a symbol.
195         (read_module): Do not automatically set pointer_info to
196         referenced because this inhibits the generation of a unique
197         symtree.  Recycle the existing symtree if possible by calling
198         find_symtree_for_symbol.
199
200         PR fortran/30319
201         * decl.c (add_init_expr_to_sym): Make new charlen for an array
202         constructor initializer.
203
204 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
205
206         * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
207         and __emutls_register_common.
208         * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
209         * trans-common.c (build_common_decl): Don't check have_tls.
210         * trans-decl.c (gfc_finish_var_decl): Likewise.
211         * types.def (BT_WORD, BT_FN_PTR_PTR): New.
212         (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
213
214 2007-02-09  Tobias Burnus  <burnus@net-b.de>
215
216         PR fortran/30512
217         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
218           gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
219
220 2007-02-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
221
222         PR fortran/30720
223         * trans-array.c (gfc_trans_create_temp_array): Remove use of the
224         function argument. Always generate code for negative extent.
225         Simplify said code.
226         * trans-array.h (gfc_trans_create_temp_array): Change prototype.
227         * trans-expr.c (gfc_conv_function_call): Remove use of last argument
228         of gfc_trans_create_temp_array.
229         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
230         * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
231
232 2007-02-08  Roger Sayle  <roger@eyesopen.com>
233
234         * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
235         mask expression is a compile-time constant (".true." or ".false.").
236
237 2007-02-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
238
239         PR fortran/30611
240         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
241         arguments only once. Generate check that NCOPIES argument is not
242         negative.
243
244 2007-02-04  Steven G. Kargl <kargl@gcc.gnu.org>
245
246         PR fortran/30605
247         * fortran/invoke.texi: Update documentation.
248         * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
249         and -pedantic.
250
251 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
252
253         * trans-array.c: Fix a comment typo.
254
255 2007-02-03  Paul Thomas  <pault@gcc.gnu.org>
256
257         PR fortran/30514
258         * array.c (match_array_element_spec): If the length of an array is
259         negative, adjust the upper limit to make it zero length.
260
261         PR fortran/30660
262         * resolve.c (pure_function, resolve_function): Initialize name to
263         null to clear up build warnings.
264         (resolve_fl_variable): Look at components explicitly to check for
265         default initializer, rather than using gfc_default_initializer.
266
267 2007-02-02  Steven G. Kargl <kargl@gcc.gnu.org>
268
269         PR fortran/30683
270         * resolve.c (resolve_generic_f): Check for non-NULL sym.
271
272 2007-02-02  Roger Sayle  <roger@eyesopen.com>
273
274         * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
275         NON_LVALUE_EXPR nodes and useless type conversions.
276
277 2007-02-02  Paul Thomas  <pault@gcc.gnu.org>
278
279         PR fortran/30284
280         PR fortran/30626
281         * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
282         from function and make sure that substring lengths are
283         translated.
284         (is_aliased_array): Remove static attribute.
285         * trans.c : Add prototypes for gfc_conv_aliased_arg and
286         is_aliased_array.
287         * trans-io.c (set_internal_unit): Add the post block to the
288         arguments of the function.  Use is_aliased_array to check if
289         temporary is needed; if so call gfc_conv_aliased_arg.
290         (build_dt): Pass the post block to set_internal_unit and
291         add to the block after all io activiy is done.
292
293 2007-02-01  Roger Sayle  <roger@eyesopen.com>
294
295         * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
296         a temporary array to pass a constant non-character array constructor.
297         Generalize the descriptor generation code to handle scalarizer
298         "info" without an array reference.
299
300 2007-02-01  Roger Sayle  <roger@eyesopen.com>
301
302         * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
303         dependency checking for array constructors.
304
305 2007-02-01  Roger Sayle  <roger@eyesopen.com>
306
307         * trans-stmt.c (compute_overall_iter_number): Document function
308         arguments.  Generalize "unconditional forall nest with constant
309         bounds" optimization to eliminate unconditional inner loops with
310         constant bounds.
311
312 2007-01-31  Tobias Burnus  <burnus@net-b.de>
313
314         PR fortran/30520
315         * interface.c (compare_actual_formal): Check conformance between
316           actual and VOLATILE dummy arguments.
317         * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
318           multiple times in different scopes.
319         * decl.c (gfc_match_volatile): Search symbol in host association.
320
321 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
322
323         * simplify.c, trans-array.c: Fix comment typos.
324
325 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
326
327         * invoke.texi (Code Gen Options): Fix abbreviation typo.
328         * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
329
330 2007-01-30  Steve Ellcey  <sje@cup.hp.com>
331
332         PR fortran/30432
333         * trans-types.c (gfc_get_function_type): Do not add void_type_node
334         to empty arg list.
335         * trans-decl.c (create_function_arglist): Change assert.
336
337 2007-01-29  Paul Thomas  <pault@gcc.gnu.org>
338
339         PR fortran/30554
340         * module.c (read_module): If a symbol is excluded by an ONLY
341         clause, check to see if there is a symtree already loaded. If
342         so, attach the symtree to the pointer_info.
343
344 2007-01-28  Thomas Koenig  <Thomas.Koenig@online.de>
345
346         PR libfortran/30389
347         * gfortran.h: Remove gfc_simplify_init_1.
348         * arith.h: Remove third argument from gfc_compare_string.
349         * arith.c (gfc_compare_expression): Remove third argument
350         from call to gfc_compare_string.
351         (gfc_compare_string): Remove third argument xcoll_table.
352         Remove use of xcoll_table.
353         * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
354         * simplify.c (ascii_table): Remove.
355         (xascii_table): Likewise.
356         (gfc_simplify_achar): ICE if extract_int fails.  Remove use of
357         ascii_table.  Warn if -Wsurprising and value < 0 or > 127.
358         (gfc_simplify_char): ICE if extract_int fails. Error if
359         value < 0 or value > 255.
360         (gfc_simplify_iachar): Remove use of xascii_table.
361         Char values outside of 0..255 are an ICE.
362         (gfc_simplify_lge): Remove use of xascii_table.
363         (gfc_simplify_lgt): Likewise.
364         (gfc_simplify_lle): Likewise.
365         (gfc_simplify_llt): Likewise.
366         (invert_table): Remove.
367         (gfc_simplify_init_1): Remove.
368
369 2007-01-27  Roger Sayle  <roger@eyesopen.com>
370
371         * trans-stmt.c (forall_info): Replace the next_nest and outer
372         fields that previously implemented a doubly-linked list with a
373         single prev_nest field (singly-linked list).
374         (gfc_trans_nested_forall_loop): The nested_forall_info argument
375         now denotes the innermost FORALL in the loop nest.
376         (compute_overall_iter_number): Use prev_nest instead of next_nest.
377         (gfc_trans_forall_1): Link/cons the new "info" to the head of the
378         nested_forall_info linked list.  Free the current "info" when done.
379
380 2007-01-27  Paul Thomas  <pault@gcc.gnu.org>
381
382         PR fortran/30407
383         * trans-expr.c (gfc_conv_operator_assign): New function.
384         * trans.h : Add prototype for gfc_conv_operator_assign.
385         * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
386         a potential operator assignment subroutine.  If it is non-NULL
387         call gfc_conv_operator_assign instead of the first assignment.
388         ( gfc_trans_where_2): In the case of an operator assignment,
389         extract the argument expressions from the code for the
390         subroutine call and pass the symbol to gfc_trans_where_assign.
391         resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
392         gfc_resolve_forall_body): Resolve the subroutine call for
393         operator assignments.
394
395 2007-01-26  Steven Bosscher  <stevenb.gcc@gmail.com>
396             Steven G. Kargl <kargl@gcc.gnu.org>
397
398         PR fortran/30278
399         * fortran/io.c (next_char): Deal with backslash escaped characters.
400         Issue warnings in non -std=gnu cases.
401         * fortran/primary.c (next_string_char): Issue warnings in non
402
403 2007-01-26  Tobias Burnus  <burnus@net-b.de>
404
405         * lang-specs.h: Add support for .f03 and .F03 extensions.
406         * gfortran.texi: Document .f03 extension.
407         * options.c (form_from_filename): Recognize .f03.
408
409 2007-01-25  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
410
411         PR fortran/30437
412         * lang.opt (Wall): Remove RejectNegative.
413         * options.c (gfc_handle_option): Wall can be disabled.
414         (set_Wall): Add a parameter for disabling Wall.
415         
416 2007-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
417
418         PR fortran/30532
419         * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
420         
421 2007-01-23  Paul Thomas  <pault@gcc.gnu.org>
422
423         PR fortran/30481
424         * match.c (gfc_match_namelist): Add check for assumed size character
425         in namelist and provide error if found.
426
427 2007-01-21  Brooks Moses  <brooks.moses@codesourcery.com>
428
429         * intrinsic.texi (ACHAR): Added cross-references.
430         (CHAR): Put cross-references in alphabetical order.
431         (IACHAR): Added cross-references.
432         (ICHAR): Added cross-references.
433
434 2007-01-20  Brooks Moses  <brooks.moses@codesourcery.com>
435
436         * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
437         (MAXVAL): Corrected description of result characteristics.
438         (MINVAL): Same.
439         (UMASK): Added documentation.
440
441 2007-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
442
443         * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
444         parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
445         in the massive whitespace patch.
446
447 2007-01-20  Roger Sayle  <roger@eyesopen.com>
448
449         * module.c (mio_array_ref): The dimen_type fields of an array ref
450         are an enumerated type and can't be read/written directly with a
451         call to mio_integer.  Instead loop over and cast each element.
452
453 2007-01-20  Roger Sayle  <roger@eyesopen.com>
454
455         * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
456         i.e. that the ARRAY_REF doesn't mention components.
457         * trans-array.c (gfc_constant_array_constructor_p): Export external
458         function renamed from constant_array_constructor_p.
459         (gfc_build_constant_array_constructor): Export.
460         (gfc_trans_array_constructor): Update call to the renamed function
461         constant_array_constructor_p.
462         * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
463         (gfc_build_constant_array_constructor): Likewise.
464         * trans-expr.c (gfc_build_memcpy_call): New helper function split
465         out from gfc_trans_array_copy.
466         (gfc_trans_array_copy): Use gfc_build_memcpy_call.
467         (gfc_trans_array_constructor_copy): New function to optimize
468         assigning an entire array from a constant array constructor.
469         (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
470         when appropriate.
471
472 2007-01-20  Roger Sayle  <roger@eyesopen.com>
473
474         * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
475         implementation for the SIGN intrinsic with integral operands.
476         (gfc_conv_intrinsic_minmax): Fix whitespace.
477
478 2007-01-20  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
479
480         * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
481         * lang.opt: Add -fallow-leading-underscore.
482         * match.c (gfc_match_name): Allow leading underscore in symbol
483         name if -fallow-leading-underscore is used.
484         * symbol.c (gfc_get_default_type): Add special case for symbol
485         names beginning with an underscore.
486         * trans-decl.c (gfc_get_extern_function_decl,
487         gfc_build_intrinsic_function_decls): Add _gfortran prefix to
488         library symbols selected_int_kind, selected_real_kind and 
489         all specifics.
490         * options.c (gfc_init_options, gfc_handle_option): Handle the
491         new -fallow-leading-underscore option.
492
493 2007-01-20  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
494
495         PR fortran/30446
496         * options.c (gfc_handle_module_path_options): Path used in -J
497         option is now added to the module search path.
498
499 2007-01-20  Richard Guenther  <rguenther@suse.de>
500
501         PR fortran/30223
502         * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
503         cexpi builtins if we have TARGET_C99_FUNCTIONS.  Provide
504         sincos builtins if the target has sincos.
505
506 2007-01-19  Brooks Moses  <brooks.moses@codesourcery.com>
507
508         * intrinsic.texi (MATMUL): Corrected a typo.
509         (MAX): Separated @var arguments.
510         (MIN): Separated @var arguments.
511
512 2007-01-19  Brooks Moses  <brooks.moses@codesourcery.com>
513
514         * intrinsic.texi: general whitespace cleanup.
515         (menu): Added TIME8, removed UNMASK.
516         (AINT): Clarified argument requirement.
517         (ANINT): Clarified argument requirement.
518         (CEILING): Clarified argument requirement.
519         (CHAR): Clarified argument requirement.
520         (CMPLX): Clarified argument requirement.
521         (DCMPLX): Clarified argument requirement.
522         (FGET): Line rewrapping.
523         (FLOOR): Clarified argument requirement.
524         (GMTIME): Added documentation.
525         (IAND): Added cross-reference.
526         (IBCLR): Added cross-reference.
527         (IBSET): Added cross-reference.
528         (IEOR): Added cross-reference.
529         (INT): Collapsed examples, clarified argument requirement.
530         (IOR): Added cross-references.
531         (LEN_TRIM): Corrected result kind.
532         (LINK): Added cross-reference.
533         (LLT): Removed "documentation pending".
534         (LOGICAL): Added documentation.
535         (LSHIFT): Added documentation.
536         (LTIME): Added documentation.
537         (MATMUL): Added documentation.
538         (MAX): Added documentation.
539         (MAXLOC): Added documentation.
540         (MAXVAL): Added documentation.
541         (MERGE): Added documentation.
542         (MIN): Added documentation.
543         (MINLOC): Added documentation.
544         (MINVAL): Added documentation.
545         (MVBITS): Moved to correct place, added documentation.
546         (NOT): Added documentation.
547         (PERROR): Added documentation.
548         (RAN): Moved to correct place, added documentation.
549         (REAL): Clarified argument requirement.
550         (RENAME): Added documentation.
551         (RSHIFT): Clarified argument requirement.
552         (SIGN): Corrected table specification.
553         (SYMLNK): Added documentation.
554         (SYSTEM): Added documentation.
555         (TIME): Added documentation.
556         (TIME8): Added section and documentation.
557         (UNMASK): Removed erroneous section.
558
559 2007-01-18  H.J. Lu  <hongjiu.lu@intel.com>
560
561         * trans-stmt.c (compute_overall_iter_number): Fix a typo.
562
563 2007-01-18  Roger Sayle  <roger@eyesopen.com>
564
565         * trans-expr.c (copyable_array_p): Consider user derived types without
566         allocatable components to be copyable.
567
568 2007-01-18  Roger Sayle  <roger@eyesopen.com>
569
570         * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
571         the number of interations in unconditional FORALL nests with constant
572         bounds.
573
574 2007-01-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
575             Tobias Burnus  <burnus@net-b.de>
576
577         PR libfortran/29649
578         * gfortran.h (gfc_option_t): Add flag_dump_core.
579         * lang.opt: Add -fdump-core option.
580         * invoke.texi: Document the new options.
581         * trans-decl.c (gfc_build_builtin_function_decls): Add new
582           options to the call to set_std.
583         * options.c (gfc_init_options, gfc_handle_option): Set the
584           new options.
585
586 2007-01-17  Paul Thomas  <pault@gcc.gnu.org>
587
588         PR fortran/30476
589         * module.c (load_generic_interfaces): Make the marking of the
590         symbol as ambiguous conditional on the module names being
591         different.
592         (write_generic): Ensure that the generic interface has a
593         non-NULL module field.
594
595 2007-01-16  Roger Sayle  <roger@eyesopen.com>
596
597         PR fortran/30404
598         * trans-stmt.c (forall_info): Remove pmask field.
599         (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
600         NVAR covers all the interation variables in the current forall_info.
601         Add an extra OUTER parameter, which specified the loop header in
602         which to place mask index initializations.
603         (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
604         Change the semantics of MASK_FLAG to only control the mask in the
605         innermost loop.
606         (compute_overall_iter_number): Optimize the trivial case of a
607         top-level loop having a constant number of iterations.  Update
608         call to gfc_trans_nested_forall_loop.  Calculate the number of
609         times the inner loop will be executed, not to size of the 
610         iteration space.
611         (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
612         sizeof(type) == 1.  Tidy up.
613         (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
614         to gfc_trans_nested_forall_loop.
615         (gfc_trans_pointer_assign_need_temp): Likewise.
616         (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
617         LENVAR local variables.  Split mask allocation into a separate
618         hunk/pass from mask population.  Use allocate_temp_for_forall_nest
619         to allocate the FORALL mask with the correct size.  Update calls
620         to gfc_trans_nested_forall_loop.
621         (gfc_evaluate_where_mask): Update call to
622         gfc_trans_nested_forall_loop.
623         (gfc_trans_where_2): Likewise.
624
625 2007-01-15  Paul Thomas  <pault@gcc.gnu.org>
626
627         PR fortran/28172
628         * trans-stmt.c (gfc_trans_call): If it does not have one, get
629         a backend_decl for an alternate return.
630
631         PR fortran/29389
632         * resolve.c (pure_function): Statement functions are pure. Note
633         that this will have to recurse to comply fully with F95.
634
635         PR fortran/29712
636         * resolve.c (resolve_function): Only a reference to the final
637         dimension of an assumed size array is an error in an inquiry
638         function.
639
640         PR fortran/30283
641         * resolve.c (resolve_function): Make sure that the function
642         expression has a type.
643
644 2007-01-14  Paul Thomas  <pault@gcc.gnu.org>
645
646         PR fortran/30410
647         * trans-decl.c (gfc_sym_mangled_function_id): Module, external
648         symbols must not have the module name prepended.
649
650 2007-01-11  Thomas Koenig  <Thomas.Koenig@online.de>
651
652         PR libfortran/30415
653         * iresolve.c (gfc_resolve_maxloc): If the rank
654         of the return array is nonzero and we process an
655         integer array smaller than default kind, coerce
656         the array to default integer.
657         * iresolve.c (gfc_resolve_minloc): Likewise.
658
659 2007-01-11  Brooks Moses  <brooks.moses@codesourcery.com>
660
661         * simplify.c: Update copyright to 2007.
662         * scanner.c: Same.
663
664 2007-01-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
665
666         PR fortran/30430
667         * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
668         only once!
669
670 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
671
672         * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
673         (gfc_simplify_ibset): Same.
674
675 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
676
677         PR 30381
678         PR 30420
679         * simplify.c (convert_mpz_to_unsigned): New function.
680         (convert_mpz_to_signed): New function, largely based on
681         twos_complement().
682         (twos_complement): Removed.
683         (gfc_simplify_ibclr): Add conversions to and from an
684         unsigned representation before bit-twiddling.
685         (gfc_simplify_ibset): Same.
686         (gfc_simplify_ishftc): Add checks for overly large
687         constant arguments, only check the third argument if
688         it's present, carry over high bits into the result as
689         appropriate, and perform the final conversion back to
690         a signed representation using the correct sign bit.
691         (gfc_simplify_not): Removed unnecessary masking.
692
693 2007-01-09  Paul Thomas  <pault@gcc.gnu.org>
694
695         PR fortran/30408
696         * resolve.c (resolve_code): Use the code->expr character length
697         directly to set length of llen.
698
699 2007-01-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
700
701         PR fortran/30408
702         * lang.opt: Add Wcharacter_truncation option.
703         * options.c (gfc_init_options): Initialize
704         gfc_option.warn_character_truncation to zero.
705         (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
706
707 2007-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
708
709         * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
710         iresolve.c, match.c: Update Copyright years.  Whitespace.
711
712 2007-01-08  Richard Guenther  <rguenther@suse.de>
713
714         * trans-io.c (transfer_array_desc): Use build_int_cst instead
715         of build_int_cstu.
716
717 2007-01-08  Roger Sayle  <roger@eyesopen.com>
718
719         * trans-array.c (constant_array_constructor_p): New function to
720         determine whether an array constructor consists only of constant
721         elements, and if so return it's size.
722         (gfc_build_constant_array_constructor): Construct a statically
723         initialized gfortran array for a given EXPR_ARRAY.
724         (gfc_trans_constant_array_constructor): Efficiently scalarize
725         a constant array constructor.
726         (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
727         Special case scalarization of constant array constructors, all of
728         whose elements are specified, using constant_array_constructor_p 
729         and gfc_trans_constant_array_constructor.
730         (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
731         before adding it to index, to avoid creating a NON_LVALUE_EXPR.
732
733 2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
734
735         gfortran.texi: Fix typos.
736
737 2007-01-07  Steven G. Kargl  <kargl@gcc.gnu.org>
738
739         * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
740         convert.c: Update Copyright dates.  Fix whitespace.
741
742 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
743
744         * data.c (gfc_assign_data_value): Fix whitespace.
745
746 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
747
748         * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
749         Commentary typo fix.
750
751 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
752
753         PR fortran/27698
754         * match.c (gfc_match_name): Print diagnostics for invalid
755         character in names.
756
757 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
758
759         * array.c: Fix whitespace in comment table.
760
761 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
762
763         * array.c, bbt.c, check.c: Update copyright years.  Whitespace.
764
765 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
766
767         * arith.c: Update copyright years.  Whitespace.
768
769 2007-01-05  Roger Sayle  <roger@eyesopen.com>
770
771         * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
772         array assignments split out from gfc_trans_assignment.
773         (gfc_trans_array_copy): New function to implement array to array
774         copies via calls to __builtin_memcpy.
775         (copyable_array_p): New helper function to identify an array of
776         simple/POD types, that may be copied/assigned using memcpy.
777         (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
778         whole array assignments considered suitable by copyable_array_p.
779         Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
780
781 2007-01-05  Roger Sayle  <roger@eyesopen.com>
782
783         * trans-array.c (gfc_trans_array_constructor_value): Make the
784         static const "data" array as TREE_READONLY.
785         * trans-stmt.c (gfc_trans_character_select): Likewise.
786
787 2007-01-05  Roger Sayle  <roger@eyesopen.com>
788
789         * trans-array.c (gfc_conv_loop_setup): Test whether the loop
790         stride is one, to avoid fold_build2 introducing a useless
791         NON_LVALUE_EXPR node.
792
793 2007-01-05  Tobias Burnus  <burnus@net-b.de>
794
795         * symbol.c (check_conflict): Fix error message.
796
797 2007-01-05  Paul Thomas  <pault@gcc.gnu.org>
798
799         PR fortran/23232
800         * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
801         functions to signal that a DATA statement is being matched.
802         (gfc_match_data): Call gfc_set_in_match_data on entry and on
803         exit.
804         * gfortran.h : Add prototypes for above.
805         * expr.c (check_init_expr): Avoid check on parameter or
806         variable if gfc_in_match_data is true.
807         (gfc_match_init_expr): Do not call error on non-reduction of
808         expression if gfc_in_match_data is true.
809
810         PR fortran/27996
811         PR fortran/27998
812         * decl.c (gfc_set_constant_character_len): Add boolean arg to
813         flag array constructor resolution.  Warn if string is being
814         truncated.  Standard dependent error if string is padded. Set
815         new arg to false for all three calls to
816         gfc_set_constant_character_len.
817         * match.h : Add boolean arg to prototype for
818         gfc_set_constant_character_len.
819         * gfortran.h : Add warn_character_truncation to gfc_options.
820         * options.c (set_Wall): Set warn_character_truncation if -Wall
821         is set.
822         * resolve.c (resolve_code): Warn if rhs string in character
823         assignment has to be truncated.
824         * array.c (gfc_resolve_character_array_constructor): Set new
825         argument to true for call to gfc_set_constant_character_len.
826
827 2007-01-05  Tobias Burnus  <burnus@net-b.de>
828
829         PR fortran/29624
830         * interface.c (compare_parameter_intent): New function.
831           (check_intents): Support pointer intents.
832         * symbol.c (check_conflict): Support pointer intents,
833           better conflict_std message.
834         * expr.c (gfc_check_assign,gfc_check_pointer_assign):
835           Support pointer intents.
836         * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
837           Support pointer intents.
838
839 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
840
841         PR 30371
842         * check.c (gfc_check_kill_sub): Add checks for non-scalar
843         arguments.
844
845 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
846
847         * intrinsic.texi: Minor cleanup, reflowing overlong
848         paragraphs, and correcting whitespace.
849
850 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
851
852         * intrinsic.texi (LBOUND): Add documentation.
853         (LGE): Add documentation.
854         (LGT): Add documentation.
855         (LINK): Add documentation.
856         (LLE): Add documentation.
857         (LLT): Add documentation.
858         (LNBLNK): Add documentation.
859         (UBOUND): Add documentation.
860         (UNLINK): Add documentation.
861
862 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
863
864         * intrinsic.texi (IAND): Clarify argument specifications.
865         (IBCLR): Add documentation.
866         (IBITS): Add documentation.
867         (IBSET): Add documentation.
868         (IEOR): Add documentation.
869         (IERRNO): Add documentation.
870         (INDEX): Add documentation.
871         (IOR): Add documentation.
872         (ISHFT): Add documentation.
873         (ISHFTC): Add documentation.
874         (KILL): Add documentation.
875         (LEN_TRIM): Add documentation.
876
877 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
878
879         PR 30235
880         * interface.c (compare_actual_formal): check for
881         alternate returns when iterating over non-present
882         arguments.
883
884 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
885
886         * invoke.texi: Update manpage copyright to include 2007.
887
888 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
889
890         * gfortran.texi: Update copyright to include 2007.
891         * intrinsic.texi: Update copyright to include 2007.
892         * invoke.texi: Update copyright to include 2007.
893
894 2007-01-02  Tobias Burnus  <burnus@net-b.de>
895             Jakub Jelinek  <jakub@redhat.com>
896
897         PR fortran/30276
898         * scanner.c (open_included_file): Revert patch.
899           (gfc_open_included_file): Support absolute pathnames.
900           (gfc_open_intrinsic_module): Support absolute pathnames.
901
902 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
903
904         * gfortran.texi (GNU Fortran and GCC): Rewrite
905
906 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
907
908         * gfortran.texi (Introduction): Lower "Part I:
909         Introduction" to a chapter, renumber Parts II and III to
910         Parts I and II.
911         * intrinsic.texi (Introduction): Rename to "Introduction
912         to Intrinsics" to avoid conflict with the new chapter.
913
914 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
915
916         * intrinsic.texi (Introduction): Rewrite first paragraph.
917
918 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
919
920         * invoke.texi (OpenMP): Added index entry.
921         * gfortran.texi (title page): Removed erroneous '*'.
922
923 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
924
925         * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
926         to description.
927         (Extensions): Miscellaneous minor rewriting and copyediting.
928         (BOZ-literal constants): Renamed from Hexadecimal constants.
929         (Hollerith constants support): Added explanation and 
930         suggestions for standard-conforming modern equivalents.
931
932 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
933
934         * intrinsic.texi: Improvements to index entries; change
935         @findex entries to @cindex entries.
936         * invoke.texi: Standardize and improve index entries.
937         * gfortran.texi: Fix @code in one index entry.
938
939 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
940
941         * invoke.texi: Change @code-type macros to appropriate
942         variants (@command, @option, etc.)
943         * gfortran.texi: Same.
944
945 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
946
947         * intrinsic.texi: Various minor cleanups.
948
949 2007-01-02  Steven G. Kargl  <kargls@comcast.net>
950
951         * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
952         build_int_cst.
953
954 2007-01-02  Tobias Burnus  <burnus@net-b.de>
955
956         PR fortran/30276
957         * scanner.c (open_included_file): Support full-path filenames.
958
959 2007-01-02  Paul Thomas  <pault@gcc.gnu.org>
960
961         PR fortran/20896
962         * interface.c (check_sym_interfaces): Remove call to
963         resolve_global_procedure.
964         gfortran.h : Remove prototype for resolve_global_procedure.
965         resolve.c (resolve_global_procedure): Add static attribute
966         to function declaration.
967
968 2007-01-01  Steven G. Kargl  <kargls@comcast.net>
969
970         * ChangeLog: Copy to ...
971         * ChangeLog-2006: here.