intrinsic.c (char_conversions, ncharconv): New static variables.
[gcc.git] / gcc / fortran / ChangeLog
1 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2
3 * intrinsic.c (char_conversions, ncharconv): New static variables.
4 (find_char_conv): New function.
5 (add_functions): Add simplification functions for ADJUSTL and
6 ADJUSTR. Don't check the kind of their argument. Add checking for
7 LGE, LLE, LGT and LLT.
8 (add_subroutines): Fix argument type for SLEEP. Fix argument name
9 for SYSTEM.
10 (add_char_conversions): New function.
11 (gfc_intrinsic_init_1): Call add_char_conversions.
12 (gfc_intrinsic_done_1): Free char_conversions.
13 (check_arglist): Use kind == 0 as a signal that we don't want
14 the kind value to be checked.
15 (do_simplify): Also simplify character functions.
16 (gfc_convert_chartype): New function
17 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
18 use of default character type.
19 (gfc_trans_array_constructor_value): Likewise.
20 (get_array_ctor_var_strlen): Use integer kind to build an integer
21 instead of a character kind!
22 (gfc_build_constant_array_constructor): Don't force the use of
23 default character type.
24 (gfc_conv_loop_setup): Likewise.
25 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
26 default character type. Allocate enough memory for wide strings.
27 (gfc_conv_concat_op): Make sure operand kind are the same.
28 (string_to_single_character): Remove gfc_ prefix. Reindent.
29 Don't force the use of default character type.
30 (gfc_conv_scalar_char_value): Likewise.
31 (gfc_build_compare_string): Call string_to_single_character.
32 (fill_with_spaces): New function
33 (gfc_trans_string_copy): Add kind arguments. Use them to deal
34 with wide character kinds.
35 (gfc_conv_statement_function): Whitespace fix. Call
36 gfc_trans_string_copy with new kind arguments.
37 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
38 instead of using gfc_widechar_to_char.
39 (gfc_conv_string_parameter): Don't force the use of default
40 character type.
41 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
42 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
43 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
44 * decl.c (gfc_set_constant_character_len): Don't assert the
45 existence of a single character kind.
46 * trans-array.h (gfc_trans_string_copy): New prototype.
47 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
48 New prototypes.
49 * error.c (print_wide_char_into_buffer): New function lifting
50 code from gfc_print_wide_char. Fix order to output '\x??' instead
51 of 'x\??'.
52 (gfc_print_wide_char): Call print_wide_char_into_buffer.
53 (show_locus): Call print_wide_char_into_buffer with buffer local
54 to this function.
55 * trans-const.c (gfc_build_wide_string_const): New function.
56 (gfc_conv_string_init): Deal with wide characters strings
57 constructors.
58 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
59 * trans-stmt.c (gfc_trans_label_assign): Likewise.
60 (gfc_trans_character_select): Deal with wide strings.
61 * expr.c (gfc_check_assign): Allow conversion between character
62 kinds on assignment.
63 * trans-const.h (gfc_build_wide_string_const): New prototype.
64 * trans-types.c (gfc_get_character_type_len_for_eltype,
65 gfc_get_character_type_len): Create too variants of the old
66 gfc_get_character_type_len, one getting kind argument and the
67 other one directly taking a type tree.
68 * trans.h (gfor_fndecl_select_string_char4,
69 gfor_fndecl_convert_char1_to_char4,
70 gfor_fndecl_convert_char4_to_char1): New prototypes.
71 * trans-types.h (gfc_get_character_type_len_for_eltype): New
72 prototype.
73 * resolve.c (resolve_operator): Exit early when kind mismatches
74 are detected, because that makes us issue an error message later.
75 (validate_case_label_expr): Fix wording of error message.
76 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
77 functions.
78 (gfc_resolve_pack): Call _char4 variants of library function
79 when dealing with wide characters.
80 (gfc_resolve_reshape): Likewise.
81 (gfc_resolve_spread): Likewise.
82 (gfc_resolve_transpose): Likewise.
83 (gfc_resolve_unpack): Likewise.
84 * target-memory.c (size_character): Take character kind bit size
85 correctly into account (not that it changes anything for now, but
86 it's more generic).
87 (gfc_encode_character): Added gfc_ prefix. Encoding each
88 character of a string by calling native_encode_expr for the
89 corresponding unsigned integer.
90 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
91 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
92 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
93 and gfor_fndecl_convert_char4_to_char1.
94 * target-memory.h (gfc_encode_character): New prototype.
95 * arith.c (gfc_check_character_range): New function.
96 (eval_intrinsic): Allow non-default character kinds.
97 * check.c (gfc_check_access_func): Only allow default
98 character kind arguments.
99 (gfc_check_chdir): Likewise.
100 (gfc_check_chdir_sub): Likewise.
101 (gfc_check_chmod): Likewise.
102 (gfc_check_chmod_sub): Likewise.
103 (gfc_check_lge_lgt_lle_llt): New function.
104 (gfc_check_link): Likewise.
105 (gfc_check_link_sub): Likewise.
106 (gfc_check_symlnk): Likewise.
107 (gfc_check_symlnk_sub): Likewise.
108 (gfc_check_rename): Likewise.
109 (gfc_check_rename_sub): Likewise.
110 (gfc_check_fgetputc_sub): Likewise.
111 (gfc_check_fgetput_sub): Likewise.
112 (gfc_check_stat): Likewise.
113 (gfc_check_stat_sub): Likewise.
114 (gfc_check_date_and_time): Likewise.
115 (gfc_check_ctime_sub): Likewise.
116 (gfc_check_fdate_sub): Likewise.
117 (gfc_check_gerror): Likewise.
118 (gfc_check_getcwd_sub): Likewise.
119 (gfc_check_getarg): Likewise.
120 (gfc_check_getlog): Likewise.
121 (gfc_check_hostnm): Likewise.
122 (gfc_check_hostnm_sub): Likewise.
123 (gfc_check_ttynam_sub): Likewise.
124 (gfc_check_perror): Likewise.
125 (gfc_check_unlink): Likewise.
126 (gfc_check_unlink_sub): Likewise.
127 (gfc_check_system_sub): Likewise.
128 * primary.c (got_delim): Perform correct character range checking
129 for all kinds.
130 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
131 calls to library functions convert_char4_to_char1 and
132 convert_char1_to_char4 for character conversions.
133 (gfc_conv_intrinsic_char): Allow all character kings.
134 (gfc_conv_intrinsic_strcmp): Fix whitespace.
135 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
136 * intrinsic.texi: For all GNU intrinsics accepting character
137 arguments, mention that they're restricted to the default kind.
138 * simplify.c (simplify_achar_char): New function.
139 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
140 gfc_simplify_ichar): Don't error out for wide characters.
141 (gfc_convert_char_constant): New function.
142
143 2008-05-18 Steven G. Kargl <kargls@comcast.net>
144
145 PR fortran/36251
146 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
147 and BIND(C).
148 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
149
150 2008-05-17 Tobias Burnus <burnus@net-b.de>
151
152 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
153 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
154 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
155 Move LOG_GAMMA after LOG10.
156
157 2008-05-17 Tobias Burnus <burnus@net-b.de>
158
159 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
160 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
161 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
162 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
163
164 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
165
166 PR fortran/35756
167 PR fortran/35759
168 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
169 check for calling gfc_trans_where_3.
170
171 PR fortran/35743
172 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
173 if it is calculated to be negative.
174
175 PR fortran/35745
176 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
177 ss->where for scalar right hand sides.
178 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
179 not evaluate scalars outside the loop. Clean up whitespace.
180 * trans.h : Add a bitfield 'where' to gfc_ss.
181
182 2008-05-16 Tobias Burnus <burnus@net-b.de>
183
184 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
185 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
186
187 2008-04-16 Daniel Kraft <d@domob.eu>
188
189 PR fortran/27997
190 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
191 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
192 (check_element_type, check_constructor_type, gfc_check_constructor_type):
193 Extended to support explicit typespec on constructor.
194 (gfc_resolve_character_array_constructor): Pad strings correctly for
195 explicit, constant character length.
196 * trans-array.c: New static global variable "typespec_chararray_ctor"
197 (gfc_trans_array_constructor): New code to support explicit but dynamic
198 character lengths.
199
200 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
201
202 PR fortran/34325
203 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
204 * expr.c (gfc_specification_expr): Supplement the error message with the
205 type that was found.
206 * resolve.c (gfc_resolve_index): Likewise.
207 * match.c (gfc_match_parens): Clarify error message with "at or before".
208 (gfc_match_do): Check for matching pairs of parenthesis.
209
210 2008-05-16 Tobias Burnus <burnus@net-b.de
211
212 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
213 add missing KIND argument to ACHAR and NINT; and state that
214 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
215 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
216
217 2008-05-16 Daniel Kraft <d@domob.eu>
218
219 * primary.c: New private structure "gfc_structure_ctor_component".
220 (gfc_free_structure_ctor_component): New helper function.
221 (gfc_match_structure_constructor): Extended largely to support named
222 arguments and default initialization for structure constructors.
223
224 2008-05-15 Steven G. Kargl <kargls@comcast.net>
225
226 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
227 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
228 possible memory leaks.
229 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
230 of NULL pointers.
231
232 2008-05-15 Steven G. Kargl <kargls@comcast.net>
233
234 PR fortran/36239
235 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
236 rolled integer conversion with gfc_int2int, gfc_real2int, and
237 gfc_complex2int.
238 (gfc_simplify_intconv): Renamed to simplify_intconv.
239
240 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
241 * gfortran.dg/and_or_xor.f90: New test
242
243 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
244 gfc_simplify_xor): Don't range check logical results.
245
246 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
247
248 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
249 character kinds.
250 (gfc_build_compare_string): Add kind argument and use it.
251 (gfc_conv_statement_function): Fix indentation.
252 * gfortran.h (gfc_character_info): New structure.
253 (gfc_character_kinds): New array.
254 * trans-types.c (gfc_character_kinds, gfc_character_types,
255 gfc_pcharacter_types): New array.
256 (gfc_init_kinds): Fill character kinds array.
257 (validate_character): Take care of nondefault character kinds.
258 (gfc_build_uint_type): New function.
259 (gfc_init_types): Take care of nondefault character kinds.
260 (gfc_get_char_type, gfc_get_pchar_type): New functions.
261 (gfc_get_character_type_len): Use gfc_get_char_type.
262 * trans.h (gfc_build_compare_string): Adjust prototype.
263 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
264 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
265 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
266 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
267 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
268 prototypes.
269 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
270 prototypes.
271 * trans-decl.c (gfor_fndecl_compare_string_char4,
272 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
273 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
274 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
275 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
276 gfor_fndecl_concat_string_char4): New function decls.
277 (gfc_build_intrinsic_function_decls): Define new *_char4 function
278 decls.
279 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
280 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
281 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
282 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
283
284 2008-05-15 Sa Liu <saliu@de.ibm.com>
285
286 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
287 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
288 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
289 GNU extensions.
290 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
291 to macro NAMED_INTCST.
292 * symbol.c (std_for_isocbinding_symbol): New helper function to
293 return the standard that supports this isocbinding symbol.
294 (generate_isocbinding_symbol): Do not generate GNU extension symbols
295 if std=f2003. Add new parameter to NAMED_INTCST.
296 * module.c (use_iso_fortran_env_module): Add new parameter to
297 NAMED_INTCST and new field standard to struct intmod_sym.
298 * gfortran.h: Add new parameter to NAMED_INTCST.
299 * trans-types.c (init_c_interop_kinds): Add new parameter to
300 NAMED_INTCST.
301 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
302 and C_INT_FAST128_T.
303
304 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
305
306 PR fortran/36059
307 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
308 arrays that have the TARGET attribute.
309
310 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
311
312 PR fortran/36186
313 * simplify.c (only_convert_cmplx_boz): New function.
314 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
315 Call only_convert_cmplx_boz.
316
317 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
318
319 PR fortran/36233
320 * interface.c (compare_actual_formal): Do not check sizes if the
321 actual is BT_PROCEDURE.
322
323 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
324
325 PR fortran/35682
326 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
327 the same as zero size.
328 (gfc_conv_loop_setup): Fix size calculation.
329
330 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
331
332 PR fortran/35685
333 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
334 handle zero-size sections.
335
336 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
337
338 PR fortran/36215
339 * scanner.c (preprocessor_line): Allocate enough memory for a
340 wide string.
341
342 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
343
344 PR fortran/36176
345 * target-memory.c (gfc_target_expr_size): Correctly treat
346 substrings.
347 (gfc_target_encode_expr): Likewise.
348 (gfc_interpret_complex): Whitespace change.
349
350 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
351
352 PR fortran/35719
353 * trans.c (gfc_call_malloc): If size equals zero, allocate one
354 byte; don't return a null pointer.
355
356 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
357
358 PR fortran/36197
359 * module.c (quote_string): Fix sprintf format.
360
361 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
362
363 PR fortran/36162
364 * module.c (quote_string, unquote_string,
365 mio_allocated_wide_string): New functions.
366 (mio_expr): Call mio_allocated_wide_string where needed.
367
368 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
369
370 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
371 Rename DECL_IS_PURE to DECL_PURE_P.
372
373 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
374
375 * arith.c: (gfc_arith_concat, gfc_compare_string,
376 gfc_compare_with_Cstring, hollerith2representation,
377 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
378 gfc_hollerith2character, gfc_hollerith2logical): Use wide
379 characters for character constants.
380 * data.c (create_character_intializer): Likewise.
381 * decl.c (gfc_set_constant_character_len): Likewise.
382 * dump-parse-tree.c (show_char_const): Correctly dump wide
383 character strings.
384 error.c (print_wide_char): Rename into gfc_print_wide_char.
385 (show_locus): Adapt to new prototype of gfc_print_wide_char.
386 expr.c (free_expr0): Representation is now disjunct from
387 character string value, so we always free it.
388 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
389 to wide character strings.
390 * gfortran.h (gfc_expr): Make value.character.string a wide string.
391 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
392 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
393 (gfc_get_wide_string): New macro.
394 (gfc_print_wide_char): New prototype.
395 * io.c (format_string): Make a wide string.
396 (next_char, gfc_match_format, compare_to_allowed_values,
397 gfc_match_open): Deal with wide strings.
398 * module.c (mio_expr): Convert between wide strings and ASCII ones.
399 * primary.c (match_hollerith_constant, match_charkind_name):
400 Handle wide strings.
401 * resolve.c (build_default_init_expr): Likewise.
402 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
403 gfc_char_to_widechar): New functions.
404 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
405 Changes in prototypes.
406 (gfc_define_undef_line, load_line, preprocessor_line,
407 include_line, load_file, gfc_read_orig_filename): Handle wide
408 strings.
409 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
410 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
411 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
412 gfc_simplify_repeat): Handle wide strings.
413 (wide_strspn, wide_strcspn): New helper functions.
414 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
415 Handle wide strings.
416 * symbol.c (generate_isocbinding_symbol): Likewise.
417 * target-memory.c (size_character, gfc_target_expr_size,
418 encode_character, gfc_target_encode_expr, gfc_interpret_character,
419 gfc_target_interpret_expr): Handle wide strings.
420 * trans-const.c (gfc_conv_string_init): Lower wide strings to
421 narrow ones.
422 (gfc_conv_constant_to_tree): Likewise.
423 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
424 * trans-io.c (gfc_new_nml_name_expr): Likewise.
425 * trans-stmt.c (gfc_trans_label_assign): Likewise.
426
427 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
428
429 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
430 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
431 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
432 with ATTRIBUTE_UNUSED.
433
434 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
435
436 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
437 * simplify.c (gfc_simplify_lgamma): Likewise.
438
439 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
440
441 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
442 gfc_peek_ascii_char.
443 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
444 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
445 match_string_p, match_attr_spec, gfc_match_suffix,
446 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
447 Likewise.
448 * gfortran.h (gfc_char_t): New type.
449 (gfc_linebuf): Make line member a gfc_char_t.
450 (locus): Make nextc member a gfc_char_t.
451 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
452 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
453 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
454 * error.c (print_wide_char): New function.
455 (show_locus): Use print_wide_char and gfc_wide_strlen.
456 * io.c (next_char): Use gfc_char_t type.
457 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
458 * match.c (gfc_match_parens, gfc_match_eos,
459 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
460 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
461 gfc_match_common): Likewise.
462 * match.h (gfc_match_special_char): Change prototype.
463 * parse.c (decode_specification_statement, decode_statement,
464 decode_omp_directive, next_free, next_fixed): Use
465 gfc_peek_ascii_char and gfc_next_ascii_char.
466 * primary.c (gfc_check_digit): Change name.
467 (match_digits, match_hollerith_constant, match_boz_constant,
468 match_real_constant, next_string_char, match_charkind_name,
469 match_string_constant, match_logical_constant_string,
470 match_complex_constant, match_actual_arg, match_varspec,
471 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
472 gfc_next_ascii_char.
473 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
474 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
475 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
476 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
477 gfc_next_ascii_char, gfc_peek_ascii_char):
478 New functions.
479 (next_char, gfc_define_undef_line, skip_free_comments,
480 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
481 gfc_error_recovery, load_line, preprocessor_line, include_line,
482 load_file, gfc_read_orig_filename): Use gfc_char_t for source
483 characters and the {gfc_,}wide_* functions to manipulate wide
484 strings.
485
486 2008-05-06 Tobias Burnus <burnus@net-b.de>
487
488 PR fortran/36117
489 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
490 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
491 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
492 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
493 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
494
495 2008-05-03 Janus Weil <jaydub66@gmail.com>
496
497 * misc.c (gfc_clear_ts): Set interface to NULL.
498
499 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
500
501 PR fortran/33268
502 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
503 gfc_expr value union. Add io_kind enum to here from io.c.
504 * io.c (gfc_free_dt): Free extra_comma.
505 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
506 BT_CHARACTER, resolve to format_expr and set default unit. Error if
507 io_kind is M_WRITE. (match_io): Match the extra comma and set new
508 pointer, extra_comma.
509
510 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
511
512 PR35940/Fortran
513 * simplify.c (gfc_simplify_index): Check for direction argument
514 being a constant.
515
516 2008-05-01 Janus Weil <jaydub66@gmail.com>
517
518 * gfortran.h (struct gfc_symbol): Moving "interface" member to
519 gfc_typespec (plus fixing a small docu error).
520 * interface.c (gfc_procedure_use): Ditto.
521 * decl.c (match_procedure_decl): Ditto.
522 * resolve.c (resolve_specific_f0,
523 resolve_specific_f0, resolve_symbol): Ditto.
524
525 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
526
527 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
528 * intrinsic.h (gfc_check_selected_char_kind,
529 gfc_simplify_selected_char_kind): New prototypes.
530 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
531 * trans.h (gfor_fndecl_sc_kind): New function decl.
532 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
533 * arith.c (gfc_compare_with_Cstring): New function.
534 * arith.h (gfc_compare_with_Cstring): New prototype.
535 * check.c (gfc_check_selected_char_kind): New function.
536 * primary.c (match_string_constant, match_kind_param): Mark
537 symbols used as literal constant kind param as referenced.
538 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
539 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
540 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
541 * simplify.c (gfc_simplify_selected_char_kind): New function.
542
543 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
544
545 PR fortran/35997
546 * module.c (find_symbol): Do not return a result for a symbol
547 that has been renamed in another module.
548
549 2008-04-26 George Helffrich <george@gcc.gnu.org>
550
551 PR fortran/35892
552 PR fortran/35154
553 * trans-common.c (create_common): Add decl to function
554 chain (if inside one) to preserve identifier scope in debug output.
555
556 2008-04-25 Jan Hubicka <jh@suse.cz>
557
558 * trans-decl.c (trans_function_start): Update.
559
560 2008-04-25 Tobias Burnus <burnus@net-b.de>
561 Daniel Franke <franke.daniel@gmail.com>
562
563 PR fortran/35156
564 * gfortranspec.c (lang_specific_driver): Deprecate
565 -M option; fix ICE when "-M" is last argument and
566 make "-M<dir>" work.
567 * options.c (gfc_handle_module_path_options):
568 Use -J instead of -M in error messages.
569 * invoke.texi: Mark -M as depecated.
570
571 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
572 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
573
574 PR fortran/35994
575 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
576 loop counter offset.
577
578 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
579
580 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
581 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
582 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
583 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
584 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
585 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
586 (create_common): Don't set TREE_INVARIANT.
587 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
588 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
589
590 2008-04-21 Steve Ellcey <sje@cup.hp.com>
591
592 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
593
594 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
595
596 PR fortran/35019
597 * gfortranspec.c (lookup_option): Properly handle separated arguments
598 in -J option, print missing argument message when necessary.
599
600 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
601
602 PR fortran/35882
603 * scanner.c (skip_fixed_comments): Update continue_line when comment is
604 detected. (gfc_next_char_literal): Likewise.
605
606 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
607
608 PR fortran/35944
609 PR fortran/35946
610 PR fortran/35947
611 * trans_array.c (gfc_trans_array_constructor): Temporarily
612 realign loop, if loop->from is not zero, before creating
613 the temporary array and provide an offset.
614
615 PR fortran/35959
616 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
617 and allow for NULL body. Change all references from
618 init_default_dt to gfc_init_default_dt.
619 * trans.h : Add prototype for gfc_init_default_dt.
620 * trans-array.c (gfc_trans_deferred_vars): After nullification
621 call gfc_init_default_dt for derived types with allocatable
622 components.
623
624 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
625
626 PR fortran/35892
627 * trans-common.c (create_common): Revert patch causing regression.
628
629 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
630
631 PR fortran/35724
632 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
633 optional argument attribute.
634
635 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
636
637 PR fortran/35932
638 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
639 is not used, the argument must be converted.
640
641 2008-04-16 Jakub Jelinek <jakub@redhat.com>
642
643 PR target/35662
644 * f95-lang.c (gfc_init_builtin_functions): Make sure
645 BUILT_IN_SINCOS{,F,L} types aren't varargs.
646
647 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
648
649 PR fortran/35864
650 * expr.c (scalarize_intrinsic_call): Reorder identification of
651 array argument so that if one is not found a segfault does not
652 occur. Return FAILURE if all scalar arguments.
653
654 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
655 Tobias Burnus <burnus@net-b.de>
656
657 PR fortran/35882
658 * options.c (gfc_init_options): Set the default maximum continuation
659 lines to 255 for both free and fixed form source for warnings.
660 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
661 the -std=f95 free form max continuations to 39 for warnings.
662 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
663 if it is less than the current locus.
664
665 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
666
667 PR fortran/25829 28655
668 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
669 round, sign, and id. (match_open_element): Match new tags.
670 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
671 for DEFAULT only. Update error messages. (match_dt_element): Fix match
672 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
673 new expressions. (match_inquire_element): Match new tags.
674 (gfc_match_inquire): Add constraint for ID and PENDING.
675 (gfc_resolve_inquire): Resolve new tags.
676 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
677 mask for ID parameter.
678 * ioparm.def: Fix order of parameters for pending, round, and sign.
679 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
680 things don't work.
681
682 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
683
684 PR fortran/35780
685 * expr.c (scalarize_intrinsic_call): Identify which argument is
686 an array and use that as the template.
687 (check_init_expr): Remove tests that first argument is an array
688 in the call to scalarize_intrinsic_call.
689
690 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
691
692 PR fortran/35832
693 * io.c (io_tag): Add field 'value'. Split 'spec' field in
694 existing io_tags.
695 (match_etag, match_vtag, match_ltag): Split parsing in two steps
696 to give better error messages.
697
698 2008-04-06 Tobias Burnus <burnus@net-b.de>
699
700 * io.c (check_io_constraints): Add constrains. ID= requires
701 asynchronous= and asynchronous= must be init expression.
702
703 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
704
705 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
706
707 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
708
709 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
710 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
711 functions and make them static. Add new gfc_dump_parse_tree
712 function.
713 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
714 (gfc_status, gfc_status_char): Delete prototypes.
715 * error.c (gfc_status, gfc_status_char): Remove functions.
716 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
717 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
718 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
719 gfc_status and exit.
720 (gfc_handle_option): Rename verbose into dump_parse_tree.
721 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
722
723 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
724 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
725
726 PR fortran/25829 28655
727 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
728 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
729 (gfc_open): Add pointers for decimal, encoding, round, sign,
730 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
731 encoding, pending, round, sign, size, id.
732 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
733 asynchronous, blank, decimal, delim, pad, round, sign.
734 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
735 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
736 * trans-stmt.h (gfc_trans_wait): New function prototype.
737 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
738 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
739 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
740 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
741 tags. (gfc_resolve_open): Remove comment around check for allowed
742 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
743 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
744 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
745 (match_wait_element): New function. (gfc_match_wait): New function.
746 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
747 (resolve_code): Add case for EXEC_WAIT.
748 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
749 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
750 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
751 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
752 (gfc_trans_open): Add mask bits for new I/O tags.
753 (gfc_trans_inquire): Add mask bits for new I/O tags.
754 (gfc_trans_wait): New translation function.
755 (build_dt): Add mask bits for new I/O tags.
756 * match.c (gfc_match_if) Add matcher for "wait".
757 * match.h (gfc_match_wait): Prototype for new function.
758 * ioparm.def: Add new I/O parameter definitions.
759 * parse.c (decode_statement): Add match for "wait" statement.
760 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
761
762 2008-04-03 Jakub Jelinek <jakub@redhat.com>
763
764 PR fortran/35786
765 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
766 isn't a variable.
767
768 2008-04-03 Tom Tromey <tromey@redhat.com>
769
770 * Make-lang.in (fortran_OBJS): New variable.
771
772 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
773
774 * f95-lang.c (insert_block): Kill.
775
776 2008-04-01 George Helffrich <george@gcc.gnu.org>
777
778 PR fortran/35154, fortran/23057
779 * trans-common.c (create_common): Add decl to function
780 chain to preserve identifier scope in debug output.
781
782 2008-04-01 Joseph Myers <joseph@codesourcery.com>
783
784 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
785 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
786 gpl.texi.
787
788 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
789
790 PR fortran/35740
791 * resolve.c (resolve_function, resolve_call): If the procedure
792 is elemental do not look for noncopying intrinsics.
793
794 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
795
796 PR fortran/35698
797 * trans-array.c (gfc_array_init_size): Set 'size' zero if
798 negative in one dimension.
799
800 PR fortran/35702
801 * trans-expr.c (gfc_trans_string_copy): Only assign a char
802 directly if the lhs and rhs types are the same.
803
804 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
805 Paul Richard Thomas <paul.richard.thomas@gmail.com>
806
807 PR fortran/34714
808 * primary.c (match_variable): Improved matching of function
809 result variables.
810 * resolve.c (resolve_allocate_deallocate): Removed checks if
811 the actual argument for STAT is a variable.
812
813 2008-03-28 Tobias Burnus <burnus@net-b.de>
814
815 * symbol.c (gfc_get_default_type): Fix error message; option
816 -fallow_leading_underscore should be -fallow-leading-underscore
817
818 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
819
820 PR fortran/35724
821 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
822 optional argument attribute.
823
824 2008-03-27 Tom Tromey <tromey@redhat.com>
825
826 * Make-lang.in: Revert automatic dependency patch.
827
828 2008-03-25 Tom Tromey <tromey@redhat.com>
829
830 * Make-lang.in: Remove .o targets.
831 (fortran_OBJS): New variable.
832 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
833 setting.
834 (GFORTRAN_D_OBJS): Update.
835 (GFORTRAN_TRANS_DEPS): Remove.
836
837 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
838
839 PR fortran/34813
840 * resolve.c (resolve_structure_cons): It is an error to assign
841 NULL to anything other than a pointer or allocatable component.
842
843 PR fortran/33295
844 * resolve.c (resolve_symbol): If the symbol is a derived type,
845 resolve the derived type. If the symbol is a derived type
846 function, ensure that the derived type is visible in the same
847 namespace as the function.
848
849 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
850
851 * trans.h: Use fold_build in build1_v, build2_v and build3_v
852 macros.
853 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
854 Don't use build2_v macro.
855
856 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
857
858 PR fortran/35152
859 * interface.c (gfc_procedure_use): Check for keyworded arguments in
860 procedures without explicit interfaces.
861
862 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
863
864 PR fortran/35470
865 * resolve.c (check_assumed_size_reference): Only visit the
866 first reference and look directly at the highest dimension.
867
868 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
869
870 PR fortran/35184
871 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
872 assert.
873
874 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
875
876 PR fortran/35584
877 * resolve.c (resolve_branch): Less strict and pessimistic warning
878 message.
879
880 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
881
882 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
883 (gfc_be_parse_file): Call clear_binding_stack from here.
884 (gfc_clear_binding_stack): Rename to clear_binding_stack.
885
886 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
887
888 PR fortran/35474
889 * module.c (mio_symtree_ref): After providing a symbol for a
890 missing equivalence member, resolve and NULL the fixups.
891
892 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
893
894 * invoke.texi (Error and Warning Options): Document
895 -Wline-truncation.
896
897 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
898
899 PR fortran/34956
900 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
901 checking bounds of absent optional arguments.
902
903 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
904
905 PR fortran/33197
906 * intrinsic.c (add_functions): Add simplification routines for
907 ERF, DERF, ERFC and DERFC.
908 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
909 extensions into Fortran 2008 features.
910 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
911 prototypes.
912 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
913
914 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
915
916 PR fortran/33197
917 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
918 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
919 ERFC_SCALED, LOG_GAMMA and HYPOT.
920 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
921 gfc_resolve_hypot): New prototypes.
922 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
923 ACOSH, ASINH and ATANH available.
924 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
925 * lang.opt: Add -std=f2008 option.
926 * libgfortran.h: Define GFC_STD_F2008.
927 * lang-specs.h: Add .f08 and .F08 file suffixes.
928 * iresolve.c (gfc_resolve_hypot): New function.
929 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
930 * check.c (gfc_check_hypot): New function.
931 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
932 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
933 (form_from_filename): Add .f08 suffix.
934 (gfc_handle_option): Handle -std=f2008 option.
935 * simplify.c (gfc_simplify_hypot): New function.
936 * gfortran.texi: Document Fortran 2008 status and file extensions.
937 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
938 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
939 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
940 * invoke.texi: Document the new -std=f2008 option.
941
942 2008-03-02 Jakub Jelinek <jakub@redhat.com>
943
944 * gfortranspec.c (lang_specific_driver): Update copyright notice
945 dates.
946
947 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
948
949 PR fortran/35059
950 * expr.c (find_array_element): Modify traversing the constructor to
951 avoid trying to access NULL memory pointed to by next for the
952 last element. (find_array_section): Exit while loop if cons->next is
953 NULL.
954 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
955 (gfc_conv_function_call): Same.
956 * decl.c (gfc_match_implicit): Same.
957 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
958
959 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
960
961 PR fortran/31463
962 PR fortran/33950
963 PR fortran/34296
964 * lang.opt: Added -Wreturn-type.
965 * options.c (gfc_handle_option): Recognize -Wreturn-type.
966 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
967 where the result value is not set.
968 (gfc_generate_function_code): Likewise.
969 (generate_local_decl): Emit warnings for funtions whose RESULT
970 variable is not set.
971
972 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
973
974 PR fortran/34868
975 * trans-expr.c (gfc_conv_variable): Don't build indirect
976 references when explicit interface is mandated.
977 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
978 on the result symbol as well as the procedure symbol.
979
980 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
981
982 PR fortran/33387
983 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
984 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
985 gfor_fndecl_math_exponent16.
986 * f95-lang.c (build_builtin_fntypes): Add new function types.
987 (gfc_init_builtin_functions): Add new builtins for nextafter,
988 frexp, ldexp, fabs, scalbn and inf.
989 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
990 (gfc_resolve_scale): Don't convert type of second argument.
991 (gfc_resolve_set_exponent): Likewise.
992 (gfc_resolve_size): Don't add hidden arguments.
993 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
994 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
995 gfor_fndecl_math_exponent16.
996 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
997 for scalbn, fraction, nearest, rrspacing, set_exponent and
998 spacing.
999 (gfc_conv_intrinsic_exponent): Directly call frexp.
1000 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
1001 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1002 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
1003 functions.
1004 (gfc_conv_intrinsic_function): Use the new functions above.
1005
1006 2008-02-26 Tobias Burnus <burnus@net-b.de>
1007
1008 PR fortran/35033
1009 * interface.c (check_operator_interface): Show better line for error
1010 messages; fix constrains for user-defined assignment operators.
1011 (gfc_extend_assign): Fix constrains for user-defined assignment
1012 operators.
1013
1014 2008-02-26 Tom Tromey <tromey@redhat.com>
1015
1016 * trans-io.c (set_error_locus): Remove old location code.
1017 * trans-decl.c (gfc_set_decl_location): Remove old location code.
1018 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
1019 * scanner.c (gfc_gobble_whitespace): Remove old location code.
1020 (get_file): Likewise.
1021 (preprocessor_line): Likewise.
1022 (load_file): Likewise.
1023 (gfc_new_file): Likewise.
1024 * trans.c (gfc_trans_runtime_check): Remove old location code.
1025 (gfc_get_backend_locus): Likewise.
1026 (gfc_set_backend_locus): Likewise.
1027 * data.c (gfc_assign_data_value): Remove old location code.
1028 * error.c (show_locus): Remove old location code.
1029 * gfortran.h (gfc_linebuf): Remove old location code.
1030 (gfc_linebuf_linenum): Remove old-location variant.
1031
1032 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1033
1034 PR fortran/34729
1035 * trans-const.c (gfc_build_string_const): Don't call gettext.
1036 (gfc_build_localized_string_const): New function.
1037 * trans-const.h (gfc_build_localized_string_const): New prototype.
1038 * trans.c (gfc_trans_runtime_check): Use
1039 gfc_build_localized_string_const instead of gfc_build_string_const.
1040 (gfc_call_malloc): Likewise.
1041 (gfc_allocate_with_status): Likewise.
1042 (gfc_allocate_array_with_status): Likewise.
1043 (gfc_deallocate_with_status): Likewise.
1044 (gfc_call_realloc): Likewise.
1045 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
1046
1047 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1048
1049 * arith.c: Update copyright years.
1050 * arith.h: Likewise.
1051 * array.c: Likewise.
1052 * bbt.c: Likewise.
1053 * check.c: Likewise.
1054 * data.c: Likewise.
1055 * data.h: Likewise.
1056 * decl.c: Likewise.
1057 * dependency.c: Likewise.
1058 * dependency.h: Likewise.
1059 * dump-parse-tree.c: Likewise.
1060 * error.c: Likewise.
1061 * expr.c: Likewise.
1062 * gfc-internals.texi: Likewise.
1063 * gfortran.h: Likewise.
1064 * gfortran.texi: Likewise.
1065 * gfortranspec.c: Likewise.
1066 * interface.c: Likewise.
1067 * intrinsic.c: Likewise.
1068 * intrinsic.h: Likewise.
1069 * intrinsic.texi: Likewise.
1070 * invoke.texi: Likewise.
1071 * io.c: Likewise.
1072 * iresolve.c: Likewise.
1073 * iso-c-binding.def: Likewise.
1074 * iso-fortran-env.def: Likewise.
1075 * lang-specs.h: Likewise.
1076 * lang.opt: Likewise.
1077 * libgfortran.h: Likewise.
1078 * match.c: Likewise.
1079 * match.h: Likewise.
1080 * matchexp.c: Likewise.
1081 * misc.c: Likewise.
1082 * module.c: Likewise.
1083 * openmp.c: Likewise.
1084 * options.c: Likewise.
1085 * parse.c: Likewise.
1086 * parse.h: Likewise.
1087 * primary.c: Likewise.
1088 * resolve.c: Likewise.
1089 * scanner.c: Likewise.
1090 * simplify.c: Likewise.
1091 * st.c: Likewise.
1092 * symbol.c: Likewise.
1093 * target-memory.c: Likewise.
1094 * target-memory.h: Likewise.
1095 * trans-array.h: Likewise.
1096 * trans-const.h: Likewise.
1097 * trans-stmt.h: Likewise.
1098 * trans-types.c: Likewise.
1099 * trans-types.h: Likewise.
1100 * types.def: Likewise.
1101
1102 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1103
1104 PR fortran/35223
1105 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
1106 (gfc_simplify_ibset): Remove call to range_check.
1107 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
1108 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
1109 temporary gfc_typspec variable.
1110
1111 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1112
1113 * trans-array.c (gfc_conv_descriptor_data_get,
1114 gfc_conv_descriptor_data_set_internal,
1115 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
1116 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
1117 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1118 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
1119 gfc_conv_array_transpose, gfc_grow_array,
1120 gfc_trans_array_constructor_subarray,
1121 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
1122 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
1123 gfc_conv_array_initializer, gfc_trans_array_bounds,
1124 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1125 gfc_get_dataptr_offset, gfc_conv_array_parameter,
1126 gfc_trans_dealloc_allocated, get_full_array_size,
1127 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
1128 instead of buildN.
1129 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
1130 gfc_conv_component_ref, gfc_conv_cst_int_power,
1131 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
1132 * trans-common.c (create_common): Likewise.
1133 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
1134 Likewise.
1135 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
1136 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
1137 gfc_trans_integer_select, gfc_trans_character_select,
1138 gfc_trans_forall_loop, compute_overall_iter_number,
1139 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
1140 gfc_trans_deallocate): Likewise.
1141 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
1142 gfc_allocate_with_status, gfc_allocate_array_with_status,
1143 gfc_deallocate_with_status): Likewise.
1144 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
1145 * trans-io.c (set_parameter_const, set_parameter_value,
1146 set_parameter_ref, set_string, set_internal_unit, io_result,
1147 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
1148 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
1149 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
1150 gfc_generate_function_code): Likewise.
1151 * convert.c (convert): Likewise.
1152 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1153 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
1154 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
1155 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
1156 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1157 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
1158 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1159 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
1160 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
1161 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
1162 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1163 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
1164 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1165 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
1166 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
1167 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
1168 gfc_conv_intrinsic_repeat): Likewise.
1169
1170 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1171
1172 PR target/25477
1173 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
1174 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
1175 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
1176 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
1177 * trans-decl.c: Likewise.
1178
1179 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1180
1181 PR fortran/35059
1182 * expr.c (find_array_element): Modify traversing the constructor to
1183 avoid trying to access NULL memory pointed to by next for the
1184 last element. (find_array_section): Exit while loop if cons->next is
1185 NULL.
1186
1187 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1188
1189 PR fortran/34907
1190 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
1191 structure.
1192 (gfc_resolve_aint): Likewise.
1193 (gfc_resolve_anint): Likewise.
1194 (gfc_resolve_besn): Likewise.
1195 (gfc_resolve_cshift): Likewise.
1196 (gfc_resolve_ctime): Likewise.
1197 (gfc_resolve_eoshift): Likewise.
1198 (gfc_resolve_index_func): Likewise.
1199 (gfc_resolve_isatty): Likewise.
1200 (gfc_resolve_malloc): Likewise.
1201 (gfc_resolve_rrspacing): Likewise.
1202 (gfc_resolve_scale): Likewise.
1203 (gfc_resolve_set_exponent): Likewise.
1204 (gfc_resolve_spacing): Likewise.
1205 (gfc_resolve_spacing): Likewise.
1206 (gfc_resolve_fgetc): Likewise.
1207 (gfc_resolve_fputc): Likewise.
1208 (gfc_resolve_ftell): Likewise.
1209 (gfc_resolve_ttynam): Likewise.
1210 (gfc_resolve_alarm_sub): Likewise.
1211 (gfc_resolve_mvbits): Likewise.
1212 (gfc_resolve_getarg): Likewise.
1213 (gfc_resolve_signal_sub): Likewise.
1214 (gfc_resolve_exit): Likewise.
1215 (gfc_resolve_flush): Likewise.
1216 (gfc_resolve_free): Likewise.
1217 (gfc_resolve_ctime_sub): Likewise.
1218 (gfc_resolve_fgetc_sub): Likewise.
1219 (gfc_resolve_fputc_sub): Likewise.
1220 (gfc_resolve_fseek_sub): Likewise.
1221 (gfc_resolve_ftell_sub): Likewise.
1222 (gfc_resolve_ttynam_sub): Likewise.
1223
1224 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1225
1226 * gfc-internals.texi: Fix typos and markup nits.
1227 * gfortran.texi: Likewise.
1228 * intrinsic.texi: Likewise.
1229
1230 2008-02-21 Richard Guenther <rguenther@suse.de>
1231
1232 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
1233 as unary PAREN_EXPR for real and complex typed expressions.
1234 (gfc_conv_unary_op): Fold the built tree.
1235
1236 2008-02-20 Tobias Burnus <burnus@net-b.de>
1237
1238 PR fortran/34997
1239 * match.c (gfc_match_name): Improve error message for '$'.
1240
1241 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
1242
1243 PR fortran/35030
1244 * expr.c (gfc_check_pointer_assign): Add type and kind information
1245 to type-mismatch message.
1246 (gfc_check_assign): Unify error messages.
1247
1248 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1249
1250 PR fortran/34952
1251 * gfortran.texi: Create new section for unimplemented extensions.
1252 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
1253 Remove "smaller projects" list. Fix a few typos.
1254
1255 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1256
1257 * intrinsic.texi: Rename INDEX node to avoid clashing with
1258 index.html on case-insensitive systems.
1259
1260 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1261
1262 PR fortran/35150
1263 * trans-expr.c (gfc_conv_function_call): Force evaluation of
1264 se->expr.
1265
1266 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
1267
1268 PR fortran/35019
1269 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
1270 likewise '-I <dir>' and '-I<dir>'.
1271
1272 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1273
1274 PR other/35107
1275 * Make-lang.in (f951): Add $(GMPLIBS).
1276
1277 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1278
1279 PR fortran/35037
1280 * trans-common.c (build_field): Mark fields as volatile when needed.
1281
1282 2008-02-05 Tobias Burnus <burnus@net-b.de>
1283
1284 PR fortran/35093
1285 * data.c (gfc_assign_data_value): Only free "size" if
1286 it has not already been freed.
1287
1288 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1289
1290 PR fortran/34945
1291 * array.c (match_array_element_spec): Remove check for negative
1292 array size.
1293 (gfc_resolve_array_spec): Add check for negative size.
1294
1295 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1296
1297 PR fortran/32315
1298 * data.c (gfc_assign_data_value): Add bounds check for array
1299 references.
1300
1301 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
1302
1303 * resolve.c (resolve_where): Fix typo.
1304 (gfc_resolve_where_code_in_forall): Likewise.
1305
1306 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
1307
1308 PR fortran/32760
1309 * resolve.c (resolve_allocate_deallocate): New function.
1310 (resolve_code): Call it for allocate and deallocate.
1311 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
1312 the checking of the STAT tag and put in above new function.
1313 * primary,c (match_variable): Do not fix flavor of host
1314 associated symbols yet if the type is not known.
1315
1316 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
1317
1318 PR fortran/34910
1319 * expr.c (gfc_check_assign): It is an error to assign
1320 to a sibling procedure.
1321
1322 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
1323
1324 PR fortran/34975
1325 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
1326 delete_symtree to gfc_delete_symtree.
1327 * gfortran.h : Add prototype for gfc_delete_symtree.
1328 * module.c (load_generic_interfaces): Transfer symbol to a
1329 unique symtree and delete old symtree, instead of renaming.
1330 (read_module): The rsym and the found symbol are the same, so
1331 the found symtree can be deleted.
1332
1333 PR fortran/34429
1334 * decl.c (match_char_spec): Remove the constraint on deferred
1335 matching of functions and free the length expression.
1336 delete_symtree to gfc_delete_symtree.
1337 (gfc_match_type_spec): Whitespace.
1338 (gfc_match_function_decl): Defer characteristic association for
1339 all types except BT_UNKNOWN.
1340 * parse.c (decode_specification_statement): Only derived type
1341 function matching is delayed to the end of specification.
1342
1343 2008-01-28 Tobias Burnus <burnus@net-b.de>
1344
1345 PR libfortran/34980
1346 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
1347
1348 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1349
1350 PR fortran/34990
1351 * array.c (gfc_check_constructor_type): Revert clearing the expression.
1352
1353 2008-01-26 Tobias Burnus <burnus@net-b.de>
1354
1355 PR fortran/34848
1356 * trans-expr.c (gfc_conv_function_call): Don't call
1357 gfc_add_interface_mapping if the expression is NULL.
1358
1359 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1360
1361 PR fortran/31610
1362 * trans-array.c (gfc_trans_create_temp_array): Remove call to
1363 gcc_assert (integer_zerop (loop->from[n])).
1364
1365 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
1366
1367 PR fortran/34661
1368 * resolve.c (resolve_where): Added check if user-defined assignment
1369 operator is an elemental subroutine.
1370 (gfc_resolve_where_code_in_forall): Likewise.
1371
1372 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1373
1374 PR fortran/33375
1375 PR fortran/34858
1376 * gfortran.h: Revert changes from 2008-01-17.
1377 * match.c: Likewise.
1378 * symbol.c: Likewise.
1379 (gfc_undo_symbols): Undo namespace changes related to common blocks.
1380
1381 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1382
1383 PR fortran/34202
1384 * data.c (formalize_structure_cons): Skip formalization on
1385 empty structures.
1386
1387 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1388
1389 * gfortran.texi (OpenMP): Extended existing documentation.
1390 (contributors): Added major contributors of 2008 that were
1391 not listed yet.
1392 (proposed extensions): Removed implemented items.
1393
1394 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
1395
1396 PR fortran/34872
1397 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
1398 seen, check for a statement label and, if present, delete it
1399 and set the locus to the start of the statement.
1400
1401 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1402
1403 PR fortran/34875
1404 * trans-io.c (gfc_trans_transfer): If the array reference in a
1405 read has a vector subscript, use gfc_conv_subref_array_arg to
1406 copy back the temporary.
1407
1408 2008-01-22 Tobias Burnus <burnus@net-b.de>
1409
1410 PR fortran/34848
1411 * interface.c (compare_actual_formal): Fix adding type
1412 to missing_arg_type for absent optional arguments.
1413
1414 2008-01-22 Tobias Burnus <burnus@net-b.de>
1415
1416 PR fortran/34907
1417 * parse.c (parse_spec): Change = into ==.
1418
1419 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
1420
1421 PR fortran/34915
1422 * expr.c (check_elemental): Fix check for valid data types.
1423
1424 2008-01-22 Tobias Burnus <burnus@net-b.de>
1425
1426 PR fortran/34899
1427 * scanner.c (load_line): Support <tab><digit> continuation lines.
1428 * invoke.texi (-Wtabs): Document this.
1429
1430 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1431
1432 PR fortran/34896
1433 * module.c (read_module): Set use_rename attribute.
1434
1435 2007-01-21 Tobias Burnus <burnus@net-b.de>
1436
1437 PR fortran/34901
1438 * interface.c (compare_parameter): Improved error message
1439 for arguments of same type and mismatched kinds.
1440
1441 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1442
1443 PR fortran/34861
1444 * resolve.c (resolve_entries): Do not do an array bounds check
1445 if the result symbols are the same.
1446
1447 PR fortran/34854
1448 * module.c (read_module) : Hide the symtree of the previous
1449 version of the symbol if this symbol is renamed.
1450
1451 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1452
1453 PR fortran/34784
1454 * array.c (gfc_check_constructor_type): Clear the expression ts
1455 so that the checking starts from the deepest level of array
1456 constructor.
1457 * primary.c (match_varspec): If an unknown type is changed to
1458 default character and the attempt to match a substring fails,
1459 change it back to unknown.
1460
1461 PR fortran/34785
1462 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
1463 NULL for an array constructor, use the cl.length expression to
1464 build it.
1465 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
1466 a tree assignment.
1467
1468 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1469
1470 PR fortran/34817
1471 PR fortran/34838
1472 * iresolve.c (gfc_resolve_all): Remove conversion of mask
1473 argument to kind=1 by removing call to resolve_mask_arg().
1474 (gfc_resolve_any): Likewise.
1475
1476 2008-01-19 Tobias Burnus <burnus@net-b.de>
1477
1478 PR fortran/34760
1479 * primary.c (match_variable): Handle FL_UNKNOWN without
1480 uneducated guessing.
1481 (match_variable): Improve error message.
1482
1483 2008-01-18 Tobias Burnus <burnus@net-b.de>
1484
1485 PR fortran/32616
1486 * interface.c (get_expr_storage_size): Return storage size
1487 for array element designators.
1488 (compare_actual_formal): Reject unequal string sizes for
1489 assumed-shape dummy arguments. And fix error message for
1490 array-sections with vector subscripts.
1491
1492 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1493
1494 PR fortran/34556
1495 * simplify.c (is_constant_array_expr): New static function that returns
1496 true if the given expression is an array and is constant.
1497 (gfc_simplify_reshape): Use new function.
1498
1499 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
1500
1501 PR fortran/33375
1502 * symbol.c (free_common_tree): Renamed to ...
1503 (gfc_free_common_tree): This. Remove static.
1504 (gfc_free_namespace): Updated.
1505
1506 * gfortran.h (gfc_free_common_tree): New.
1507
1508 * match.c (gfc_match_common): Call gfc_free_common_tree () with
1509 gfc_current_ns->common_root and set gfc_current_ns->common_root
1510 to NULL on syntax error.
1511
1512 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
1513
1514 PR fortran/34686
1515 * trans-expr.c (gfc_conv_function_call): Use proper
1516 type for returned character pointers.
1517
1518 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
1519
1520 PR fortran/34429
1521 PR fortran/34431
1522 PR fortran/34471
1523 * decl.c : Remove gfc_function_kind_locus and
1524 gfc_function_type_locus. Add gfc_matching_function.
1525 (match_char_length): If matching a function and the length
1526 does not match, return MATCH_YES and try again later.
1527 (gfc_match_kind_spec): The same.
1528 (match_char_kind): The same.
1529 (gfc_match_type_spec): The same for numeric and derived types.
1530 (match_prefix): Rename as gfc_match_prefix.
1531 (gfc_match_function_decl): Except for function valued character
1532 lengths, defer applying kind, type and charlen info until the
1533 end of specification block.
1534 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
1535 parse.c (decode_specification_statement): New function.
1536 (decode_statement): Call it when a function has kind = -1. Set
1537 and reset gfc_matching function, as function statement is being
1538 matched.
1539 (match_deferred_characteristics): Simplify with a single call
1540 to gfc_match_prefix. Do appropriate error handling. In any
1541 case, make sure that kind = -1 is reset or corrected.
1542 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
1543 Throw an error if kind = -1 after last specification statement.
1544 parse.h : Prototype for gfc_match_prefix.
1545
1546 2008-01-16 Tobias Burnus <burnus@net-b.de>
1547
1548 PR fortran/34796
1549 * interface.c (compare_parameter): Allow AS_DEFERRED array
1550 elements and reject attr.pointer array elemenents.
1551 (get_expr_storage_size): Return storage size of elements of
1552 assumed-shape and pointer arrays.
1553
1554 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
1555
1556 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
1557 for flag_tree_parallelize_loops.
1558
1559 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1560
1561 PR libfortran/34671
1562 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
1563 (gfc_resolve_any): Likewise.
1564 (gfc_resolve_count): Likewise. Don't append kind of
1565 argument to function name.
1566
1567 2008-01-13 Tobias Burnus <burnus@net-b.de>
1568
1569 PR fortran/34665
1570 * resolve.c (resolve_actual_arglist): For expressions,
1571 also check for assume-sized arrays.
1572 * interface.c (compare_parameter): Move F2003 character checks
1573 here, print error messages here, reject elements of
1574 assumed-shape array as argument to dummy arrays.
1575 (compare_actual_formal): Update for the changes above.
1576
1577 2008-01-13 Tobias Burnus <burnus@net-b.de>
1578
1579 PR fortran/34763
1580 * decl.c (contained_procedure): Only check directly preceeding state.
1581
1582 2008-01-13 Tobias Burnus <burnus@net-b.de>
1583
1584 PR fortran/34759
1585 * check.c (gfc_check_shape): Accept array ranges of
1586 assumed-size arrays.
1587
1588 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1589
1590 PR fortran/34432
1591 * match.c (gfc_match_name): Don't error if leading character is a '(',
1592 just return MATCH_NO.
1593
1594 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1595
1596 PR fortran/34722
1597 * trans-io.c (create_dummy_iostat): Commit the symbol.
1598
1599 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
1600
1601 PR fortran/34537
1602 * simplify.c (gfc_simplify_transfer): Return NULL if the size
1603 of the element is unavailable and only assign character length
1604 to the result, if 'mold' is constant.
1605
1606 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
1607
1608 PR fortran/34396
1609 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
1610 to assign strings and perform bounds checks on the string length.
1611 (get_array_ctor_strlen): Remove bounds checking.
1612 (gfc_trans_array_constructor): Initialize string length checking.
1613 * trans-array.h : Add prototype for gfc_trans_string_copy.
1614
1615 2008-01-08 Richard Guenther <rguenther@suse.de>
1616
1617 PR fortran/34706
1618 PR tree-optimization/34683
1619 * trans-types.c (gfc_get_array_type_bounds): Use an array type
1620 with known size for accesses if that is known.
1621
1622 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1623
1624 PR fortran/34476
1625 * expr.c (find_array_element): Check that the array bounds are
1626 constant before using them. Use lower, as well as upper bound.
1627 (check_restricted): Allow implied index variable.
1628
1629 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1630
1631 PR fortran/34681
1632 * trans_array.c (gfc_trans_deferred_array): Do not null the
1633 data pointer on entering scope, nor deallocate it on leaving
1634 scope, if the symbol has the 'save' attribute.
1635
1636 PR fortran/34704
1637 * trans_decl.c (gfc_finish_var_decl): Derived types with
1638 allocatable components and an initializer must be TREE_STATIC.
1639
1640 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
1641
1642 PR fortran/34672
1643 * module.c (write_generic): Rewrite completely.
1644 (write_module): Change call to write_generic.
1645
1646 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1647
1648 PR fortran/34659
1649 * scanner.c (load_line): Do not count ' ' as printable when checking for
1650 continuations.
1651
1652 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
1653
1654 PR fortran/34545
1655 * module.c (load_needed): If the namespace has no proc_name
1656 give it the module symbol.
1657
1658 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1659
1660 PR fortran/34387
1661 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
1662 the dummy variable expression, test for NULL, and pass the variable
1663 address to the called function.
1664
1665 2007-01-06 Tobias Burnus <burnus@net-b.de>
1666
1667 PR fortran/34658
1668 * match.c (gfc_match_common): Remove blank common in
1669 DATA BLOCK warning.
1670 * resolve.c (resolve_common_vars): New function.
1671 (resolve_common_blocks): Move checks to resolve_common_vars
1672 and invoke that function.
1673 (resolve_types): Call resolve_common_vars for blank commons.
1674
1675 2008-01-06 Tobias Burnus <burnus@net-b.de>
1676
1677 PR fortran/34655
1678 * resolve.c (resolve_equivalence_derived): Reject derived types with
1679 default initialization if equivalenced with COMMON variable.
1680
1681 2008-01-06 Tobias Burnus <burnus@net-b.de>
1682
1683 PR fortran/34654
1684 * io.c (check_io_constraints): Disallow unformatted I/O for
1685 internal units.
1686
1687 2008-01-06 Tobias Burnus <burnus@net-b.de>
1688
1689 PR fortran/34660
1690 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
1691 ELEMENTAL functions.
1692
1693 2008-01-06 Tobias Burnus <burnus@net-b.de>
1694
1695 PR fortran/34662
1696 * interface.c (compare_actual_formal): Reject parameter
1697 actual to intent(out) dummy.
1698
1699 2008-01-04 Tobias Burnus <burnus@net-b.de>
1700
1701 PR fortran/34557
1702 * primary.c (match_varspec): Gobble whitespace before
1703 checking for '('.