Jakub Jelinek [Thu, 11 Feb 2016 09:09:00 +0000 (10:09 +0100)]
backport: re PR preprocessor/57580 (Repeated _Pragma message directives in macro causes problems)
Backported from mainline
2015-12-03 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/57580
* c-ppoutput.c (print): Change printed field to bool.
(init_pp_output): Set print.printed to false instead of 0.
(scan_translation_unit): Fix up formatting. Set print.printed
to true after printing something other than newline.
(scan_translation_unit_trad): Set print.printed to true instead of 1.
(maybe_print_line_1): Set print.printed to false instead of 0.
(print_line_1): Likewise.
(do_line_change): Set print.printed to true instead of 1.
(cb_define, dump_queued_macros, cb_include, cb_def_pragma,
dump_macro): Set print.printed to false after printing newline.
* c-c++-common/cpp/pr57580.c: New test.
* c-c++-common/gomp/pr57580.c: New test.
Jakub Jelinek [Thu, 11 Feb 2016 09:08:03 +0000 (10:08 +0100)]
backport: re PR debug/66432 (libgomp.c/appendix-a/a.29.1.c -O2 -g: type mismatch between an SSA_NAME and its symbol)
Backported from mainline
2015-11-21 Jakub Jelinek <jakub@redhat.com>
PR debug/66432
* tree-inline.c (copy_debug_stmt): If
gimple_debug_source_bind_get_value is DECL_ORIGIN of a PARM_DECL
in decl_debug_args, don't call remap_gimple_op_r on it.
Jakub Jelinek [Thu, 11 Feb 2016 09:03:34 +0000 (10:03 +0100)]
backport: re PR preprocessor/60736 (Crash in preprocessor including stdc-predef.h when it does not exist on glibc-based systems)
Backported from mainline
2015-11-19 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/60736
* include/cpplib.h (cpp_errno_filename): New prototype.
* errors.c (cpp_errno): Don't handle msgid "" specially, use
_(msgid) instead of msgid as argument to cpp_error.
(cpp_errno_filename): New function.
* files.c (read_file_guts): Use cpp_errno_filename instead of
cpp_errno.
(open_file_failed): Likewise. Use file->name if file->path is NULL
in diagnostics.
Jonathan Wakely [Wed, 10 Feb 2016 11:25:33 +0000 (11:25 +0000)]
Constrain std::valarray functions and operators
PR libstdc++/69116
* include/bits/valarray_before.h (__fun, __fun_with_valarray): Only
define result_type for types which can be safely used with valarrays.
* testsuite/26_numerics/valarray/69116.cc: New.
Jakub Jelinek [Thu, 4 Feb 2016 13:59:27 +0000 (14:59 +0100)]
backport: re PR target/69644 (ICE with -O on __sync_bool_compare_and_swap with short in extract_insn, at recog.c:2286)
Backported from mainline
2016-02-03 Jakub Jelinek <jakub@redhat.com>
PR target/69644
* config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap):
Force oldval into register if it does not satisfy reg_or_short_operand
predicate. Fix up formatting.
Uros Bizjak [Fri, 29 Jan 2016 19:52:30 +0000 (20:52 +0100)]
backport: re PR target/69551 (Wrong code with single element vector insert)
Backport from mainline
2016-01-29 Jakub Jelinek <jakub@redhat.com>
PR target/69551
* config/i386/i386.c (ix86_expand_vector_set) <case V4SImode>: For
SSE1, copy target into the temporary reg first before recursing
on it.
testsuite/ChangeLog:
Backport from mainline
2016-01-29 Jakub Jelinek <jakub@redhat.com>
PR target/69551
* gcc.target/i386/pr69551.c: New test.
Uros Bizjak [Fri, 29 Jan 2016 18:25:13 +0000 (19:25 +0100)]
re PR target/69459 (wrong code with -O2 and vector arithmetics @ x86_64)
PR target/69459
* config/i386/constraints.md (C): Only accept constant zero operand.
(BC): New constraint.
* config/i386/sse.md (*mov<mode>_internal): Use BC constraint
instead of C constraint.
* doc/md.texi (Machine Constraints): Update description
of C constraint.
testsuite/ChangeLog:
PR target/69459
* gcc.target/i386/pr69459.c: New test.
Kyrylo Tkachov [Fri, 22 Jan 2016 15:42:30 +0000 (15:42 +0000)]
[ARM] Fix PR target/69403: Bug in thumb2_ior_scc_strict_it pattern
Backport from mainline
2016-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/69403
* config/arm/thumb2.md (*thumb2_ior_scc_strict_it): Convert to
define_insn_and_split. Ensure operands[1] and operands[0] do not
get assigned the same register.
Bernd Schmidt [Fri, 22 Jan 2016 14:49:22 +0000 (14:49 +0000)]
Backport PR63681 fix
PR target/63681
* cfgrtl.c (cfg_layout_initialize): Weaken assert to only trigger if
flag_reorder_blocks_and_partition.
* hw-doloop.c (reorg_loops): Avoid reordering if that flag is set.
James Greenhalgh [Tue, 12 Jan 2016 14:04:26 +0000 (14:04 +0000)]
Backport: [Patch AArch64] Reinstate CANNOT_CHANGE_MODE_CLASS to fix pr67609
gcc/
Backport from mainline.
2015-12-09 James Greenhalgh <james.greenhalgh@arm.com>
PR rtl-optimization/67609
* config/aarch64/aarch64.c
(aarch64_cannot_change_mode_class): Don't permit word_mode
subregs of full vector modes.
* config/aarch64/aarch64.md (aarch64_movdi_<mode>low): Use
zero_extract rather than truncate.
(aarch64_movdi_<mode>high): Likewise.
gcc/testsuite/
Backport from mainline.
2015-12-09 James Greenhalgh <james.greenhalgh@arm.com>
Martin Jambor [Mon, 11 Jan 2016 09:59:48 +0000 (10:59 +0100)]
[PR 66616] Check for thunks when adding extra constants to clones
2016-01-11 Martin Jambor <mjambor@suse.cz>
PR ipa/66616
* ipa-cp.c (propagate_constants_accross_call): Move thuk check...
(call_passes_through_thunk_p): ...here.
(find_more_scalar_values_for_callers_subset): Perform thunk checks
like propagate_constants_accross_call does.
* cgraphclones.c (duplicate_thunk_for_node): Copy can_change_signature
flag from the node to the new flag.
Backport from mainline
2015-12-25 Andreas Tobler <andreast@gcc.gnu.org>
* config/rs6000/freebsd64.h: Delete FREEBSD_DYNAMIC_LINKER32/64
defines. Use FBSD_DYNAMIC_LINKER instead.
Rename and simplify LINK_OS_FREEBSD_SPEC_DEF32/64 to
LINK_OS_FREEBSD_SPEC_DEF.
re PR target/68729 (../Xbae/Methods.c:1772:1: ICE: in extract_insn, at recog.c:2343)
PR target/68729
* config/pa/pa.c (pa_emit_move_sequence): Reorganize handling of
floating-point reloads. Only reload operands that are not valid
floating-point memory operands.