* tree-ssa-loop-ivopts.c (may_be_nonaddressable_p) <VIEW_CONVERT_EXPR>:
Make case self-contained.
<ARRAY_REF>: Test TYPE_NONALIASED_COMPONENT flag.
ada/
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_String_Literal_Subtype>:
Set TYPE_NONALIASED_COMPONENT on the array type.
From-SVN: r144021
2009-02-06 Benjamin Kosnik <bkoz@redhat.com>
* include/std/thread (thread::id): Move definition inside thread.
Use native_handle_type. Remove this_thread::get_id friend.
Change __thread_data_ptr to __shared_base_ptr.
(thread:🆔:id(native_handle_type): Make public. Still explicit.
Use native_handle_type. Change _M_thread_id to _M_thread.
(thread::__thread_data_base): Rename to _Impl_base. Use id, change
_M_thread_handle to _M_id.
(thread::__thread_data): Rename to _Impl.
Fixup for renames.
(thread::_M_make_thread_data): Return derived type.
(thread::hardware_concurrency): Add definition for default case.
(thread::get_id): Now can define inline.
(thread): Change _M_thread_data to _M_data.
(this_thread::get_id): Now can define inline.
* src/thread.cc (__thread_proxy): Rename to
execute_native_thread_routine.
Fixup for other renames.
* testsuite/30_threads/thread/cons/assign_neg.cc: New.
* testsuite/30_threads/thread/cons/copy_neg.cc: New.
* testsuite/30_threads/thread/algorithm: Move to..
* testsuite/30_threads/thread/swap: ...this.
* testsuite/30_threads/thread/member/hardware_concurrency.cc: Add.
* testsuite/30_threads/thread/id/operators.cc: New.
From-SVN: r144007
PR c/35434
* c-common.c (handle_alias_attribute): Disallow attribute for
anything not a FUNCTION_DECL or VAR_DECL.
testsuite:
* gcc.dg/attr-alias-4.c: New test.
From-SVN: r143998
PR c/36432
* c-decl.c (grokdeclarator): Don't treat [] declarators in fields
as indicating flexible array members unless the field itself is
being declarared as the incomplete array.
testsuite:
* gcc.dg/c90-flex-array-2.c, gcc.dg/c99-flex-array-6.c: New tests.
From-SVN: r143989
2009-02-06 Richard Guenther <rguenther@suse.de>
PR middle-end/38977
* tree-cfg.c (need_fake_edge_p): Force a fake edge for
fork because we may expand it as __gcov_fork.
From-SVN: r143982
2009-02-06 Paolo Bonzini <bonzini@gnu.org>
PR tree-optimization/35659
* tree-ssa-sccvn.c (vn_constant_eq, vn_reference_eq, vn_nary_op_eq
vn_phi_eq): Shortcut if hashcode does not match.
(vn_reference_op_compute_hash): Do not call iterative_hash_expr for
NULL operands.
* tree-ssa-pre.c (pre_expr_hash): Look at hashcode if available,
and avoid iterative_hash_expr.
(FOR_EACH_VALUE_ID_IN_SET): New.
(value_id_compare): Remove.
(sorted_array_from_bitmap_set): Use FOR_EACH_VALUE_ID_IN_SET to
sort expressions by value id.
From-SVN: r143980
2009-02-05 Chris Fairles <cfairles@gcc.gnu.org>
* include/std/tuple (_Head_base<>::_Head_base(_UHead&&)): Formatting.
(_Head_base<>::__swap_impl): Rename to _M_swap_impl.
(_Tuple_impl<>::__swap_impl): Likewise and make protected to avoid
exposing it in public std::tuple interface.
From-SVN: r143979
PR c++/39106
* cgraphunit.c (cgraph_function_versioning): Clear also DECL_VIRTUAL_P
on the copied decl.
* g++.dg/opt/thunk3.C: New test.
From-SVN: r143973
2009-02-05 Daniel Berlin <dberlin@dberlin.org>
Richard Guenther <rguenther@suse.de>
PR tree-optimization/39100
* tree-ssa-structalias.c (do_ds_constraint): Actually do what the
comment says and add edges.
Co-Authored-By: Richard Guenther <rguenther@suse.de>
From-SVN: r143951
PR c++/39095
* operators.def: Use COMPONENT_REF code for ->/pt operator again,
remove ./dt operator.
* mangle.c (write_expression): Handle COMPONENT_REF after handling
ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
write_string ("dt") instead of using operators.def.
* g++.dg/abi/mangle31.C: New test.
From-SVN: r143933
PR c/29129
* c-decl.c (grokdeclarator): Mark [*] arrays in field declarators
as having variable size. Do not give an error for unnamed
parameters with [*] declarators. Give a warning for type names
with [*] declarators and mark them as variable size.
* c-parser.c (c_parser_sizeof_expression): Do not give an error
for sizeof applied to [*] type names.
testsuite:
* c90-arraydecl-1.c: Do not expect error for [*] in abstract
declarator.
* vla-6.c: Likewise. Expect warning not error for [*] lexically
inside function prototype but not part of parameter declarator.
* vla-11.c: New test.
From-SVN: r143918
PR c/35433
* c-typeck.c (composite_type): Set TYPE_SIZE and TYPE_SIZE_UNIT
for composite type involving a zero-length array type.
testsuite:
* gcc.dg/init-bad-6.c: New test.
From-SVN: r143906
2009-02-03 Johannes Singler <singler@ira.uka.de>
* include/parallel/algorithmfwd.h:
Add parallelism default for many declarations.
* include/parallel/numericfwd.h: Likewise.
* include/parallel/iterator.h: Use iterator_traits as usual.
* include/parallel/par_loop.h:
Include equally_split.h.
(for_each_template_random_access_ed):
Avoid calling the Result default constructor.
* include/parallel/numeric: Replace
for_each_template_random_access by
for_each_template_random_access_ed in numeric functions.
From-SVN: r143902
PR target/35318
* function.c (match_asm_constraints_1): Skip over
initial optional % in the constraint.
* gcc.c-torture/compile/pr35318.c: New test.
From-SVN: r143901
PR inline-asm/39059
* c-parser.c (c_parser_postfix_expression): If fixed point is not
supported, don't accept FIXED_CSTs.
* c-decl.c (finish_declspecs): Error if fixed point is not supported
and _Sat is used without _Fract/_Accum. Set specs->type to
integer_type_node for cts_fract/cts_accum if fixed point is not
supported.
* parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
* gcc.dg/nofixed-point-2.c: New test.
* g++.dg/ext/fixed1.C: Adjust expected diagnostics.
* g++.dg/ext/fixed2.C: Likewise.
* g++.dg/other/error25.C: Likewise.
* g++.dg/lookup/crash7.C: Likewise.
* g++.dg/cpp0x/decltype-38655.C: Likewise.
From-SVN: r143900
gcc/cp:
2009-02-03 Paolo Bonzini <bonzini@gnu.org>
PR c++/36897
* pt.c (convert_nontype_argument_function): Expect expr to be an
ADDR_EXPR.
PR c++/37314
* typeck.c (merge_types): Call resolve_typename_type if only
one type is a typename.
gcc/testsuite:
2009-02-03 Paolo Bonzini <bonzini@gnu.org>
PR c++/36897
* g++.dg/template/func2.C: New test.
PR c++/37314
* g++.dg/template/typename15.C: New.
* g++.dg/template/typename16.C: New.
From-SVN: r143898