ubsan.c (do_ubsan_in_current_function): New.
[official-gcc.git] / gcc / ChangeLog
blobf3db7fdfb3c79f9d0c6935933475582c052620f2
1 2015-01-08  Jason Merrill  <jason@redhat.com>
3         * ubsan.c (do_ubsan_in_current_function): New.
4         (pass_ubsan::gate): Use it.
5         * ubsan.h: Declare it.
6         * convert.c (convert_to_integer): Use it.
8 2015-01-08  Jakub Jelinek  <jakub@redhat.com>
10         PR target/64338
11         * config/i386/i386.c (ix86_expand_int_movcc): Don't reverse
12         compare_code when it is unconditionally overwritten afterwards.
13         Use ix86_reverse_condition instead of reverse_condition.  Don't
14         change code if *reverse_condition* returned UNKNOWN and don't
15         swap ct/cf and negate diff in that case.
17 2015-01-08  Mike Stump  <mikestump@comcast.net>
19         * tsan.c (pass_tsan::gate): Add no_sanitize_thread support.
20         (pass_tsan_O0::gate): Likewise.
21         * extend.texi (Function Attributes): Add no_sanitize_thread
22         documentation.
24 2015-01-08  Thomas Schwinge  <thomas@codesourcery.com>
26         * builtins.def (DEF_GOMP_BUILTIN): Also consider flag_offload_abi
27         for registering builtins.
28         * config/i386/intelmic-mkoffload.c (prepare_target_image): Don't
29         add -fopenmp to the argv_obstack used when invoking
30         compile_for_target.
32         * config/i386/intelmic-mkoffload.c (compile_for_target): Always
33         add "-m32" or "-m64" to argv_obstack.
34         (generate_host_descr_file): Likewise, when invoking host_compiler.
35         (main): Always add "-m elf_i386" or "-m elf_x86_64" when invoking
36         ld.
38 2015-01-08  Oleg Endo  <olegendo@gcc.gnu.org>
40         * config/sh/sh-mem.cc: Use constant as second operand when emitting
41         tstsi_t insns.
43 2015-01-08  Oleg Endo  <olegendo@gcc.gnu.org>
45         PR target/55212
46         * config/sh/sh.md (*addsi3_compact): Emit reg-reg copy instead of
47         constant load if constant operand fits into I08.
49 2015-01-08  Jakub Jelinek  <jakub@redhat.com>
51         PR sanitizer/64336
52         * tree.c (build2_stat): Fix up initialization of TREE_READONLY
53         and TREE_THIS_VOLATILE for MEM_REFs.
54         (build5_stat): Fix up initialization of TREE_READONLY and
55         TREE_THIS_VOLATILE for TARGET_MEM_REFs.
57 2015-01-08  Kaz Kojima  <kkojima@gcc.gnu.org>
59         PR target/64533
60         * config/sh/sh.md (*addsi3_compact): Use u constraint instead
61         of r for the second alternative of the destination operand.
63 2015-01-07  Segher Boessenkool  <segher@kernel.crashing.org>
65         PR target/36557
66         * config/rs6000/rs6000.md (*eqsi3_ext<mode>, *nesi3_ext<mode>): New.
68 2015-01-07  Sandra Loosemore  <sandra@codesourcery.com>
70         * doc/invoke.texi ([-fvtable-verify]): Fix markup on option
71         keywords.
72         ([-fivar-visibility], [-fvisibility]): Likewise.
74 2015-01-07  Sandra Loosemore  <sandra@codesourcery.com>
76         * doc/invoke.texi: Fix incorrect uses of @samp markup throughout
77         the file where @code, @command, etc is more appropriate.
79 2015-01-06  Sandra Loosemore  <sandra@codesourcery.com>
81         * doc/invoke.texi (RS/6000 and PowerPC Options): Tidy formatting
82         of -mrecip= documentation.
84 2015-01-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
86         PR target/64505
87         * config/rs6000/rs6000.c (rs6000_secondary_reload): Return the
88         correct reload handler if -m32 -mpowerpc64 is used.
90 2015-01-06  Tom de Vries  <tom@codesourcery.com>
92         * tree-ssa-tail-merge.c: Fix typo in struct same_succ_def comment.
94 2015-01-08  Christian Bruel  <christian.bruel@st.com>
96         PR target/64507
97         * config/sh/sh-mem.cc (sh_expand_cmpnstr): Check 0 length.
99 2015-01-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
101         PR tree-optimization/63259
102         * tree-ssa-math-opts.c (pass_optimize_bswap::execute): Stop checking
103         if optab exists for 16bit byteswap.
105 2015-01-06  Jakub Jelinek  <jakub@redhat.com>
107         * opts.c (common_handle_option): Add support for
108         -fno-sanitize=all and -f{,no-}sanitize-recover=all.
109         * doc/invoke.texi: Document -fno-sanitize=all,
110         -f{,no-}sanitize-recover=all.  Document that
111         -fsanitize=float-cast-overflow is not enabled
112         by -fsanitize=undefined.  Fix up documentation
113         of -f{,no-}sanitize-recover.
115 2015-01-06  Eric Botcazou  <ebotcazou@adacore.com>
117         * config.gcc: Add Visium support.
118         * configure.ac: Likewise.
119         * configure: Regenerate.
120         * doc/extend.texi (interrupt attribute): Add Visium.
121         * doc/invoke.texi: Document Visium options.
122         * doc/install.texi: Document Visium target.
123         * doc/md.texi: Document Visium constraints.
124         * common/config/visium: New directory.
125         * config/visium: Likewise.
127 2015-01-05  Segher Boessenkool  <segher@kernel.crashing.org>
129         * simplify-rtx.c (simplify_binary_operation_1): Handle more cases
130         for the "(and X (ior (not X) Y) -> (and X Y)" transform.
132 2015-01-05  Segher Boessenkool  <segher@kernel.crashing.org>
134         * combine.c (combine_validate_cost): Do not count the cost of a
135         split I2 twice.  Do not display it twice in the dump, either.
137 2015-01-05  Sandra Loosemore  <sandra@codesourcery.com>
139         Revert parts of r219199.
140         * doc/invoke.texi ([-Wliteral-suffix]): Restore markup on
141         <inttypes.h>.
142         ([-Wtraditional]): Restore markup on <limits.h>.
144 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
146         PR c++/31397
147         * doc/invoke.texi: Document -Wsuggest-override.
149 2015-01-05  Radovan Obradovic  <radovan.obradovic@imgtec.com>
151         PR rtl-optimization/64287
152         * toplev.c (HAVE_epilogue, HAVE_prologue): Provide default.
153         (process_options): Disable flag_ipa_ra if profiling.
155 2015-01-05  Eric Botcazou  <ebotcazou@adacore.com>
157         * config/nds32/nds32-peephole2.md: Do not mention define_peephole.
159 2015-01-05  Max Filippov  <jcmvbkbc@gmail.com>
161         * config/xtensa/xtensa.c (hwloop_optimize, hwloop_fail,
162         hwloop_pattern_reg, xtensa_doloop_hooks, xtensa_reorg_loops):
163         put under #if TARGET_LOOPS guard.
165 2015-01-05  Uros Bizjak  <ubizjak@gmail.com>
167         * config/i386/i386.c (output_387_binary_op): Use std::swap.
169 2015-01-05  Oleg Endo  <olegendo@gcc.gnu.org>
171         * rtlanal.c (refers_to_regno_p): Change return value from int to bool.
172         * rtl.h (refers_to_regno_p): Add overload.
173         * cse.c: Use it.
174         * bt-load.c: Likewise.
175         * combine.c: Likewise.
176         * df-scan.c: Likewise.
177         * sched-deps.c: Likewise.
178         * config/s390/s390.c: Likewise.
179         * config/m32r/m32r.c: Likewise.
180         * config/rs6000/spe.md: Likewise.
181         * config/rs6000/rs6000.c: Likewise.
182         * config/pa/pa.c: Likewise.
183         * config/stormy16/stormy16.c: Likewise.
184         * config/cris/cris.c: Likewise.
185         * config/arc/arc.md: Likewise.
186         * config/arc/arc.c: Likewise.
187         * config/sh/sh.md: Likewise.
188         * config/sh/sh.c: Likewise.
189         * config/frv/frv.c: Likewise.
191 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
193         PR sanitizer/64265
194         * gimplify.c (gimplify_function_tree): Add TSAN_FUNC_EXIT internal
195         call as cleanup of the whole body.
196         * internal-fn.def (TSAN_FUNC_EXIT): New internal call.
197         * tsan.c (replace_func_exit): New function.
198         (instrument_func_exit): Moved earlier.
199         (instrument_memory_accesses): Adjust TSAN_FUNC_EXIT internal calls.
200         Call instrument_func_exit if no TSAN_FUNC_EXIT internal calls have
201         been found.
202         (tsan_pass): Don't call instrument_func_exit.
203         * internal-fn.c (expand_TSAN_FUNC_EXIT): New function.
204         * tree-inline.c (copy_bb): Drop TSAN_FUNC_EXIT internal calls during
205         inlining.
207         PR sanitizer/64344
208         * ubsan.h (ubsan_instrument_float_cast): Add ARG argument.
209         * ubsan.c (ubsan_instrument_float_cast): Add ARG argument, pass
210         it to libubsan handler instead of EXPR.  Fold comparisons earlier,
211         if the result is integer_zerop, return NULL_TREE.
212         * convert.c (convert_to_integer): Pass expr as ARG.
214         PR tree-optimization/64465
215         * tree-inline.c (redirect_all_calls): During inlining
216         clean up EH stmts and EH edges if redirect_call_stmt_to_callee
217         changed the stmt to a non-throwing call.
219 2015-01-05  Sandra Loosemore  <sandra@codesourcery.com>
221         * doc/invoke.texi: Fix incorrect uses of @code, @option, @samp,
222         etc markup throughout the file.
224 2015-01-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
226         Enable experimental TSAN support for Ada.
227         * tsan.c (instrument_expr): Handle VIEW_CONVERT_EXPR.
229 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
231         PR tree-optimization/64494
232         * tree-ssa-loop-im.c (move_computations_dom_walker::before_dom): Also
233         clear SSA_NAME_ANTI_RANGE_P flag.
235 2015-01-05  Marek Polacek  <polacek@redhat.com>
237         * doc/extend.texi (Arrays of Length Zero): Add missing comma.
239 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
241         Update copyright years.
243         * gcc.c (process_command): Update copyright notice dates.
244         * gcov-dump.c: Ditto.
245         * gcov.c: Ditto.
246         * doc/cpp.texi: Bump @copying's copyright year.
247         * doc/cppinternals.texi: Ditto.
248         * doc/gcc.texi: Ditto.
249         * doc/gccint.texi: Ditto.
250         * doc/gcov.texi: Ditto.
251         * doc/install.texi: Ditto.
252         * doc/invoke.texi: Ditto.
254         * auto-profile.c, auto-profile.h: Fix up Copyright line.
256 2015-01-04  Sandra Loosemore  <sandra@codesourcery.com>
258         * doc/invoke.texi ([-fsized-deallocation]): Copy-edit to fix
259         verb tense, etc.
260         ([-fvtable-verify], [-fvtv-debug]): Likewise.
261         ([-Wabi]): Likewise.
262         ([-fmessage-length]): Likewise.
263         ([-Wsuggest-final-types], [-Wsuggest-final-methods]): Likewise.
264         ([-Wno-discarded-qualifiers]): Likewise.
265         ([-Wnodiscarded-array-qualifiers]): Likewise.
266         ([-Wno-virtual-move-assign]): Likewise.
267         ([-fsanitize=address], [-fsanitize=thread]): Likewise.
268         ([-fsanitize=leak], [-fsanitize=undefined]): Likewise.
269         ([-fsanitize=unreachable], [-fsanitize-recover]): Likewise.
270         ([-fsanitize-undefined-trap-on-error]): Likewise.
271         ([-floop-interchange]): Likewise.
272         ([-ftree-coalesce-inlined-vars]): Likewise.
273         ([-fvect-cost-model]): Likewise.
274         ([-flto]): Likewise.
275         ([--param]): Likewise.
276         (Spec Files): Likewise.
277         ([-mstrict-align]): Likewise.
278         ([-mfix-cortex-a53-835769]): Likewise.
279         ([-march], [-mtune]): Likewise.
280         ([-mpic-register]): Likewise.
281         ([-munaligned-access]): Likewise.
282         ([-msp8]): Likewise.
283         (EIND and Devices with more than 128 Ki Bytes of Flash): Likewise.
284         (AVR Built-in Macros): Likewise.
285         ([-mpreferred-stack-boundary]): Likewise.
286         ([-mtune-crtl]): Likewise.
287         ([-mashf]): Likewise.
288         ([-mmcu=]): Likewise.
289         ([-minrt]): Likewise.
290         ([-maltivec], [-maltivec=be], [-maltivec=le]): Likewise.
291         ([-mupper-regs]): Likewise.
292         ([-matomic-model]): Likewise.
293         ([-mdiv]): Likewise.
294         ([-mzdcbranch]): Likewise.
295         ([-mdisable-callt]): Likewise.
296         ([-msoft-float]): Likewise.
297         ([-m8byte-align]): Likewise.
298         ([-fstack-reuse]): Likewise.
300 2015-01-03  Sandra Loosemore  <sandra@codesourcery.com>
302         * doc/invoke.texi ([-fprofile-generate], [-fprofile-use]):
303         Fix markup, light copy-editing.
304         ([-fauto-profile]): Rewrite to fix formatting and content
305         problems.
307 2015-01-03  Sandra Loosemore  <sandra@codesourcery.com>
309         * doc/invoke.texi ([-fisolate-erroneous-paths-dereference]):
310         Copy-edit description.
311         ([-fisolate-erroneous-paths-attribute]): Likewise.
312         * common.opt (fisolate-erroneous-paths-dereference):
313         Copy-edit description.
314         (fisolate-erroneous-paths-attribute): Likewise.
316 2015-01-03  Sandra Loosemore  <sandra@codesourcery.com>
318         * doc/invoke.texi ([-fsemantic-interposition]): Fix typos and
319         tidy grammar.
321 2015-01-03  Sandra Loosemore  <sandra@codesourcery.com>
323         * doc/invoke.texi ([-fplan9-extensions]): Add/fix @opindex.
324         ([-fvtv-debug]): Likewise.
325         ([-Wc++-compat]): Likewise.
326         ([-Wc++11-compat]): Likewise.
327         ([-Wc++14-compat]): Likewise.
328         ([-Wno-sized-deallocation]): Likewise.
329         ([-femit-class-debug-always]): Likewise.
330         ([-femit-struct-debug-detailed]): Likewise.
331         ([-fno-keep-inline-dllexport]): Likewise.
332         ([-fira-algorithm]): Likewise.
333         ([-fira-region]): Likewise.
334         ([-flra-remat]): Likewise.
335         ([-fipa-ra]): Likewise.
336         ([-fhoist-adjacent-loads]): Likewise.
337         ([-fisolate-erroneous-paths-dereference]): Likewise.
338         ([-fisolate-erroneous-paths-attribute]): Likewise.
339         ([-ftree-switch-conversion]): Likewise.
340         ([-ftree-tail-merge]): Likewise.
341         ([-ftree-loop-if-convert]): Likewise.
342         ([-ftree-loop-if-convert-stores]): Likewise.
343         ([-ftree-loop-distribution]): Likewise.
344         ([-ftree-loop-distribute-patterns]): Likewise.
345         ([-flto-compression-level]): Likewise.
346         ([-flto-report]): Likewise.
347         ([-flto-report-wpa]): Likewise.
348         ([-fuse-linker-plugin]): Likewise.
349         ([-mfix-cortex-a53-835769]): Likewise.
350         ([-mno-fix-cortex-a53-835769]): Likewise.
351         ([-mmmx]...[-mno-3dnow]): Remove the -mno- forms from the
352         explicit listing; add a note to the discussion indicating they
353         exist.  Reorder table to group similar options.  Add missing
354         @opindex entries.  Add @need commands throughout the table to
355         allow it to be split across multiple pages.
356         ([-m8bit-idiv]): Fix @opindex.
357         ([-mavx256-split-unaligned-load]): Likewise.
358         ([-mavx256-split-unaligned-store]): Likewise.
359         ([-mstack-protector-guard]): Likewise.
360         ([-mcpu=]): Likewise.
361         ([-mcpu]): Likewise.
362         ([-mpointer-size=]): Likewise.
364 2015-01-03  John David Anglin  <danglin@gcc.gnu.org>
366         * config/pa/pa.md (decrement_and_branch_until_zero): Use `Q' constraint
367         instead of `m' constraint.  Likewise for unnamed movb comparison
368         patterns using reg_before_reload_operand predicate.
369         * config/pa/predicates.md (reg_before_reload_operand): Tighten
370         predicate to reject register index and LO_SUM DLT memory forms
371         after reload.
373 2015-01-02  Sandra Loosemore  <sandra@codesourcery.com>
375         * doc/invoke.texi (Option Summary): Fix spelling of
376         -fdevirtualize-at-ltrans.
377         ([-fdevirtualize]): Fix markup.
378         ([-fdevirtualize-speculatively]): Fix typo.
379         ([-fdevirtualize-at-ltrans]): Likewise.  Make description less
380         implementor-speaky.
381         * common.opt (fdevirtualize-at-ltrans): Likewise.
382         * ipa-devirt.c: Fix typos in comments throughout the file.
383         (ipa_devirt): Fix typos in format strings for dump output.
385 2015-01-02  Sandra Loosemore  <sandra@codesourcery.com>
387         * doc/invoke.texi ([-fopt-info]): Fix markup, consolidate
388         discussion of defaults, light copy-editing.
390 2015-01-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
392         * tsan.c (instrument_expr): corrected previous checkin.
394 2015-01-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
396         Instrument bit field and unaligned accesses for TSAN.
397         * sanitizer.def (BUILT_IN_TSAN_READ_RANGE): New built-in function.
398         (BUILT_IN_TSAN_WRITE_RANGE): New built-in function.
399         * tsan.c (instrument_expr): Handle COMPONENT_REF and BIT_FIELD_REF.
400         Use BUILT_IN_TSAN_READ_RANGE and BUILT_IN_TSAN_WRITE_RANGE for
401         unaligned memory regions.
403 2015-01-01  Anthony Green  <green@moxielogic.com>
405         * config/moxie/predicates.md (moxie_general_movsrc_operand):
406         Restrict move source register offsets to 16 bits.
408 Copyright (C) 2015 Free Software Foundation, Inc.
410 Copying and distribution of this file, with or without modification,
411 are permitted in any medium without royalty provided the copyright
412 notice and this notice are preserved.