OSDN Git Service

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