re PR c++/60994 (gcc does not recognize hidden/shadowed enumeration as valid nested-name-specifier)
PR c++/60994
* parser.c (cp_parser_class_name): Add enum_ok parameter.
(cp_parser_qualifying_entity): Use it instead of cp_parser_type_name.
(cp_parser_diagnose_invalid_type_name): Don't assume a template is
a class template.
Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r222094
Marc Glisse [Tue, 14 Apr 2015 11:02:48 +0000 (13:02 +0200)]
re PR libstdc++/61347 (std::distance(list.first(),list.end()) in O(1))
2015-04-14 Marc Glisse <marc.glisse@inria.fr>
PR libstdc++/61347
* include/bits/stl_iterator_base_funcs.h (_List_iterator,
_List_const_iterator): Declare.
(__distance): Declare new overloads for _List_iterator and
_List_const_iterator.
* include/bits/stl_list.h (__distance): New overloads for
_List_iterator and _List_const_iterator.
* testsuite/23_containers/list/61347.cc: New testcase.
predicates.md (any_QIreg_operand): Rename from q_regs_operand.
* config/i386/predicates.md (any_QIreg_operand): Rename from
q_regs_operand. Do not process subregs.
(QIreg_operand): Use QI_REGNO_P predicate.
(ext_QIreg_operand): Ditto.
(ext_register_operand): Ditto.
* config/i386/i386.md (TEST splitters): Use QIreg_operand predicate.
(AND splitters): Ditto.
(AND with -65536 splitter): Add SWI48 mode for operand 0.
(AND with -256 splitter): Use any_QIreg_operand predicate and
SWI248 mode for operand 0.
(AND with -65281 splitter): Use QIreg_operand predicate and SWI248
mode for operand 0.
(SETCC + MOVZBL peepholes): Update for renamed any_QIreg_operand.
Jan Hubicka [Mon, 13 Apr 2015 14:16:41 +0000 (16:16 +0200)]
nonzero-3.C: New testcase.
* g++.dg/tree-ssa/nonzero-3.C: New testcase.
* tree-vrp.c (nonnull_arg_p): THIS pointers and references are non-zero.
(gimple_stmt_nonzero_warnv_p): Reference return values are non-zero.
Jakub Jelinek [Mon, 13 Apr 2015 08:44:56 +0000 (10:44 +0200)]
gcc_release: Fix up thinko in the last commit, improve error message.
* gcc_release: Fix up thinko in the last commit, improve error
message. Commit all ChangeLog, DEV-PHASE and BASE-VER changes
together, rather than doing dozens of separate commits.
Joseph Myers [Sun, 12 Apr 2015 21:35:17 +0000 (22:35 +0100)]
Don't enable -fprefetch-loop-arrays for TARGET_SOFTWARE_PREFETCHING_BENEFICIAL if -Os.
Testing an x86_64 toolchain configured for a processor with
TARGET_SOFTWARE_PREFETCHING_BENEFICIAL produces failures
FAIL: g++.dg/pr60518.C -std=gnu++98 (test for excess errors)
FAIL: g++.dg/pr60518.C -std=gnu++11 (test for excess errors)
FAIL: g++.dg/pr60518.C -std=gnu++14 (test for excess errors)
where the failure is from the message "pr60518.C:1:0: warning:
-fprefetch-loop-arrays is not supported with -Os".
Given that lack of support, it seems appropriate for the back end not
to enable this option in the -Os case; this patch implements that.
Bootstrapped with no regressions on x86_64-unknown-linux-gnu; tested
for a cross to x86_64-linux-gnu --with-arch=btver2, where those test
failures duly disappear.
* config/i386/i386.c (ix86_option_override_internal): Don't set
-fprefetch-loop-arrays if optimizing for size.
Jakub Jelinek [Sun, 12 Apr 2015 20:49:37 +0000 (22:49 +0200)]
gcc_release: For RELEASE_MAJOR 5+ only use the major number in branch name.
* gcc_release: For RELEASE_MAJOR 5+ only use the major
number in branch name. When doing final release of 5+,
if BASE-VER doesn't match release, but is *.*.1 for the
one smaller minor version, bump BASE-VER.
Jakub Jelinek [Sun, 12 Apr 2015 19:30:51 +0000 (21:30 +0200)]
re PR middle-end/65747 (ICE (in compare_ssa_name, at ipa-icf-gimple.c:134) on x86_64-linux-gnu)
PR tree-optimization/65747
* ipa-icf-gimple.c (func_checker::compare_operand): Use compare_operand
rather than compare_ssa_name for OBJ_TYPE_REF_OBJECT.
Jakub Jelinek [Sun, 12 Apr 2015 19:10:58 +0000 (21:10 +0200)]
re PR c++/65736 (ICE (in process_init_constructor_array, at cp/typeck2.c:1263))
PR c++/65736
* constexpr.c (cxx_eval_pointer_plus_expression): Don't fold for VLAs,
don't fold if op01 isn't divisible by TYPE_SIZE_UNIT. Convert
the expression to the original type at the end.
Jan Hubicka [Sun, 12 Apr 2015 05:44:52 +0000 (07:44 +0200)]
re PR middle-end/65743 (LTO+FDO build of Firefox crashes at startup)
PR ipa/65743
* ipa-inline-transform.c (speculation_removed): Remove static var.
(check_speculations): New function.
(clone_inlined_nodes): Do not check spculations.
(inline_call): Call check_speculations.
* ipa-prop.c (ipa_make_edge_direct_to_target): Do not
consider non-invariants.
Jan Hubicka [Sun, 12 Apr 2015 01:08:04 +0000 (03:08 +0200)]
Jan Hubicka <hubicka@ucw.cz>
Martin Liska <mliska@suse.cz>
PR ipa/65722
* g++.dg/ipa/pr65722.C: New testcase.
* ipa-icf.c (sem_item::compare_cgraph_references): function and
variable can not match.
(sem_item::update_hash_by_addr_refs): Fix handling of virtual tables.
(sem_variable::equals_wpa): Fix checking of DECL_FINAL_P patch.
Co-Authored-By: Martin Liska <mliska@suse.cz>
From-SVN: r222015
Jakub Jelinek [Sat, 11 Apr 2015 17:32:54 +0000 (19:32 +0200)]
re PR middle-end/65735 (ICE (in duplicate_thread_path, at tree-ssa-threadupdate.c))
PR tree-optimization/65735
* tree-ssa-threadedge.c (fsm_find_control_statement_thread_paths):
Remove visited_phis argument, add visited_bbs, avoid recursing into the
same bb rather than just into the same phi node.
(thread_through_normal_block): Adjust caller.
Mikael Morin [Fri, 10 Apr 2015 11:29:53 +0000 (11:29 +0000)]
re PR fortran/56674 (ICE in check_sym_interfaces)
PR fortran/56674
PR fortran/58813
PR fortran/59016
PR fortran/59024
fortran/
* symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
former to the latter and make it non-static. Update callers.
* gfortran.h (gfc_save_symbol_data): New prototype.
* decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
before modifying symbols 'sym' and 'dt_sym'.
testsuite/
* gfortran.dg/used_types_27.f90: New.
Jonathan Wakely [Fri, 10 Apr 2015 08:59:54 +0000 (09:59 +0100)]
shared_mutex (shared_timed_mutex): Add comments to explain the logic in the non-pthread_rwlock_t version.
* include/std/shared_mutex (shared_timed_mutex): Add comments to
explain the logic in the non-pthread_rwlock_t version.
(_Mutex): Remove redundant type.
(_M_n_readers): Rename to _S_max_readers.
(_M_write_entered, _M_readers): New convenience functions.
(lock, lock_shared, try_lock_shared, unlock_shared): Use convenience
functions. Use predicates with condition variables. Simplify bitwise
operations.
(try_lock_for, try_shared_lock_for): Convert duration to time_point
and call try_lock_until or try_shared_lock_until respectively.
(try_lock_until, try_shared_lock_until): Wait on the condition
variables until the specified time passes.
(unlock): Add Debug Mode assertion.
(unlock_shared): Add Debug Mode assertion.
* testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: New.
Jakub Jelinek [Fri, 10 Apr 2015 06:43:52 +0000 (08:43 +0200)]
re PR target/65351 (libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.)
PR target/65351
config/
* mh-darwin: Only apply -mdynamic-no-pic for m32 Darwin when the compiler in
use supports -mno-dynamic-no-pic.
* picflag.m4: Only append -mno-dynamic-no-pic for Darwin when -mdynamic-no-pic
is present in CFLAGS.
re PR target/65710 (Thumb1 ICE caused by no register to spill)
2015-04-09 Vladimir Makarov <vmakarov@redhat.com>
PR target/65710
* lra-int.h (lra_bad_spill_regno_start): New.
* lra.c (lra_bad_spill_regno_start): New.
(lra): Set up lra_bad_spill_regno_start. Set up
lra_constraint_new_regno_start unconditionally.
* lra-assigns.c (spill_for): Use lra_bad_spill_regno_start for
spill preferences.
Jonathan Wakely [Thu, 9 Apr 2015 11:15:44 +0000 (12:15 +0100)]
re PR libstdc++/65147 (alignment of std::atomic object is not correct)
2015-04-09 Jonathan Wakely <jwakely@redhat.com>
Richard Henderson <rth@redhat.com>
PR libstdc++/65147
* include/bits/atomic_base.h (__atomic_base<_ITp>): Increase
alignment.
* include/std/atomic (atomic): For types with a power of two size set
alignment to at least the size.
* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error line number.
* testsuite/29_atomics/atomic/65147.cc: New.
* testsuite/29_atomics/atomic_integral/65147.cc: New.
Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r221945