Jakub Jelinek [Wed, 20 Jul 2016 14:32:46 +0000 (16:32 +0200)]
re PR c++/71909 (g++ accepts an unreachable function catch block that lacks a corresponding try)
PR c++/71909
* parser.c (cp_parser_save_member_function_body): Consume
__transaction_relaxed or __transaction_atomic with optional
attribute. Only skip catch with block if try keyword is seen.
* g++.dg/parse/pr71909.C: New test.
* g++.dg/tm/pr71909.C: New test.
Martin Liska [Fri, 8 Jul 2016 20:22:22 +0000 (22:22 +0200)]
Do not consider COMPLEX_TYPE as fold_convertible_p
Backported from mainline
2016-07-08 Martin Liska <mliska@suse.cz>
PR middle-end/71606
* fold-const.c (fold_convertible_p): As COMPLEX_TYPE
folding produces SAVE_EXPRs, thus return false for the type.
Backported from mainline
2016-07-08 Martin Liska <mliska@suse.cz>
Jakub Jelinek [Thu, 7 Jul 2016 21:54:34 +0000 (23:54 +0200)]
backport: re PR fortran/71704 (ICE with -fopenmp and some omp constructs)
Backported from mainline
2016-06-30 Jakub Jelinek <jakub@redhat.com>
PR fortran/71704
* parse.c (matchs, matcho): If spec_only, only gfc_match the keyword
and if successful, goto do_spec_only.
(matchds, matchdo): Define.
(decode_omp_directive): Add spec_only local var and set it.
Use matchds or matchdo macros instead of matchs or matcho
for declare target, declare simd, declare reduction and threadprivate
directives. Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
directive could be matched.
(next_statement): For ST_GET_FCN_CHARACTERISTICS restore
gfc_current_locus from old_locus even if there is no label.
Jakub Jelinek [Thu, 7 Jul 2016 21:53:12 +0000 (23:53 +0200)]
backport: re PR middle-end/71626 (ICE at -O1 and above on x86_64-linux-gnu (in output_constant_pool_2, at varasm.c:3837))
Backported from mainline
2016-06-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/71626
* config/i386/i386.c (ix86_expand_vector_move): For SUBREG of
a constant, force its SUBREG_REG into memory or register instead
of whole op1.
* gcc.c-torture/execute/pr71626-1.c: New test.
* gcc.c-torture/execute/pr71626-2.c: New test.
Jakub Jelinek [Thu, 7 Jul 2016 21:51:57 +0000 (23:51 +0200)]
backport: re PR middle-end/71494 (label as value in nested function)
Backported from mainline
2016-06-10 Jakub Jelinek <jakub@redhat.com>
PR middle-end/71494
* tree-nested.c (convert_nonlocal_reference_stmt): For GIMPLE_GOTO
without LABEL_DECL, set *handled_ops_p to false instead of true.
Jakub Jelinek [Thu, 7 Jul 2016 21:49:58 +0000 (23:49 +0200)]
backport: re PR rtl-optimization/70222 (Test miscompiled with -O1)
Backported from mainline
2016-03-15 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/70222
* combine.c (simplify_shift_const_1): For A >> B >> C LSHIFTRT
optimization if mode is different from result_mode, queue up masking
of the result in outer_op. Formatting fix.
* gcc.c-torture/execute/pr70222-1.c: New test.
* gcc.c-torture/execute/pr70222-2.c: New test.
Jakub Jelinek [Thu, 7 Jul 2016 21:49:12 +0000 (23:49 +0200)]
backport: re PR tree-optimization/70169 (ICE at -O1 and above on x86_64-linux-gnu in gen_lsm_tmp_name, at tree-ssa-loop.c:791)
Backported from mainline
2016-03-11 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/70169
* tree-ssa-loop.c (gen_lsm_tmp_name): Handle FUNCTION_DECL and
LABEL_DECL like VAR_DECL. Emit nothing instead of gcc_unreachable
for unknown codes.
Jakub Jelinek [Thu, 7 Jul 2016 21:47:40 +0000 (23:47 +0200)]
backport: re PR rtl-optimization/69891 (wrong code with -mstringop-strategy=libcall @ i686)
Backported from mainline
2016-02-26 Jakub Jelinek <jakub@redhat.com>
Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/69891
* dse.c (scan_insn): If we can't figure out memset arguments
or they are non-constant, call clear_rhs_from_active_local_stores.
Jakub Jelinek [Thu, 7 Jul 2016 21:46:54 +0000 (23:46 +0200)]
backport: re PR c++/67767 (-Wsuggest-attribute=noreturn suggests noreturn for function which already has noreturn and cold.)
Backported from mainline
2016-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/67767
* parser.c (cp_parser_std_attribute_spec_seq): Don't assume
attr_spec is always single element chain, chain all the attributes
properly together in the right order.
Jakub Jelinek [Thu, 7 Jul 2016 21:46:16 +0000 (23:46 +0200)]
backport: re PR tree-optimization/69802 (gcc ICE at -O1 and above on valid code on x86_64-linux-gnu with “seg fault”)
Backported from mainline
2016-02-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/69802
* tree-ssa-reassoc.c (update_range_test): If op is
SSA_NAME_IS_DEFAULT_DEF, give up unless tem is a positive
op == 1 test of precision 1 integral op, otherwise handle
that case as op itself. Fix up formatting.
(optimize_range_tests_to_bit_test, optimize_range_tests): Fix
up formatting.
Richard Biener [Thu, 7 Jul 2016 11:46:08 +0000 (11:46 +0000)]
Backport PRs 70022, 70484, 70931, 71452
2016-07-07 Richard Biener <rguenther@suse.de>
Backport from mainline
2016-04-04 Richard Biener <rguenther@suse.de>
PR rtl-optimization/70484
* rtl.h (canon_output_dependence): Declare.
* alias.c (canon_output_dependence): New function.
* dse.c (record_store): Use canon_output_dependence rather
than canon_true_dependence.
* gcc.dg/torture/pr70484.c: New testcase.
2016-06-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/71452
* tree-ssa.c (non_rewritable_lvalue_p): Make sure that the
type used for the SSA rewrite has enough precision to cover
the dynamic type of the location.
Jakub Jelinek [Thu, 30 Jun 2016 09:17:17 +0000 (11:17 +0200)]
re PR middle-end/71693 (ICE: verify_gimple failed (type mismatch in shift expression, -O0, -O1, -O2, -O3))
PR middle-end/71693
* fold-const.c (fold_binary_loc) <case RROTATE_EXPR>: Cast
TREE_OPERAND (arg0, 0) and TREE_OPERAND (arg0, 1) to type
first when permuting bitwise operation with rotate. Cast
TREE_OPERAND (arg0, 0) to type when cancelling two rotations.