OSDN Git Service

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