Jason Merrill [Fri, 1 Aug 2014 18:33:54 +0000 (14:33 -0400)]
re PR c++/59823 (conversion operator to const X& causes copy-construction of temporary)
PR c++/59823
Core DR 1138
* call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
list-initialization. A conversion to rvalue ref that involves
an lvalue-rvalue conversion is bad.
(convert_like_real): Give helpful error message.
Jason Merrill [Fri, 1 Aug 2014 18:33:47 +0000 (14:33 -0400)]
re PR c++/59956 (internal compiler error: unexpected expression ‘P_S’ of kind template_parm_index)
PR c++/59956
* friend.c (do_friend): Pass the TEMPLATE_DECL to add_friend if we
have a friend template in a class template.
* pt.c (tsubst_friend_function): Look through it.
(push_template_decl_real): A friend member template is
primary.
Jason Merrill [Fri, 1 Aug 2014 18:33:41 +0000 (14:33 -0400)]
re PR c++/60241 (internal compiler error: in finish_member_declaration, at cp/semantics.c:2617)
PR c++/60241
* pt.c (lookup_template_class_1): Update DECL_TEMPLATE_INSTANTIATIONS
of the partial instantiation, not the most general template.
(maybe_process_partial_specialization): Reassign everything on
that list.
Jason Merrill [Fri, 1 Aug 2014 18:33:35 +0000 (14:33 -0400)]
re PR c++/60361 (unexpected 'use of parameter outside function body' error)
PR c++/60361
* parser.c (cp_parser_template_id): Don't set up a CPP_TEMPLATE_ID
if re-parsing might succeed.
* semantics.c (finish_id_expression): Use of a parameter outside
the function body is a parse error.
backport: re PR tree-optimization/61375 (ICE in int_cst_value at -O3 in tree-ssa pass when compiling a reference to an __int128 value)
2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR tree-optimization/61375
* tree-ssa-math-opts.c (find_bswap_or_nop_1): Cancel optimization if
symbolic number cannot be represented in an unsigned HOST_WIDE_INT.
(execute_optimize_bswap): Cancel optimization if CHAR_BIT != 8.
gcc/testsuite/
PR tree-optimization/61375
* gcc.c-torture/execute/pr61375-1.c: New test.
Richard Biener [Fri, 1 Aug 2014 07:40:01 +0000 (07:40 +0000)]
re PR tree-optimization/61964 (krb5 database propagation enters infinite loop; reduced test case)
2014-08-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/61964
* tree-ssa-tail-merge.c (gimple_operand_equal_value_p): New
function merged from trunk.
(gimple_equal_p): Handle non-SSA LHS solely by structural
equality.
* gcc.dg/torture/pr61964.c: New testcase.
* gcc.dg/pr51879-18.c: XFAIL.
* config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p):
Add prototype.
* config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): New
function. Issue -Wpsabi warning if future GCC releases will use
different field alignment rules for this type.
* config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Call it.
* config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
* config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
gcc/testsuite/
* gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
rs6000.c (rs6000_function_arg_boundary): Issue -Wpsabi note when encountering a type where future GCC releases will...
gcc/
* config/rs6000/rs6000.c (rs6000_function_arg_boundary): Issue
-Wpsabi note when encountering a type where future GCC releases
will apply different alignment requirements.
gcc/testsuite/
* gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
rs6000.c (rs6000_function_arg): If a float argument does not fit fully into floating-point registers...
gcc/
* config/rs6000/rs6000.c (rs6000_function_arg): If a float argument
does not fit fully into floating-point registers, and there is still
space in the register parameter area, issue -Wpsabi note that the ABI
will change in a future GCC release.
gcc/testsuite/
* gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
Paul Thomas [Sat, 19 Jul 2014 14:31:06 +0000 (14:31 +0000)]
re PR fortran/61780 (Wrong code when shifting elements of a multidimensional array)
2014-07-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/61780
* dependency.c (gfc_dep_resolver): Index the 'reverse' array so
that elements are skipped. This then correctly aligns 'reverse'
with the scalarizer loops.
2014-07-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/61780
* gfortran.dg/dependency_44.f90 : New test
Richard Biener [Thu, 17 Jul 2014 07:49:44 +0000 (07:49 +0000)]
re PR rtl-optimization/61801 (sched2 miscompiles syscall sequence with -g)
2014-07-17 Richard Biener <rguenther@suse.de>
PR rtl-optimization/61801
* sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
ASM_INPUT don't set reg_pending_barrier if it appears in a
debug-insn.
Jakub Jelinek [Fri, 4 Jul 2014 08:37:39 +0000 (10:37 +0200)]
re PR tree-optimization/61684 (ICE at -Os and above on x86_64-linux-gnu in tree check: expected ssa_name, have addr_expr in recognize_single_bit_test, at tree-ssa-ifcombine.c:238)
PR tree-optimization/61684
* tree-ssa-ifcombine.c (recognize_single_bit_test): Make sure
rhs1 of conversion is a SSA_NAME before using SSA_NAME_DEF_STMT on it.
2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
2014-06-20 Jakub Jelinek <jakub@redhat.com>
2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
gcc/
PR tree-optimization/61306
* tree-ssa-math-opts.c (struct symbolic_number): Store type of
expression instead of its size.
(do_shift_rotate): Adapt to change in struct symbolic_number. Return
false to prevent optimization when the result is unpredictable due to
arithmetic right shift of signed type with highest byte is set.
(verify_symbolic_number_p): Adapt to change in struct symbolic_number.
(find_bswap_1): Likewise. Return NULL to prevent optimization when the
result is unpredictable due to sign extension.
(find_bswap): Adapt to change in struct symbolic_number.
Jakub Jelinek [Tue, 24 Jun 2014 15:13:32 +0000 (17:13 +0200)]
re PR target/61570 (-march=native CPU you selected does not support x86-64 instruction under QEMU)
PR target/61570
* config/i386/driver-i386.c (host_detect_local_cpu): For unknown
model family 6 CPU with has_longmode never use a CPU without
64-bit support.
Uros Bizjak [Wed, 18 Jun 2014 20:01:37 +0000 (22:01 +0200)]
backport: re PR target/61423 (Incorrect conversion from unsigned int to floating point)
Backport from mainline
2014-06-06 Uros Bizjak <ubizjak@gmail.com>
PR target/61423
* config/i386/i386.md (*floatunssi<mode>2_i387_with_xmm): New
define_insn_and_split pattern, merged from *floatunssi<mode>2_1
and corresponding splitters. Zero extend general register
or memory input operand to XMM temporary. Enable for
TARGET_SSE2 and TARGET_INTER_UNIT_MOVES_TO_VEC only.
(floatunssi<mode>2): Update expander predicate.
testsuite/ChangeLog:
Backport from mainline
2014-06-13 Ilya Enkovich <ilya.enkovich@intel.com>
Yufeng Zhang [Tue, 17 Jun 2014 14:15:03 +0000 (14:15 +0000)]
re PR target/61483 ([AArch64] builtin va_start incorrectly initializes the field of va_list for incoming unnamed arguments on the stack)
gcc/
PR target/61483
* config/aarch64/aarch64.c (aarch64_layout_arg): Add new local
variable 'size'; calculate 'size' right in the front; use
'size' to compute 'nregs' (when 'allocate_ncrn != 0') and
pcum->aapcs_stack_words.
gcc/testsuite/
PR target/61483
* gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
* gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
* gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
* gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.