OSDN Git Service

* trans-expr.c (copyable_array_p): Consider user derived types without
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2007-01-18  Roger Sayle  <roger@eyesopen.com>
2
3         * trans-expr.c (copyable_array_p): Consider user derived types without
4         allocatable components to be copyable.
5
6 2007-01-18  Roger Sayle  <roger@eyesopen.com>
7
8         * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
9         the number of interations in unconditional FORALL nests with constant
10         bounds.
11
12 2007-01-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
13             Tobias Burnus  <burnus@net-b.de>
14
15         PR libfortran/29649
16         * gfortran.h (gfc_option_t): Add flag_dump_core.
17         * lang.opt: Add -fdump-core option.
18         * invoke.texi: Document the new options.
19         * trans-decl.c (gfc_build_builtin_function_decls): Add new
20           options to the call to set_std.
21         * options.c (gfc_init_options, gfc_handle_option): Set the
22           new options.
23
24 2007-01-17  Paul Thomas  <pault@gcc.gnu.org>
25
26         PR fortran/30476
27         * module.c (load_generic_interfaces): Make the marking of the
28         symbol as ambiguous conditional on the module names being
29         different.
30         (write_generic): Ensure that the generic interface has a
31         non-NULL module field.
32
33 2007-01-16  Roger Sayle  <roger@eyesopen.com>
34
35         PR fortran/30404
36         * trans-stmt.c (forall_info): Remove pmask field.
37         (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
38         NVAR covers all the interation variables in the current forall_info.
39         Add an extra OUTER parameter, which specified the loop header in
40         which to place mask index initializations.
41         (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
42         Change the semantics of MASK_FLAG to only control the mask in the
43         innermost loop.
44         (compute_overall_iter_number): Optimize the trivial case of a
45         top-level loop having a constant number of iterations.  Update
46         call to gfc_trans_nested_forall_loop.  Calculate the number of
47         times the inner loop will be executed, not to size of the 
48         iteration space.
49         (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
50         sizeof(type) == 1.  Tidy up.
51         (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
52         to gfc_trans_nested_forall_loop.
53         (gfc_trans_pointer_assign_need_temp): Likewise.
54         (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
55         LENVAR local variables.  Split mask allocation into a separate
56         hunk/pass from mask population.  Use allocate_temp_for_forall_nest
57         to allocate the FORALL mask with the correct size.  Update calls
58         to gfc_trans_nested_forall_loop.
59         (gfc_evaluate_where_mask): Update call to
60         gfc_trans_nested_forall_loop.
61         (gfc_trans_where_2): Likewise.
62
63 2007-01-15  Paul Thomas  <pault@gcc.gnu.org>
64
65         PR fortran/28172
66         * trans-stmt.c (gfc_trans_call): If it does not have one, get
67         a backend_decl for an alternate return.
68
69         PR fortran/29389
70         * resolve.c (pure_function): Statement functions are pure. Note
71         that this will have to recurse to comply fully with F95.
72
73         PR fortran/29712
74         * resolve.c (resolve_function): Only a reference to the final
75         dimension of an assumed size array is an error in an inquiry
76         function.
77
78         PR fortran/30283
79         * resolve.c (resolve_function): Make sure that the function
80         expression has a type.
81
82 2007-01-14  Paul Thomas  <pault@gcc.gnu.org>
83
84         PR fortran/30410
85         * trans-decl.c (gfc_sym_mangled_function_id): Module, external
86         symbols must not have the module name prepended.
87
88 2007-01-11  Thomas Koenig  <Thomas.Koenig@online.de>
89
90         PR libfortran/30415
91         * iresolve.c (gfc_resolve_maxloc):  If the rank
92         of the return array is nonzero and we process an
93         integer array smaller than default kind, coerce
94         the array to default integer.
95         * iresolve.c (gfc_resolve_minloc):  Likewise.
96
97 2007-01-11  Brooks Moses  <brooks.moses@codesourcery.com>
98
99         * simplify.c: Update copyright to 2007.
100         * scanner.c: Same.
101
102 2007-01-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
103
104         PR fortran/30430
105         * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
106         only once!
107
108 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
109
110         * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
111         (gfc_simplify_ibset): Same.
112
113 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
114
115         PR 30381
116         PR 30420
117         * simplify.c (convert_mpz_to_unsigned): New function.
118         (convert_mpz_to_signed): New function, largely based on
119         twos_complement().
120         (twos_complement): Removed.
121         (gfc_simplify_ibclr): Add conversions to and from an
122         unsigned representation before bit-twiddling.
123         (gfc_simplify_ibset): Same.
124         (gfc_simplify_ishftc): Add checks for overly large
125         constant arguments, only check the third argument if
126         it's present, carry over high bits into the result as
127         appropriate, and perform the final conversion back to
128         a signed representation using the correct sign bit.
129         (gfc_simplify_not): Removed unnecessary masking.
130
131 2007-01-09  Paul Thomas  <pault@gcc.gnu.org>
132
133         PR fortran/30408
134         * resolve.c (resolve_code): Use the code->expr character length
135         directly to set length of llen.
136
137 2007-01-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
138
139         PR fortran/30408
140         * lang.opt: Add Wcharacter_truncation option.
141         * options.c (gfc_init_options): Initialize
142         gfc_option.warn_character_truncation to zero.
143         (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
144
145 2007-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
146
147         * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
148         iresolve.c, match.c:  Update Copyright years.  Whitespace.
149
150 2007-01-08  Richard Guenther  <rguenther@suse.de>
151
152         * trans-io.c (transfer_array_desc): Use build_int_cst instead
153         of build_int_cstu.
154
155 2007-01-08  Roger Sayle  <roger@eyesopen.com>
156
157         * trans-array.c (constant_array_constructor_p): New function to
158         determine whether an array constructor consists only of constant
159         elements, and if so return it's size.
160         (gfc_build_constant_array_constructor): Construct a statically
161         initialized gfortran array for a given EXPR_ARRAY.
162         (gfc_trans_constant_array_constructor): Efficiently scalarize
163         a constant array constructor.
164         (gfc_trans_array_constructor):  Tidy up use of CONST_STRING.
165         Special case scalarization of constant array constructors, all of
166         whose elements are specified, using constant_array_constructor_p 
167         and gfc_trans_constant_array_constructor.
168         (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
169         before adding it to index, to avoid creating a NON_LVALUE_EXPR.
170
171 2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
172
173         gfortran.texi: Fix typos.
174
175 2007-01-07  Steven G. Kargl  <kargl@gcc.gnu.org>
176
177         * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
178         convert.c:  Update Copyright dates.  Fix whitespace.
179
180 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
181
182         * data.c (gfc_assign_data_value): Fix whitespace.
183
184 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
185
186         * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
187         Commentary typo fix.
188
189 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
190
191         PR fortran/27698
192         * match.c (gfc_match_name): Print diagnostics for invalid
193         character in names.
194
195 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
196
197         * array.c: Fix whitespace in comment table.
198
199 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
200
201         * array.c, bbt.c, check.c:  Update copyright years.  Whitespace.
202
203 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
204
205         * arith.c: Update copyright years.  Whitespace.
206
207 2007-01-05  Roger Sayle  <roger@eyesopen.com>
208
209         * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
210         array assignments split out from gfc_trans_assignment.
211         (gfc_trans_array_copy): New function to implement array to array
212         copies via calls to __builtin_memcpy.
213         (copyable_array_p): New helper function to identify an array of
214         simple/POD types, that may be copied/assigned using memcpy.
215         (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
216         whole array assignments considered suitable by copyable_array_p.
217         Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
218
219 2007-01-05  Roger Sayle  <roger@eyesopen.com>
220
221         * trans-array.c (gfc_trans_array_constructor_value): Make the
222         static const "data" array as TREE_READONLY.
223         * trans-stmt.c (gfc_trans_character_select): Likewise.
224
225 2007-01-05  Roger Sayle  <roger@eyesopen.com>
226
227         * trans-array.c (gfc_conv_loop_setup):  Test whether the loop
228         stride is one, to avoid fold_build2 introducing a useless
229         NON_LVALUE_EXPR node.
230
231 2007-01-05  Tobias Burnus  <burnus@net-b.de>
232
233         * symbol.c (check_conflict): Fix error message.
234
235 2007-01-05  Paul Thomas  <pault@gcc.gnu.org>
236
237         PR fortran/23232
238         * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
239         functions to signal that a DATA statement is being matched.
240         (gfc_match_data): Call gfc_set_in_match_data on entry and on
241         exit.
242         * gfortran.h : Add prototypes for above.
243         * expr.c (check_init_expr): Avoid check on parameter or
244         variable if gfc_in_match_data is true.
245         (gfc_match_init_expr): Do not call error on non-reduction of
246         expression if gfc_in_match_data is true.
247
248         PR fortran/27996
249         PR fortran/27998
250         * decl.c (gfc_set_constant_character_len): Add boolean arg to
251         flag array constructor resolution.  Warn if string is being
252         truncated.  Standard dependent error if string is padded. Set
253         new arg to false for all three calls to
254         gfc_set_constant_character_len.
255         * match.h : Add boolean arg to prototype for
256         gfc_set_constant_character_len.
257         * gfortran.h : Add warn_character_truncation to gfc_options.
258         * options.c (set_Wall): Set warn_character_truncation if -Wall
259         is set.
260         * resolve.c (resolve_code): Warn if rhs string in character
261         assignment has to be truncated.
262         * array.c (gfc_resolve_character_array_constructor): Set new
263         argument to true for call to gfc_set_constant_character_len.
264
265 2007-01-05  Tobias Burnus  <burnus@net-b.de>
266
267         PR fortran/29624
268         * interface.c (compare_parameter_intent): New function.
269           (check_intents): Support pointer intents.
270         * symbol.c (check_conflict): Support pointer intents,
271           better conflict_std message.
272         * expr.c (gfc_check_assign,gfc_check_pointer_assign):
273           Support pointer intents.
274         * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
275           Support pointer intents.
276
277 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
278
279         PR 30371
280         * check.c (gfc_check_kill_sub): Add checks for non-scalar
281         arguments.
282
283 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
284
285         * intrinsic.texi: Minor cleanup, reflowing overlong
286         paragraphs, and correcting whitespace.
287
288 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
289
290         * intrinsic.texi (LBOUND): Add documentation.
291         (LGE): Add documentation.
292         (LGT): Add documentation.
293         (LINK): Add documentation.
294         (LLE): Add documentation.
295         (LLT): Add documentation.
296         (LNBLNK): Add documentation.
297         (UBOUND): Add documentation.
298         (UNLINK): Add documentation.
299
300 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
301
302         * intrinsic.texi (IAND): Clarify argument specifications.
303         (IBCLR): Add documentation.
304         (IBITS): Add documentation.
305         (IBSET): Add documentation.
306         (IEOR): Add documentation.
307         (IERRNO): Add documentation.
308         (INDEX): Add documentation.
309         (IOR): Add documentation.
310         (ISHFT): Add documentation.
311         (ISHFTC): Add documentation.
312         (KILL): Add documentation.
313         (LEN_TRIM): Add documentation.
314
315 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
316
317         PR 30235
318         * interface.c (compare_actual_formal): check for
319         alternate returns when iterating over non-present
320         arguments.
321
322 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
323
324         * invoke.texi: Update manpage copyright to include 2007.
325
326 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
327
328         * gfortran.texi: Update copyright to include 2007.
329         * intrinsic.texi: Update copyright to include 2007.
330         * invoke.texi: Update copyright to include 2007.
331
332 2007-01-02  Tobias Burnus  <burnus@net-b.de>
333             Jakub Jelinek  <jakub@redhat.com>
334
335         PR fortran/30276
336         * scanner.c (open_included_file): Revert patch.
337           (gfc_open_included_file): Support absolute pathnames.
338           (gfc_open_intrinsic_module): Support absolute pathnames.
339
340 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
341
342         * gfortran.texi (GNU Fortran and GCC): Rewrite
343
344 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
345
346         * gfortran.texi (Introduction): Lower "Part I:
347         Introduction" to a chapter, renumber Parts II and III to
348         Parts I and II.
349         * intrinsic.texi (Introduction): Rename to "Introduction
350         to Intrinsics" to avoid conflict with the new chapter.
351
352 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
353
354         * intrinsic.texi (Introduction): Rewrite first paragraph.
355
356 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
357
358         * invoke.texi (OpenMP): Added index entry.
359         * gfortran.texi (title page): Removed erroneous '*'.
360
361 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
362
363         * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
364         to description.
365         (Extensions): Miscellaneous minor rewriting and copyediting.
366         (BOZ-literal constants): Renamed from Hexadecimal constants.
367         (Hollerith constants support): Added explanation and 
368         suggestions for standard-conforming modern equivalents.
369
370 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
371
372         * intrinsic.texi: Improvements to index entries; change
373         @findex entries to @cindex entries.
374         * invoke.texi: Standardize and improve index entries.
375         * gfortran.texi: Fix @code in one index entry.
376
377 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
378
379         * invoke.texi: Change @code-type macros to appropriate
380         variants (@command, @option, etc.)
381         * gfortran.texi: Same.
382
383 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
384
385         * intrinsic.texi: Various minor cleanups.
386
387 2007-01-02  Steven G. Kargl  <kargls@comcast.net>
388
389         * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
390         build_int_cst.
391
392 2007-01-02  Tobias Burnus  <burnus@net-b.de>
393
394         PR fortran/30276
395         * scanner.c (open_included_file): Support full-path filenames.
396
397 2007-01-02  Paul Thomas  <pault@gcc.gnu.org>
398
399         PR fortran/20896
400         * interface.c (check_sym_interfaces): Remove call to
401         resolve_global_procedure.
402         gfortran.h : Remove prototype for resolve_global_procedure.
403         resolve.c (resolve_global_procedure): Add static attribute
404         to function declaration.
405
406 2007-01-01  Steven G. Kargl  <kargls@comcast.net>
407
408         * ChangeLog: Copy to ...
409         * ChangeLog-2006: here.