Commit Graph

120342 Commits

Author SHA1 Message Date
Tom Tromey 50605a7f19 whatis.cc: New file.
* testsuite/libstdc++-prettyprinters/whatis.cc: New file.
	* testsuite/lib/gdb-test.exp (whatis-test): New proc.
	(gdb-test): Handle 'whatis' tests.
	(gdb_batch_check): New proc.
	(gdb_version_check): Rewrite to use gdb_batch_check.
	* python/libstdcxx/v6/printers.py: Import gdb.types.
	(FilteringTypePrinter): New class.
	(add_one_type_printer, register_type_printers): New functions.
	(register_libstdcxx_printers): Call register_type_printers.

From-SVN: r193573
2012-11-16 18:17:25 +00:00
Ian Bolton 9bec80b04e Fix commit of testcase which got truncated somehow.
From-SVN: r193571
2012-11-16 17:36:00 +00:00
Jan Hubicka b3d0cc6022 * params.def (max-peeled-insns, max-completely-peeled-insns): Reduce to 100.
From-SVN: r193570
2012-11-16 17:27:30 +00:00
Simon Baldwin 5dc99c4678 cpplib.h (struct cpp_options): Add canonical_system_headers.
* include/cpplib.h (struct cpp_options): Add canonical_system_headers.
    * files.c (find_file_in_dir): Call maybe_shorter_path() only if
    canonical_system_headers is set.
    * init.c (cpp_create_reader): Initialize canonical_system_headers.
    * configure.ac: Add new --enable-canonical-system-headers.
    * configure: Regenerate.
    * config.in: Regenerate.

    * doc/cppopts.texi: Document -f[no-]canonical-system-headers.
    * doc/install.texi: Document --enable-canonical-system-headers.

    * c.opt: Add f[no-]canonical-system-headers.
    * c-opts.c (c_common_handle_option): Handle
    OPT_fcanonical_system_headers.

From-SVN: r193569
2012-11-16 17:14:05 +00:00
Janus Weil b185792f52 re PR fortran/55297 ([OOP] type-bound operator clashes with abstract interface)
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 18:02:02 +01:00
Vladimir Makarov e731262b38 re PR rtl-optimization/55330 (ICE: Maximum number of LRA constraint passes is achieved (15) on gfortran.dg/actual_array_constructor_1.f90)
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
2012-11-16 16:32:02 +00:00
Ian Lance Taylor ce1a156285 compiler: don't remove floating point conversion of typed constant
From-SVN: r193565
2012-11-16 16:30:35 +00:00
Ian Lance Taylor d761f9e62f Make-lang.in (gccgo$(exeext)): Add + at start of command.
* Make-lang.in (gccgo$(exeext)): Add + at start of command.
	(go1$(exeext)): Likewise.

From-SVN: r193564
2012-11-16 16:27:54 +00:00
Uros Bizjak 3f43b9e756 gcc-dg.exp (cleanup-saved-temps): Add .mii to suffixes.
* lib/gcc-dg.exp (cleanup-saved-temps): Add .mii to suffixes.
	* gcc.dg/hoist-register-pressure-1.c: Cleanup hoist rtl dump.
	* gcc.dg/hoist-register-pressure-2.c: Ditto.
	* gcc.dg/hoist-register-pressure-3.c: Ditto.
	* gcc.dg/tree-prof/peel-1.c: Cleanup loop2_unroll rtl dump.
	* gcc.dg/tree-prof/unroll-1.c: Ditto.

From-SVN: r193563
2012-11-16 16:50:05 +01:00
Dodji Seketeli 26f2269fc4 PR c++/54875 - Error with alias template that resolves to an enum
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
2012-11-16 16:20:03 +01:00
Tom Tromey 2b723e217a configure.ac: Invoke AM_MAINTAINER_MODE.
* configure.ac: Invoke AM_MAINTAINER_MODE.
	* aclocal.m4, configure, Makefile.in, asan/Makefile.in,
	interception/Makefile.in, sanitizer_common/Makefile.in: Rebuild.

From-SVN: r193561
2012-11-16 15:19:15 +00:00
Matthias Klose 26841e4533 t-linux: New file; define MULTIARCH_DIRNAME.
2012-11-16  Matthias Klose  <doko@ubuntu.com>

        * config/pa/t-linux: New file; define MULTIARCH_DIRNAME.
        * config.gcc <hppa*64*-*-linux*, hppa*-*-linux*> (tmake_file):
        Include pa/t-linux.

From-SVN: r193560
2012-11-16 15:19:14 +00:00
Uros Bizjak f8cc9a484d * lib/target-supports.exp
(check_effective_target_has_w_floating_suffix): Use options for c++ only.
	(check_effective_target_has_q_floating_suffix): Ditto.

From-SVN: r193559
2012-11-16 15:53:53 +01:00
Jakub Jelinek ba29e5c26f re PR c++/55337 (ICE tree check: expected sizeof_expr, have alignof_expr in cp_tree_equal, at cp/tree.c:2608)
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
2012-11-16 15:33:44 +01:00
H.J. Lu d1caed1484 Define/use hardware pointer type for stack unwind
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
2012-11-16 04:02:29 -08:00
Uros Bizjak 8108af84a5 * ChangeLog: Add ChangeLog entry for my last commit.
From-SVN: r193556
2012-11-16 12:49:08 +01:00
Uros Bizjak 001304c198 mv1.C (dg-options): Add -march=x86-64.
* g++.dg/mv1.C (dg-options): Add -march=x86-64.
	* g++.dg/mv6.C (dg-options): Ditto.

From-SVN: r193555
2012-11-16 12:45:15 +01:00
Jakub Jelinek dd88c72279 re PR tree-optimization/54073 (SciMark Monte Carlo test performance has seriously decreased in recent GCC releases)
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
2012-11-16 12:40:39 +01:00
Jan Hubicka 0c46ead219 re PR tree-optimization/54717 (Runtime regression: polyhedron test "rnflow" degraded)
PR tree-optimization/54717
	* tree-ssa-pre.c (do_partial_partial_insertion): Consider also edges
	with ANTIC_IN.

From-SVN: r193553
2012-11-16 10:37:25 +00:00
Dodji Seketeli f3754998dd Enable building of libsanitizer on sparc linux
libsanitizer/ChangeLog:

	* configure.tgt: Enable sparc linux.

From-SVN: r193552
2012-11-16 09:11:03 +01:00
Uros Bizjak 589f95d610 * lib/target_suports.exp
(check_effective_target_has_w_floating_suffix): New procedure.
	(check_effective_target_has_q_floating_suffix): Ditto.
	* g++.dg/cpp0x/gnu_fext-numeric-literals.C: Add dg-error directive
	for unsupported non-standard suffix on floating constant.
	* g++.dg/cpp0x/std_fext-numeric-literals.C: Ditto.

From-SVN: r193551
2012-11-16 08:51:43 +01:00
Uros Bizjak 5756eff74e i386-protos.h (ix86_emit_mode_set): Add third argument.
* config/i386/i386-protos.h (ix86_emit_mode_set): Add third argument.
	* config/i386/i386.h (EMIT_MODE_SET): Update.
	* config/i386/i386.c (ix86_avx_emit_vzeroupper): New function.
	(ix86_emit_mode_set) <AVX_U128>: Call ix86_avx_emit_vzeroupper.

From-SVN: r193550
2012-11-16 08:42:19 +01:00
Ganesh Gopalasubramanian 4888636ee7 AMD bdver3 enablement
From-SVN: r193549
2012-11-16 07:18:37 +00:00
Ganesh Gopalasubramanian eb2f2b44dd AMD bdver3 enablement
From-SVN: r193548
2012-11-16 07:17:30 +00:00
David S. Miller 91764ab8bd Fix gcc.c-torture/compile/pr53410-2.c on sparc.
* expmed.c (expand_shift_1): Don't strip non-integral SUBREGs.

From-SVN: r193547
2012-11-15 21:31:46 -08:00
GCC Administrator 8b9bf07ae3 Daily bump.
From-SVN: r193546
2012-11-16 00:18:13 +00:00
David S. Miller 8b98b5fd9f Add support for sparc fused compare-and-branch.
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 13:24:22 -08:00
Roland McGrath 2bf33cdb91 * MAINTAINERS (Write After Approval): Add myself.
From-SVN: r193542
2012-11-15 19:12:53 +00:00
Marcus Shawcroft 54f4eaf08d soft-fp updated from GLIBC upstream.
From-SVN: r193540
2012-11-15 18:39:47 +00:00
Steve Ellcey 59bdc31c02 expr.c (expand_cond_expr_using_cmove): Use promoted mode for temp.
2012-11-15  Steve Ellcey  <sellcey@mips.com>

	* expr.c (expand_cond_expr_using_cmove): Use promoted mode for temp.

From-SVN: r193539
2012-11-15 17:27:44 +00:00
Tobias Burnus 7ee2eb8277 fmaq.c (fmaq): Merge from GLIBC.
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 18:22:21 +01:00
Tom de Vries 0c604a61a3 re PR tree-optimization/54619 (GCC aborts during compilation with '-O2 -mips16')
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
2012-11-15 16:49:45 +00:00
Dmitry Vyukov f0e10e243e MAINTAINERS: (libsanitizer...
* MAINTAINERS: (libsanitizer, asan.c): Add myself,
Kostya Serebryany (kcc@google.com) and
Jakub Jelinek (jakub@redhat.com).
Rename area for Dodji Seketeli (dodji@redhat.com).

From-SVN: r193536
2012-11-15 08:28:39 -08:00
Jason Merrill c8d15a7262 re PR c++/54903 (Auto + static in-class constant initialization not working)
PR c++/54903
	* decl2.c (mark_used): Don't complain about auto in templates.

From-SVN: r193535
2012-11-15 11:11:56 -05:00
H.J. Lu f64bcb29f5 Properly set MULTISUBDIR and gcc_version
* configure.ac: Properly set MULTISUBDIR.
	* asan/Makefile.am (gcc_version): New.
	* interception/Makefile.am (gcc_version): Likewise.
	* sanitizer_common/Makefile.am (gcc_version): Likewise.
	* configure: Regenerated.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.

From-SVN: r193534
2012-11-15 08:00:47 -08:00
Jakub Jelinek 671e554d87 asan.c (report_error_func): Set DECL_IGNORED_P, don't touch DECL_ASSEMBLER_NAME.
* 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
2012-11-15 14:12:36 +01:00
Dodji Seketeli 8b7ec4233d Add myself as asan co-reviewer
ChangeLog:

	* MAINTAINERS: (asan.c, related): Add myself.

From-SVN: r193530
2012-11-15 13:36:50 +01:00
Matthias Klose 9eae39049b Makefile.in (if_multiarch): Don't use a GNU make 3.81 feature.
2012-11-15  Matthias Klose  <doko@ubuntu.com>

        * Makefile.in (if_multiarch): Don't use a GNU make 3.81 feature.

From-SVN: r193529
2012-11-15 11:58:42 +00:00
Jason Merrill d28bdb60d7 tests
From-SVN: r193527
2012-11-14 20:54:00 -05:00
Jason Merrill e7cf651365 re PR c++/37276 (Trouble with some (C99?) math builtins and namespace std)
PR c++/37276
	* decl.c (decls_match): Remove #ifdef around earlier fix.

From-SVN: r193526
2012-11-14 20:53:48 -05:00
Jason Merrill d3061adb7f class.c (finish_struct_1): Check virtual functions for missing ABI tags.
* class.c (finish_struct_1): Check virtual functions
	for missing ABI tags.

From-SVN: r193525
2012-11-14 20:53:37 -05:00
Jason Merrill 4fce678f8a re PR c++/55275 (abi_tag attribute doesn't work on explicit specializations of class templates)
PR c++/55275
	* pt.c (maybe_process_partial_specialization): Update
	DECL_SOURCE_LOCATION for new specializations.

From-SVN: r193524
2012-11-14 20:53:23 -05:00
Jonathan Wakely c25639b1a3 re PR libstdc++/53841 ([C++11] condition_variable::wait_until() fails with high resolution clocks)
PR libstdc++/53841
	* include/std/condition_variable (condition_variable::wait_until):
	Handle clocks with higher resolution than __clock_t.
	(condition_variable::__wait_until_impl): Remove unnecessary _Clock
	parameter.
	* testsuite/30_threads/condition_variable/members/53841.cc: New.

From-SVN: r193523
2012-11-15 01:38:17 +00:00
Jan Hubicka 6c2b4cacb9 re PR bootstrap/55051 (profiledbootstrap failed)
PR bootstrap/55051
	* gcov-io.c (gcov_read_summary): Fix array bound check.

From-SVN: r193522
2012-11-15 01:07:01 +00:00
Roland McGrath ff4b7a7e91 Consider *-*-nacl* targets ELF
* configure.ac (ENABLE_GOLD): Consider *-*-nacl* targets ELF.
	* configure: Regenerate.

From-SVN: r193521
2012-11-14 16:38:07 -08:00
GCC Administrator e26f512d38 Daily bump.
From-SVN: r193519
2012-11-15 00:18:38 +00:00
H.J. Lu 2a6346c406 Add support for multilib run-time libraries
PR other/55291
	* configure.ac (--enable-version-specific-runtime-libs): New option.
	(AC_CANONICAL_SYSTEM): New.
	(AM_ENABLE_MULTILIB): Moved right after AM_INIT_AUTOMAKE.
	(toolexecdir): Support multilib.
	(toolexeclibdir): Likewise.
	(multilib_arg): New.
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* configure: Likewise.
	* asan/Makefile.in: Likewise.
	* interception/Makefile.in: Likewise.
	* sanitizer_common/Makefile.in: Likewise.

From-SVN: r193516
2012-11-14 16:03:37 -08:00
Sterling Augustine bc6a33956f re PR debug/55328 (ICE: in output_addr_table_entry, at dwarf2out.c:21780 with -gsplit-dwarf)
2012-11-14  Sterling Augustine  <saugustine@google.com>

	PR debug/55328
	* dwarf2out.c (index_address_table_entry): Check a node's refcount.

From-SVN: r193515
2012-11-14 23:36:50 +00:00
Jonathan Wakely 99ace34a31 re PR libstdc++/55320 (Invalid delete with throwing copy-c'tor passed to std::function)
PR libstdc++/55320
	* include/std/functional (function::function(F)): Set _M_manager after
	operations that could throw.
	(_Function_base::_Ref_manager::_M_init_functor): Use addressof.
	* include/tr1/functional
	(_Function_base::_Ref_manager::_M_init_functor): Use addressof.
	(_Function_base::_Base_manager::_M_get_pointer): Likewise.
	* testsuite/20_util/function/cons/55320.cc: New.
	* testsuite/20_util/function/cons/addressof.cc: New.
	* testsuite/20_util/function/cons/callable.cc: Remove header.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error line numbers.
	* testsuite/tr1/3_function_objects/function/10.cc: New.

From-SVN: r193514
2012-11-14 23:33:01 +00:00
Jan Hubicka 3aac5aad16 builtins.c (define_builtin): Accept ECF flags and use set_call_expr_flags.
* builtins.c (define_builtin): Accept ECF flags and
	use set_call_expr_flags.
	(initialize_builtins): Update.

From-SVN: r193513
2012-11-14 23:14:05 +00:00