PR fortran/91414: Improved PRNG
[gcc.git] / libgfortran / ChangeLog
1 2019-08-13 Janne Blomqvist <jb@gcc.gnu.org>
2
3 PR fortran/91414
4 * intrinsics/random.c (prng_state): Update state struct.
5 (master_state): Update to match new size.
6 (get_rand_state): Update to match new PRNG.
7 (rotl): New function.
8 (xorshift1024star): Replace with prng_next.
9 (prng_next): New function.
10 (jump): Update for new PRNG.
11 (lcg_parkmiller): Replace with splitmix64.
12 (splitmix64): New function.
13 (getosrandom): Fix return value, simplify.
14 (init_rand_state): Use getosrandom only to get 8 bytes, splitmix64
15 to fill rest of state.
16 (random_r4): Update to new function and struct names.
17 (random_r8): Likewise.
18 (random_r10): Likewise.
19 (random_r16): Likewise.
20 (arandom_r4): Liekwise.
21 (arandom_r8): Likewise.
22 (arandom_r10): Likwewise.
23 (arandom_r16): Likewise.
24 (xor_keys): Reduce size to match new PRNG.
25 (random_seed_i4): Update to new function and struct names, remove
26 special handling of variable p used in previous PRNG.
27 (random_seed_i8): Likewise.
28
29 2019-08-07 Janne Blomqvist <jb@gcc.gnu.org>
30
31 PR fortran/53796
32 * io/inquire.c (inquire_via_filename): Set recl to -1 for
33 unconnected units.
34
35 2019-07-21 Thomas König <tkoenig@gcc.gnu.org>
36
37 PR libfortran/91030
38 * io/unix.c (BUFFER_SIZE): Delete.
39 (BUFFER_FORMATTED_SIZE_DEFAULT): New variable.
40 (BUFFER_UNFORMATTED_SIZE_DEFAULT): New variable.
41 (unix_stream): Add buffer_size.
42 (buf_read): Use s->buffer_size instead of BUFFER_SIZE.
43 (buf_write): Likewise.
44 (buf_init): Add argument unformatted. Handle block sizes
45 for unformatted vs. formatted, using defaults if provided.
46 (fd_to_stream): Add argument unformatted in call to buf_init.
47 * libgfortran.h (options_t): Add buffer_size_formatted and
48 buffer_size_unformatted.
49 * runtime/environ.c (variable_table): Add
50 GFORTRAN_UNFORMATTED_BUFFER_SIZE and
51 GFORTRAN_FORMATTED_BUFFER_SIZE.
52
53 2019-06-25 Kwok Cheung Yeung <kcy@codesourcery.com>
54 Andrew Stubbs <ams@codesourcery.com>
55
56 * configure: Regenerate.
57 * configure.ac (LIBGFOR_MINIMAL): Do not use on AMD GCN.
58
59 2019-06-14 Janne Blomqvist <jb@gcc.gnu.org>
60
61 PR fortran/65921
62 * runtime/memory.c (SIZE_MAX):Remove macro definition.
63 (xmallocarray): Use __builtin_mul_overflow.
64
65 2019-05-22 Jeff Law <law@redhat.com>
66
67 PR fortran/89100
68 * io/format.c (parse_format_list): set default width when the
69 IOPARM_DT_DEC_EXT flag is set for i, f and g.
70 * io/io.h: add default_width_for_integer, default_width_for_float
71 and default_precision_for_float.
72 * io/write.c (write_boz): extra parameter giving length of data
73 corresponding to the type's kind.
74 (write_b): pass data length as extra parameter in calls to
75 write_boz.
76 (write_o): pass data length as extra parameter in calls to
77 write_boz.
78 (write_z): pass data length as extra parameter in calls to
79 write_boz.
80 (size_from_kind): also set size is default width is set.
81 * io/write_float.def (build_float_string): new paramter inserted
82 before result parameter. If default width use values passed
83 instead of the values in fnode.
84 (FORMAT_FLOAT): macro modified to check for default width and
85 calls to build_float_string to pass in default width.
86 (get_float_string): set width and precision to defaults when
87 needed.
88
89 2019-05-19 Janne Blomqvist <jb@gcc.gnu.org>
90
91 PR libfortran/90038
92 * intrinsics/execute_command_line (sigchld_handler): New function.
93 (execute_command_line): Install handler for SIGCHLD.
94 * configure.ac: Check for presence of sigaction and waitpid.
95 * config.h.in: Regenerated.
96 * configure: Regenerated.
97
98 2019-05-17 Janne Blomqvist <jb@gcc.gnu.org>
99
100 PR libfortran/90038
101 * configure.ac (AC_CHECK_FUNCS_ONCE): Check for posix_spawn.
102 * intrinsics/execute_command_line (execute_command_line): Use
103 posix_spawn.
104 * Makefile.in: Regenerated.
105 * config.h.in: Regenerated.
106 * configure: Regenerated.
107
108 2019-05-17 Jakub Jelinek <jakub@redhat.com>
109
110 PR fortran/54613
111 * gfortran.map (GFORTRAN_9.2): Export _gfortran_{,m,s}findloc{0,1}_r10.
112 * Makefile.am (i_findloc0_c): Add $(srcdir)/generated/findloc0_r10.c.
113 (i_findloc1_c): Add $(srcdir)/generated/findloc1_r10.c.
114 * Makefile.in: Regenerated.
115 * generated/findloc0_r10.c: Generated.
116 * generated/findloc1_r10.c: Generated.
117
118 PR fortran/54613
119 * gfortran.map (GFORTRAN_9.2): New symbol version, export
120 _gfortran_{,m,s}findloc0_i2 in it.
121
122 2019-05-15 Janne Blomqvist <jb@gcc.gnu.org>
123
124 PR fortran/90461
125 * io/open.c (new_unit): Don't check if the file is already open
126 for F2018.
127
128 2019-05-02 Jakub Jelinek <jakub@redhat.com>
129
130 * Makefile.am (gfor_cdir): Remove $(MULTISUBDIR).
131 * Makefile.in: Regenerated.
132
133 2019-04-14 Paul Thomas <pault@gcc.gnu.org>
134
135 PR fortran/89843
136 * runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Only
137 return immediately if the source pointer is null. Bring
138 forward the extraction of the gfc type. Extract the kind so
139 that the element size can be correctly computed for sections
140 and components of derived type arrays. Remove the free of the
141 CFI descriptor since this is now done in trans-expr.c.
142 (gfc_desc_to_cfi_desc): Only allocate the CFI descriptor if it
143 is not null.
144 (CFI_section): Normalise the difference between the upper and
145 lower bounds by the stride to correctly calculate the extents
146 of the section.
147
148 PR fortran/89846
149 * runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc): Use
150 the stride measure for the gfc span if it is not a multiple
151 of the element length. Otherwise use the element length.
152
153 PR fortran/90022
154 * runtime/ISO_Fortran_binding.c (CFI_is_contiguous) : Return
155 1 for true and 0 otherwise to comply with the standard. Correct
156 the contiguity check for rank 3 and greater by using the stride
157 measure of the lower dimension rather than the element length.
158
159 2019-03-25 John David Anglin <danglin@gcc.gnu.org>
160
161 PR libgfortran/79540
162 * io/write_float.def (build_float_string): Don't copy digits when
163 ndigits is negative.
164
165 2019-03-05 Jakub Jelinek <jakub@redhat.com>
166
167 PR libgfortran/89593
168 * caf/single.c (_gfortran_caf_sendget_by_ref): Cast &temp to
169 gfc_descriptor_t * to avoid warning.
170
171 2019-02-26 Uroš Bizjak <ubizjak@gmail.com>
172
173 * io/transfer.c (transfer_array_inner): Do not
174 cast charlen to index_type.
175
176 2019-02-25 Dominique d'Humieres <dominiq@gcc.gnu.org>
177
178 PR libfortran/89274
179 * io/write.c (write_integer): Add width for INTEGER(16).
180
181 2019-02-23 Paul Thomas <pault@gcc.gnu.org>
182
183 PR fortran/89385
184 PR fortran/89366
185 * runtime/ISO_Fortran_binding.c (cfi_desc_to_gfc_desc) : In the
186 interchange between character and derived, the character type
187 was being set incorrectly.
188 (gfc_desc_to_cfi_desc) : Eliminate the interchange of types in
189 this function. Do not add the kind and length information to
190 the type field of structures. Lbounds were incorrectly being
191 set to zero for allocatable and pointer descriptors. Should
192 have been non-pointer, non-allocatables that received this
193 treatment.
194
195 2019-01-30 Uroš Bizjak <ubizjak@gmail.com>
196
197 PR libfortran/88678
198 Revert:
199 2016-11-16 Szabolcs Nagy <szabolcs.nagy@arm.com>
200
201 PR libfortran/78314
202 * config/fpu-glibc.h (support_fpu_trap): Use feenableexcept.
203
204 2019-01-30 Uroš Bizjak <ubizjak@gmail.com>
205
206 PR libfortran/88678
207 * config/fpu-glibc.h (set_fpu_trap_exceptions): Clear stalled
208 exception flags before changing trap mode. Optimize to call
209 feenableexcept and fedisableexcept only once.
210
211 2019-01-28 Sebastian Huber <sebastian.huber@embedded-brains.de>
212
213 * io/async.c (init_adv_cond): Use __GTHREAD_COND_INIT_FUNCTION().
214
215 2019-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
216
217 PR libfortran/89020
218 * io/close.c (st_close): Simplify text of error message to not
219 presume a specific cause of failure to remove file.
220
221 2019-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
222
223 PR libfortran/89020
224 * io/close.c (st_close): Fix typo.
225
226 2019-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
227
228 PR libfortran/89020
229 * io/close.c (st_close): Generate error if calls to 'remove' return
230 an error.
231
232 2019-01-17 Andrew Stubbs <ams@codesourcery.com>
233 Kwok Cheung Yeung <kcy@codesourcery.com>
234 Julian Brown <julian@codesourcery.com>
235 Tom de Vries <tom@codesourcery.com>
236
237 * configure.ac: Use minimal mode for amdgcn.
238 * configure: Regenerate.
239
240 2019-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
241
242 PR libfortran/88776
243 * io/open.c (newunit): Free format buffer if the unit specified is for
244 stdin, stdout, or stderr.
245
246 2019-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
247
248 PR libfortran/88776
249 * io/list_read.c (namelist_read): Use nml_err_ret path on read error
250 not based on stdin_unit.
251
252 2019-01-12 Paul Thomas <pault@gcc.gnu.org>
253
254 * ISO_Fortran_binding.h : New file.
255 * Makefile.am : Include ISO_Fortran_binding.c in the list of
256 files to compile.
257 * Makefile.in : Regenerated.
258 * gfortran.map : Add _gfortran_cfi_desc_to_gfc_desc,
259 _gfortran_gfc_desc_to_cfi_desc and the CFI API functions.
260 * runtime/ISO_Fortran_binding.c : New file containing the new
261 functions added to the map.
262
263 2019-01-12 Jakub Jelinek <jakub@redhat.com>
264
265 PR libfortran/88807
266 * m4/minloc0.m4: Reindent to avoid -Wmisleading-indentation warnings.
267 * generated/minloc0_4_i1.c: Regenerated.
268 * generated/minloc0_4_i2.c: Regenerated.
269 * generated/minloc0_4_i4.c: Regenerated.
270 * generated/minloc0_4_i8.c: Regenerated.
271 * generated/minloc0_4_i16.c: Regenerated.
272 * generated/minloc0_4_r4.c: Regenerated.
273 * generated/minloc0_4_r8.c: Regenerated.
274 * generated/minloc0_4_r10.c: Regenerated.
275 * generated/minloc0_4_r16.c: Regenerated.
276 * generated/minloc0_8_i1.c: Regenerated.
277 * generated/minloc0_8_i2.c: Regenerated.
278 * generated/minloc0_8_i4.c: Regenerated.
279 * generated/minloc0_8_i8.c: Regenerated.
280 * generated/minloc0_8_i16.c: Regenerated.
281 * generated/minloc0_8_r4.c: Regenerated.
282 * generated/minloc0_8_r8.c: Regenerated.
283 * generated/minloc0_8_r10.c: Regenerated.
284 * generated/minloc0_8_r16.c: Regenerated.
285 * generated/minloc0_16_i1.c: Regenerated.
286 * generated/minloc0_16_i2.c: Regenerated.
287 * generated/minloc0_16_i4.c: Regenerated.
288 * generated/minloc0_16_i8.c: Regenerated.
289 * generated/minloc0_16_i16.c: Regenerated.
290 * generated/minloc0_16_r4.c: Regenerated.
291 * generated/minloc0_16_r8.c: Regenerated.
292 * generated/minloc0_16_r10.c: Regenerated.
293 * generated/minloc0_16_r16.c: Regenerated.
294
295 2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
296
297 PR other/16615
298 * caf/single.c: Mechanically replace "can not" with "cannot".
299 * io/unit.c: Likewise.
300
301 2019-01-07 Thomas Koenig <tkoenig@gcc.gnu.org>
302 Harald Anlauf <anlauf@gmx.de>
303 Tobias Burnus <burnus@gcc.gnu.org>
304
305 PR fortran/45424
306 * Makefile.am: Add intrinsics/is_contiguous.c.
307 * Makefile.in: Regenerated.
308 * gfortran.map: Add _gfortran_is_contiguous0.
309 * intrinsics/is_contiguous.c: New file.
310 * libgfortran.h: Add prototype for is_contiguous0.
311
312 2019-01-07 Janne Blomqvist <jb@gcc.gnu.org>
313
314 * gfortran.map (GFORTRAN_9): Make GFORTRAN_9 node depend on
315 GFORTRAN_8.
316
317 2019-01-01 Jakub Jelinek <jakub@redhat.com>
318
319 Update copyright years.
320 \f
321 Copyright (C) 2019 Free Software Foundation, Inc.
322
323 Copying and distribution of this file, with or without modification,
324 are permitted in any medium without royalty provided the copyright
325 notice and this notice are preserved.