Commit Graph

141074 Commits

Author SHA1 Message Date
Richard Biener 7d475a5476 re PR ipa/67783 (quadratic time consumption in IPA inlining with -O1 and higher)
2015-10-05  Richard Biener  <rguenther@suse.de>

	PR ipa/67783
	* ipa-inline-analysis.c (estimate_function_body_sizes): Only
	consider loop header PHI defs as IVs.

From-SVN: r228472
2015-10-05 11:15:10 +00:00
Richard Biener 9c709f6465 tree-ssa-pre.c (create_component_ref_by_pieces_1): Move call handling ...
2015-10-05  Richard Biener  <rguenther@suse.de>

	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Move
	call handling ...
	(create_expression_by_pieces): ... here and build GIMPLE
	calls directly.  Use gimple_build API and avoid force_gimple_operand.
	(insert_into_preds_of_block): Simplify.
	(do_regular_insertion): Add comment.

From-SVN: r228471
2015-10-05 11:13:14 +00:00
Ramana Radhakrishnan 562eadf8e0 [Patch ARM/ AArch64] Fix typo in vcvt_f16.c testcase .
This test worked by accident. While looking at why this was failing randomly in my builds, I discovered a bug in the way in which the testcases were written up in this case.



2015-10-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	* gcc.target/aarch64/advsimd-intrinsics/vcvt_f16.c (TEST_MSG): Fix typo.
	(exec_vcvt): Add comments.

From-SVN: r228470
2015-10-05 11:08:45 +00:00
Ville Voutilainen 057ce49719 re PR c++/67844 (Cannot make tuple of class with template constructor)
2015-10-05  Ville Voutilainen  <ville.voutilainen@gmail.com>

	PR 67844.
	* include/std/tuple (_TC::_NonNestedTuple): Eagerly reject
	conversions from tuple types same as the target tuple.
	* testsuite/20_util/tuple/67844.cc: New.
	* testsuite/20_util/tuple/cons/nested_tuple_construct.cc: Add
	a missing copyright header.

From-SVN: r228468
2015-10-05 12:57:20 +03:00
GCC Administrator aa385812b3 Daily bump.
From-SVN: r228465
2015-10-05 00:16:15 +00:00
Jason Merrill b8fd7909c0 Implement N4514, C++ Extensions for Transactional Memory.
gcc/
	* builtins.def (BUILT_IN_ABORT): Add transaction_pure attribute.
gcc/c-family/
	* c-common.c (c_common_reswords): Add C++ TM TS keywords.
	(c_common_attribute_table): Add transaction_safe_dynamic.
	transaction_safe now affects type identity.
	(handle_tm_attribute): Handle transaction_safe_dynamic.
	* c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
	RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
	(OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
	(D_TRANSMEM): New.
	* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
	* c-pretty-print.c (pp_c_attributes_display): Don't print
	transaction_safe in C++.
gcc/c/
	* c-parser.c (c_lex_one_token): Handle @synchronized.
	* c-decl.c (match_builtin_function_types): A declaration of a built-in
	can change whether the function is transaction_safe.
gcc/cp/
	* cp-tree.h (struct cp_declarator): Add tx_qualifier field.
	(BCS_NORMAL, BCS_TRANSACTION): New enumerators.
	* lex.c (init_reswords): Limit TM kewords to -fgnu-tm.
	* parser.c (cp_lexer_get_preprocessor_token): Fix @synchronized.
	(make_call_declarator): Take tx_qualifier.
	(cp_parser_tx_qualifier_opt): New.
	(cp_parser_lambda_declarator_opt): Use it.
	(cp_parser_direct_declarator): Likewise.
	(cp_parser_statement): Handle atomic_noexcept, atomic_cancel.
	(cp_parser_compound_statement): Change in_try parameter to bcs_flags.
	(cp_parser_std_attribute): Map optimize_for_synchronized to
	transaction_callable.
	(cp_parser_transaction): Take the token.  Handle atomic_noexcept.
	* lambda.c (maybe_add_lambda_conv_op): Handle transaction-safety.
	* call.c (enum conversion_kind): Add ck_tsafe.
	(standard_conversion): Handle transaction-safety conversion.
	(convert_like_real, resolve_address_of_overloaded_function): Likewise.
	(check_methods): Diagnose transaction_safe_dynamic on non-virtual
	function.
	(look_for_tm_attr_overrides): Don't inherit transaction_safe_dynamic.
	* cvt.c (tx_safe_fn_type_p, tx_unsafe_fn_variant)
	(can_convert_tx_safety): New.
	* typeck.c (composite_pointer_type): Handle transaction-safety.
	* name-lookup.h (enum scope_kind): Add sk_transaction.
	* name-lookup.c (begin_scope): Handle it.
	* semantics.c (begin_compound_stmt): Pass it.
	* decl.c (check_previous_goto_1): Check it.
	(struct named_label_entry): Add in_transaction_scope.
	(poplevel_named_label_1): Set it.
	(check_goto): Check it.
	(duplicate_decls): A specialization can be transaction_safe
	independently of its template.
	(grokdeclarator): Handle tx-qualifier.
	* rtti.c (ptr_initializer): Handle transaction-safe.
	* search.c (check_final_overrider): Check transaction_safe_dynamic.
	Don't check transaction_safe.
	* mangle.c (write_function_type): Mangle transaction_safe here.
	(write_CV_qualifiers_for_type): Not here.
	(write_type): Preserve transaction_safe when stripping attributes.
	* error.c (dump_type_suffix): Print transaction_safe.
libiberty/
	* cp-demangle.c (d_cv_qualifiers): Dx means transaction_safe.
	(cplus_demangle_type): Let d_cv_qualifiers handle it.
	(d_dump, d_make_comp, has_return_type, d_encoding)
	(d_count_templates_scopes, d_print_comp_inner)
	(d_print_mod_list, d_print_mod, d_print_function_type)
	(is_ctor_or_dtor): Handle DEMANGLE_COMPONENT_TRANSACTION_SAFE.

From-SVN: r228462
2015-10-04 15:17:19 -04:00
Uros Bizjak bd841941ec re PR rtl-optimization/67447 (ICE in extract_constrain_insn (reload_cse_simplify_operands): insn does not satisfy its constraints)
PR rtl-optimization/67447
	* gcc.target/i386/pr67447.c: New test.

From-SVN: r228461
2015-10-04 17:56:45 +02:00
Uros Bizjak beabed9997 i386.c (ix86_nsaved_regs): Use GENERAL_REGNO_P to check for general register.
* config/i386/i386.c (ix86_nsaved_regs): Use GENERAL_REGNO_P to
	check for general register.
	(ix86_emit_save_regs): Ditto.
	(ix86_emit_save_regs_using_mov): Ditto.
	(ix86_emit_restore_regs_using_pop): Ditto.
	(ix86_emit_restore_regs_using_mov): Ditto.

From-SVN: r228460
2015-10-04 16:09:23 +02:00
Uros Bizjak 51daf35866 vect-pack-trunc-1.c: Require avx512bw effective target.
* gcc.target/i386/vect-pack-trunc-1.c: Require avx512bw
	effective target.
	* gcc.target/i386/vect-pack-trunc-2.c: Ditto.
	* gcc.target/i386/vect-perm-even-1.c: Ditto.
	* gcc.target/i386/vect-perm-odd-1.c: Ditto.
	* gcc.target/i386/vect-unpack-1.c: Ditto.
	* gcc.target/i386/vect-unpack-2.c: Ditto.

From-SVN: r228459
2015-10-04 16:02:05 +02:00
Mikael Morin 2018f53e80 Remove dead code
gcc/fortran/
	* match.c (gfc_match_common): Remove dead variable old_blank_common.

From-SVN: r228458
2015-10-04 13:42:03 +00:00
Mikael Morin 2b3f52a2d0 Fix fortran common-related error recovery ICE.
Upon reverting a symbol in a common block (after throwing an error),
the compiler was ICEing because the symbol's common_block field was set,
but the symbol was not in the common block's list of symbols.

Fixed by both adding the symbol to the common block list and setting
the symbol's common_block field at the same time.
Furthermore, the gfc_add_in_common call is delayed and its result is
ignored, so that its error messages are ignored and the compiler has
the opportunity to give a better error message.
Another gfc_add_in_common call is added later during resolution
to emit again the missing errors.

	PR fortran/67758
gcc/fortran/
	* match.c (gfc_match_common): Delay the common_block pointer
	assignment after error checking.
	Delay the call to gfc_add_in_common attribute after the handling
	of array specs.
	* resolve.c (resolve_common_vars): Call gfc_add_in_common again.
gcc/testsuite/
	* gfortran.dg/common_24.f: New.

From-SVN: r228457
2015-10-04 12:30:16 +00:00
Mikael Morin 6dcab50714 Factor access to the common block head symbol
* resolve.c (resolve_common_vars): Move access to the common
	block's head symbol inside the function.
	(resolve_common_blocks, resolve_types): Update callers.

From-SVN: r228456
2015-10-04 12:07:50 +00:00
GCC Administrator 18696c74ab Daily bump.
From-SVN: r228454
2015-10-04 00:16:12 +00:00
Marek Polacek 62cf8b4cdd Makefile.in (insn-latencytab.o): Remove -Wno-duplicated-cond.
* Makefile.in (insn-latencytab.o): Remove -Wno-duplicated-cond.
	(insn-dfatab.o): Likewise.

From-SVN: r228451
2015-10-03 17:02:12 +00:00
Max Filippov 4a0a945785 xtensa: add uclinux support
2015-10-03  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
	* config.gcc (xtensa*-*-uclinux*): New configuration.
	* config/xtensa/uclinux.h: New file.
	* config/xtensa/uclinux.opt: New file.

libgcc/
	* config.host (xtensa*-*-uclinux*): New configuration.

From-SVN: r228450
2015-10-03 16:09:07 +00:00
Jonathan Wakely 98955e50b8 Document value of __cplusplus for C++14
* doc/cpp.texi (Standard Predefined Macros): Document value of
	__cplusplus for C++14.

From-SVN: r228448
2015-10-03 13:52:18 +01:00
Jonathan Wakely acfdd51fc8 Remove pretty printing for 'any' with allocators
* python/libstdcxx/v6/printers.py (StdExpAnyPrinter): Remove support
	for _Manager_alloc.

From-SVN: r228447
2015-10-03 13:09:36 +01:00
Jonathan Wakely f4cfe221bf Fix comments saying why headers are included
* src/c++98/locale.cc: Fix comment.
	* src/c++98/locale_init.cc: Likewise.

From-SVN: r228446
2015-10-03 13:09:31 +01:00
Bernd Edlinger 30748ef9c7 pr67756.c: Fixed warnings.
2015-10-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * gcc.target/arm/pr67756.c: Fixed warnings.

From-SVN: r228445
2015-10-03 06:28:35 +00:00
GCC Administrator f0a195df77 Daily bump.
From-SVN: r228442
2015-10-03 00:16:15 +00:00
Jonathan Wakely 1ca9de5126 Fix testsuite failures with --disable-wchar_t
* testsuite/21_strings/basic_string/literals/types.cc: Guard use of
	wchar_t with _GLIBCXX_USE_WCHAR_T.
	* testsuite/21_strings/basic_string/literals/values.cc: Likewise.
	* testsuite/21_strings/basic_string/requirements/citerators.cc:
	Likewise.
	* testsuite/22_locale/messages/13631.cc: Likewise.
	* testsuite/experimental/string_view/literals/types.cc: Likewise.
	* testsuite/experimental/string_view/literals/values.cc: Likewise.

From-SVN: r228439
2015-10-03 00:43:17 +01:00
Jonathan Wakely 8b75621078 Enable dual ABI for Filesystem library
* src/filesystem/Makefile.am: Add cxx11_abi_sources.
	* src/filesystem/Makefile.in: Regenerate.
	* src/filesystem/cow-dir.cc: New.
	* src/filesystem/cow-ops.cc: New.
	* src/filesystem/cow-path.cc: New.
	* src/filesystem/dir.cc: Define macro for new ABI.
	* src/filesystem/ops.cc: Likewise.
	* src/filesystem/path.cc: Likewise.

From-SVN: r228437
2015-10-03 00:21:41 +01:00
Jonathan Wakely ee216d80a5 minimal.cc: Minor tweaks to match narrow char version.
* testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
	Minor tweaks to match narrow char version.

From-SVN: r228436
2015-10-02 23:18:06 +01:00
Jonathan Wakely c980d0b4b7 Fix tests that fail with old std::string
* testsuite/21_strings/basic_string/allocator/char/minimal.cc: Guard
	explicit instantiation with check for new ABI.
	* testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
	Likewise. Use wchar_t as char_type.

From-SVN: r228435
2015-10-02 23:13:18 +01:00
Jonathan Wakely 783aa06e9b Use noexcept instead of _GLIBCXX_NOEXCEPT
* include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
	(basic_string::front() const, basic_string::back() const): Use
	noexcept instead of _GLIBCXX_NOEXCEPT macro.
	(__versa_string::front, __versa_string::back): Likewise.

From-SVN: r228434
2015-10-02 23:13:12 +01:00
Jonathan Wakely 38cccb0b7e * acinclude.m4 (GLIBCXX_ENABLE_DEBUG_FLAGS): Fix comment.
From-SVN: r228433
2015-10-02 22:47:38 +01:00
Bernd Schmidt 89f54035b8 Help the offload gcc driver find the right assembler
gcc/
	* gcc.c (process_command): Use spec_machine rather than
	spec_host_machine to build tooldir_prefix2.

From-SVN: r228429
2015-10-02 23:24:50 +02:00
Thomas Schwinge 113020dc59 nvptx offloading linking
gcc/
	* config/nvptx/mkoffload.c (Kind, Vis): Remove enums.
	(Token, Stmt): Remove structs.
	(decls, vars, fns): Remove variables.
	(alloc_comment, append_stmt, is_keyword): Remove macros.
	(tokenize, write_token, write_tokens, alloc_stmt, rev_stmts)
	(write_stmt, write_stmts, parse_insn, parse_list_nosemi)
	(parse_init, parse_file): Remove functions.
	(read_file): Accept a pointer to a length and store into it.
	(process): Don't try to parse the input file, just write it out as
	a string, but looking for maps.  Also write out the length.
	(main): Don't use "-S" to compile PTX code.

	libgomp/
	* oacc-ptx.h: Remove file, moving its content into...
	* config/nvptx/fortran.c: ... here...
	* config/nvptx/oacc-init.c: ..., here...
	* config/nvptx/oacc-parallel.c: ..., and here.
	* config/nvptx/openacc.f90: New file.
	* plugin/plugin-nvptx.c: Don't include "oacc-ptx.h".
	(link_ptx): Don't link in predefined bits of PTX code.

Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com>

From-SVN: r228418
2015-10-02 21:43:41 +02:00
Jonathan Wakely 7fcdbdd21d Allow Filesystem TS to compile without wchar_t
* include/bits/locale_conv.h [!_GLIBCXX_USE_WCHAR_T]
	(__do_str_codecvt, __str_codecvt_in, __str_codecvt_out): Enable.
	* include/experimental/fs_path.h [!_GLIBCXX_USE_WCHAR_T]
	(path::wstring, path::generic_wstring): Disable.
	* src/filesystem/path.cc (path::_S_convert_loc)
	[!_GLIBCXX_USE_WCHAR_T]: Skip conversion.
	* testsuite/experimental/filesystem/path/assign/assign.cc: Check for
	wchar_t support.
	* testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
	* testsuite/experimental/filesystem/path/construct/range.cc: Likewise.

From-SVN: r228417
2015-10-02 20:38:38 +01:00
Jonathan Wakely 43222a5ec8 testsuite_fs.h (nonexistent_path): Use less generic name for paths.
* testsuite/util/testsuite_fs.h (nonexistent_path): Use less generic
	name for paths. Prefer snprintf to sprintf.

From-SVN: r228416
2015-10-02 20:38:27 +01:00
Jeff Law 2671ee45bd Re: [PATCH] Improve DOM's optimization of control statements
* tree-ssa-dom.c (optimize_stmt): Note when loop structures need
	fixups.

From-SVN: r228415
2015-10-02 13:31:46 -06:00
Thomas Schwinge d4852cd492 [PR target/67822] OpenMP offloading to nvptx fails
gcc/
	PR target/67822
	* config/nvptx/mkoffload.c (main): Scan the argument vector for
	-fopenmp, and skip generating an offloading image if specified.

From-SVN: r228414
2015-10-02 21:27:30 +02:00
Uros Bizjak 54070b5155 system.h (ROUND_UP): New macro definition.
* system.h (ROUND_UP): New macro definition.
	(ROUND_DOWN): Ditto.
	* ggc-page.c (ROUND_UP): Remove local macro definition.
	(PAGE_ALIGN): Implement using ROUND_UP macro.

	* config/i386/i386.h (PUSH_ROUNDING): Implement using ROUND_UP macro.
	* config/i386/i386.c (function_arg_advance_64): Use ROUND_UP macro
	to align values.
	(ix86_compute_frame_layout): Ditto.
	(ix86_expand_prologue): Ditto.
	(ix86_adjust_stack_and_probe): Use ROUND_DOWN macro
	to round down values.
	(expand_set_or_movmem_via_rep): Ditto.

From-SVN: r228410
2015-10-02 20:08:59 +02:00
Marek Polacek 1c7485afda re PR c/67730 (No warning when returning NULL in void function)
PR c/67730
	* c-typeck.c (convert_for_assignment): Use the expansion point
	location throughout.

	* gcc.dg/pr67730-1.c: New test.
	* gcc.dg/pr67730-2.c: New test.
	* gcc.dg/pr67730.h: New test.

From-SVN: r228408
2015-10-02 18:01:50 +00:00
Marek Polacek 12651878c6 re PR c/67819 (-Wduplicated-cond should take macros into account)
* genemit.c (gen_exp): Remove -Wduplicated-cond hack.

	* c.opt (Wduplicated-cond): Don't enable by -Wall anymore.

	* c-c++-common/Wduplicated-cond-2.c: Skip until PR67819 is resolved.

From-SVN: r228405
2015-10-02 17:49:15 +00:00
Jonathan Wakely 7b65155f1c PR libstdc++/67747 use readdir instead of readdir_r
PR libstdc++/67747
	* src/filesystem/dir.cc (native_readdir): Remove.
	(_Dir::advance): Use readdir instead of native_readdir.
	(recursive_directory_iterator(const path&, directory_options,
	error_code*)): Use swap instead of reset.

From-SVN: r228404
2015-10-02 17:34:34 +01:00
Aditya Kumar 000051e1c5 reject loops early where ivs cannot be represented
From-SVN: r228403
2015-10-02 16:04:00 +00:00
Sebastian Pop cce7865c1a fix PR67754
From-SVN: r228402
2015-10-02 16:03:54 +00:00
Sebastian Pop 5e4f82ab30 add testcase
From-SVN: r228401
2015-10-02 16:03:48 +00:00
Aditya Kumar 9d85345afa outline functions from stmt_simple_for_scop_p
Outlined functions from stmt_simple_for_scop_p. No functional changes intended.
Passes regtest and bootstrap.

gcc/ChangeLog:

2015-10-01  Aditya Kumar  <hiraditya@msn.com>

        * graphite-scop-detection.c (stmt_has_side_effects): New function
          outlined from stmt_simple_for_scop_p.
        (graphite_can_represent_stmt): Same.
        (stmt_simple_for_scop_p): Moved code out of this function for better
        readability.

From-SVN: r228400
2015-10-02 15:28:23 +00:00
Kirill Yukhin ab91c076b7 AVX-512.
AVX-512. Add missing features to cpuinfo.c
gcc/
	* config/i386/i386.c (processor_features): Add F_AVX512VBMI,
	F_AVX512IFMA.
	(isa_names_table): Handle F_AVX512VBMI and F_AVX512IFMA.
libgcc/
	* config/i386/cpuinfo.c (processor_features): Add
	FEATURE_AVX512VBMI and FEATURE_AVX512VBMI.
testsuite/
	* gcc.target/i386/builtin_target.c: Handle "avx512ifma"
	and "avx512vbmi".

From-SVN: r228399
2015-10-02 15:25:26 +00:00
Ramana Radhakrishnan 33e767e26e [AArch64] Use default_elf_asm_named_section instead of special cased hook
* config/aarch64/aarch64-elf.h (TARGET_ASM_NAMED_SECTION): Delete.

From-SVN: r228397
2015-10-02 15:07:46 +00:00
Vladimir Makarov 599e1cf8b1 re PR rtl-optimization/67756 (ICE compiling Linux Kernel fs/namei.c on ARM)
2015-10-02  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/67756
	* lra-constraints.c (match_reload): Add a new parameter.  Use it
	for creating a pseudo with the same value.
	(curr_insn_transform): Pass a new argument to match_reload.

2015-10-02  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/67756
	* gcc.target/arm/pr67756.c: New.

From-SVN: r228396
2015-10-02 15:04:59 +00:00
Jiong Wang 0ff3ac5f44 [AArch64] Add more TLS local executable testcases
2015-10-02  Jiong Wang  <jiong.wang@arm.com>

	* gcc.target/aarch64/tlsle12_tiny_1.c: New testcase for tiny model.
	* gcc.target/aarch64/tlsle24_tiny_1.c: Likewise.
	* gcc.target/aarch64/tlsle_sizeadj_tiny_1.c: TLS size truncation test
	for tiny model.
	* gcc.target/aarch64/tlsle_sizeadj_small_1.c: TLS size truncation test
	for small model.

From-SVN: r228395
2015-10-02 14:47:34 +00:00
Kirill Yukhin 1edc26adde Update extract_even_odd w/ AVX-512BW insns.
gcc/
	* config/i386/i386.c (expand_vec_perm_even_odd_trunc): New.
	(expand_vec_perm_even_odd_1): Handle V64QImode.
	(ix86_expand_vec_perm_const_1): Try expansion with
	expand_vec_perm_even_odd_trunc as well.
	* config/i386/sse.md (VI124_AVX512F): Rename to ...
	(define_mode_iterator VI124_AVX2_24_AVX512F_1_AVX512BW): This. Extend
	to V54QI.
	(define_mode_iterator VI248_AVX2_8_AVX512F): Rename to ...
	(define_mode_iterator VI248_AVX2_8_AVX512F_24_AVX512BW): This. Extend
	to V32HI and V16SI.
	(define_insn "avx512bw_<code>v32hiv32qi2"): Unhide pattern name.
	(define_expand "vec_pack_trunc_<mode>"): Update iterator name.
	(define_expand "vec_unpacks_lo_<mode>"): Ditto.
	(define_expand "vec_unpacks_hi_<mode>"): Ditto.
	(define_expand "vec_unpacku_lo_<mode>"): Ditto.
	(define_expand "vec_unpacku_hi_<mode>"): Ditto.

gcc/testsuite/
	* gcc.target/i386/vect-pack-trunc-1.c: New test.
	* gcc.target/i386/vect-pack-trunc-2.c: Ditto.
	* gcc.target/i386/vect-perm-even-1.c: Ditto.
	* gcc.target/i386/vect-perm-odd-1.c: Ditto.
	* gcc.target/i386/vect-unpack-1.c: Ditto.
	* gcc.target/i386/vect-unpack-2.c: Ditto.

From-SVN: r228394
2015-10-02 14:36:41 +00:00
Kirill Yukhin bea9065228 invoke.texi: Mention -mavx512vl, -mavx512bw, -mavx512dq, -mavx521vbmi, -mavx512ifma.
gcc/
	* doc/invoke.texi: Mention -mavx512vl, -mavx512bw, -mavx512dq,
	-mavx521vbmi, -mavx512ifma. Add missing opindex-es.

From-SVN: r228393
2015-10-02 14:29:44 +00:00
Jason Merrill 1d4afc04d0 re PR c/59218 (atomic transactions: accesses to volatiles not disallowed in transaction_safe code)
PR c/59218

	* trans-mem.c (volatile_lvalue_p): Rename from volatile_var_p.
	(diagnose_tm_1_op): Also diagnose volatile accesses in
	transaction_safe function.

From-SVN: r228392
2015-10-02 09:44:41 -04:00
Jonathan Wakely 5f62fa6d69 * system.h (malloc.h): Don't include obsolete header.
From-SVN: r228391
2015-10-02 14:30:03 +01:00
Ramana Radhakrishnan 899de23a3c [AArch64] Use default_elf_asm_named_section instead of special cased hook
Hi,

The hook for TARGET_ASM_NAMED_SECTION was defined separately in
the backend around the time frame for GCC 4.7 under the assumption
that '@' would be used as a comment character in the binutils port.

This was indeed true in versions of the AArch64 port that never made it
into the FSF tree. However this practice was killed
before the binutils port made it upstream. Doing archaeology into
various revisions including the first commit of upstream binutils,
talking to Marcus about the history of this and actually testing the
first commit of binutils, I can confidently say that the upstream binutils
port never had any use of '@' as a comment character for AArch64
However we never got rid of the special cased handling in
GCC and the duplication of code in the AArch64 backend.

This was found when I was playing with Virtual Table verification
on ARM and AArch64 and discovered ICEs which were similar but manifested
in different places begging the obvious question.

Tested on aarch64-none-elf with no regressions.

Ok to apply ?

Ramana

2015-10-02  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	* config/aarch64/aarch64.c (aarch64_elf_asm_named_section): Delete.
	(TLS_SECTION_ASM_FLAG): Delete.

From-SVN: r228390
2015-10-02 13:08:43 +00:00
Marek Polacek 3e3b8d63e5 re PR c/64249 (Missing warning for if (A) else if (A))
PR c/64249
	* c-common.c (warn_duplicated_cond_add_or_warn): New function.
	* c-common.h (warn_duplicated_cond_add_or_warn): Declare.
	* c.opt (Wduplicated-cond): New option.

	* c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
	and pass it down to c_parser_if_statement.
	(c_parser_else_body): Add CHAIN parameter and pass it down to
	c_parser_statement_after_labels.
	(c_parser_if_statement): Add CHAIN parameter.  Add code to warn about
	duplicated if-else-if conditions.

	* parser.c (cp_parser_statement): Add CHAIN parameter and pass it
	down to cp_parser_selection_statement.
	(cp_parser_selection_statement): Add CHAIN parameter.  Add code to
	warn about duplicated if-else-if conditions.
	(cp_parser_implicitly_scoped_statement): Add CHAIN parameter and pass
	it down to cp_parser_statement.

	* doc/invoke.texi: Document -Wduplicated-cond.
	* Makefile.in (insn-latencytab.o): Use -Wno-duplicated-cond.
	(insn-dfatab.o): Likewise.
	* genemit.c (gen_exp): Rewrite condition to avoid -Wduplicated-cond
	warning.

	* c-c++-common/Wduplicated-cond-1.c: New test.
	* c-c++-common/Wduplicated-cond-2.c: New test.
	* c-c++-common/Wduplicated-cond-3.c: New test.
	* c-c++-common/Wduplicated-cond-4.c: New test.
	* c-c++-common/Wmisleading-indentation.c (fn_37): Avoid
	-Wduplicated-cond warning.

From-SVN: r228388
2015-10-02 12:56:17 +00:00