OSDN Git Service

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