2012-11-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/55297
* resolve.c (resolve_typebound_intrinsic_op): Only add typebound
operators to the operator list in the namespace of the derived type.
2012-11-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/55297
* gfortran.dg/typebound_operator_18.f90: New.
From-SVN: r193568
2012-11-16 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/55330
* lra-constraints.c (MAX_INHERITANCE_PASSES): New macro.
(lra_inheritance, lra_undo_inheritance): Use it to limit number of
the passes.
2012-11-16 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/55330
* gfortran.dg/pr55330.f90: New test.
From-SVN: r193567
Consider this short example:
1 template<typename T>
2 using AddConst = T const;
3
4 enum FwdEnum : int;
5
6 int main() {
7 AddConst<FwdEnum> *ptr = nullptr;
8 }
At line 7, when we build the type for AddConst<FwdEnum> in
lookup_template_class_1, the resulting type is the enum FwdEnum. This
confuses lookup_template_class_1 near the if below, wrongly making it
taking the branch and thus calling tsubst_enum while it shouldn't:
if (TREE_CODE (t) == ENUMERAL_TYPE && !is_dependent_type)
/* Now that the type has been registered on the instantiations
list, we set up the enumerators. Because the enumeration
constants may involve the enumeration type itself, we make
sure to register the type first, and then create the
constants. That way, doing tsubst_expr for the enumeration
constants won't result in recursive calls here; we'll find
the instantiation and exit above. */
tsubst_enum (template_type, t, arglist);
Before the alias template feature, the only reason why TREE_CODE (t)
== ENUMERAL_TYPE would be true is when lookup_template_class_1 is
called for an enum that is a member of a class template. But that
condition can be also true for an alias template instantiation.
So I guess that condition should be changed to TREE_CODE
(template_type) == ENUMERAL_TYPE, to specifically detect the member
enum of a class template case. Note that for the alias template
instantiation case above, template_type points to a TEMPLATE_TYPE_PARM
which name is AddConst.
This is what the patchlet below does.
Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk.
gcc/cp/
* pt.c (lookup_template_class_1): Look at the type of the
potential member enum of class template to determine if we are
actually substituting into a member enum of class template.
gcc/testsuite/
* g++.dg/cpp0x/alias-decl-27.C: New test.
From-SVN: r193562
PR c++/55337
* tree.c (cp_tree_equal) <case ALIGNOF_EXPR>: Use SIZEOF_EXPR_TYPE_P
only on SIZEOF_EXPR.
* g++.dg/template/alignof2.C: New test.
From-SVN: r193558
PR other/55333
* include/sanitizer/common_interface_defs.h (uhwptr): New type
for hardware pointer.
* sanitizer_common/sanitizer_stacktrace.cc (StackTrace::FastUnwindStack):
Replace uptr with uhwptr for stack unwind.
From-SVN: r193557
PR target/54073
* config/i386/i386.md (mov<mode>cc): Use comparison_operator
instead of ordered_comparison_operator resp.
ix86_fp_comparison_operator predicates.
* config/i386/i386.c (ix86_expand_fp_movcc): Reject TImode
or for -m32 DImode comparisons.
From-SVN: r193554
gcc/
2012-11-15 David S. Miller <davem@davemloft.net>
* configure.ac: Add check for assembler SPARC4 instruction
support.
* configure: Rebuild.
* config.in: Add HAVE_AS_SPARC4 section.
* config/sparc/sparc.opt (mcbcond): New option.
* doc/invoke.texi: Document it.
* config/sparc/constraints.md: New constraint 'A' for 5-bit signed
immediates.
* doc/md.texi: Document it.
* config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_CBCOND.
(sparc_option_override): Likewise.
(emit_cbcond_insn): New function.
(emit_conditional_branch_insn): Call it.
(emit_cbcond_nop): New function.
(output_ubranch): Use cbcond, remove label arg.
(output_cbcond): New function.
* config/sparc/sparc-protos.h (output_ubranch): Update.
(output_cbcond): Declare it.
(emit_cbcond_nop): Likewise.
* config/sparc/sparc.md (type attribute): New types 'cbcond'
and uncond_cbcond.
(emit_cbcond_nop): New attribute.
(length attribute): Handle cbcond and uncond_cbcond.
(in_call_delay attribute): Reject cbcond and uncond_cbcond.
(in_branch_delay attribute): Likewise.
(in_uncond_branch_delay attribute): Likewise.
(in_annul_branch_delay attribute): Likewise.
(*cbcond_sp32, *cbcond_sp64): New insn patterns.
(jump): Rewrite into an expander.
(*jump_ubranch, *jump_cbcond): New patterns.
* config/sparc/niagara4.md: Match 'cbcond' in 'n4_cti'.
* config/sparc/sparc.h (AS_NIAGARA4_FLAG): New macro, use it
when target default is niagara4.
(SPARC_SIMM5_P): Define.
* config/sparc/sol2.h (AS_SPARC64_FLAG): Adjust.
(AS_SPARC32_FLAG): Define.
(ASM_CPU32_DEFAULT_SPEC, ASM_CPU64_DEFAULT_SPEC): Use
AS_NIAGARA4_FLAG as needed.
From-SVN: r193543
2012-11-15 Tobias Burnus <burnus@net-b.de>
Joseph Myers <joseph@codesourcery.com>
* math/fmaq.c (fmaq): Merge from GLIBC. Fix fma
underflows with small x * y; Fix overflow results
outside round-to-nearest mode; make use of Dekker
and Knuth algorithms use round-to-nearest.
Co-Authored-By: Joseph Myers <joseph@codesourcery.com>
From-SVN: r193538
2012-11-15 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/54619
* tree-ssa-loop-ivopts.c (get_use_type): New function.
(get_computation_at): Use get_use_type.
(get_computation_cost_at): Declare and set mem_mode. Use mem_mode.
From-SVN: r193537
* asan.c (report_error_func): Set DECL_IGNORED_P, don't touch
DECL_ASSEMBLER_NAME.
(asan_init_func): Likewise.
(asan_finish_file): Use void * instead of __asan_global * as
type of __asan_{,un}register_globals. Set DECL_IGNORED_P on
the decls.
From-SVN: r193532
* lib/asan-dg.exp: New file.
* gcc.dg/asan/asan.exp: New file.
* g++.dg/dg.exp: Prune also asan tests.
* g++.dg/asan/asan.exp: New file.
* c-c++-common/asan/memcmp-1.c: New test.
From-SVN: r193511