* varasm.c (initializer_constant_valid_p): Forbid view-conversions
from aggregate to non-aggregate type if the bit pattern is not fully
preserved afterwards.
From-SVN: r140432
2008-09-17 Richard Guenther <rguenther@suse.de>
PR c++/22374
* rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
result to the correct type.
From-SVN: r140427
2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
PR c++/37450
* name-lookup.c (pushdecl_maybe_friend): Don't return the old
parameter for duplicate.
From-SVN: r140425
PR c++/37552
* typeck.c (build_array_ref): Use protected_set_expr_location instead
of SET_EXPR_LOCATION when ret might not be an expression.
* g++.dg/parse/crash49.C: New test.
From-SVN: r140422
PR preprocessor/37324
* lib/target-supports.exp
(check_effective_target_wchar_t_char16_t_compatible,
check_effective_target_wchar_t_char32_t_compatible): New.
* gcc.dg/utf-array.c: Use __CHAR{16,32}_TYPE__ macros in typedefs.
Only require from incompatible errors for char{16,32}_t vs. wchar_t
initializations if those types are indeed incompatible.
From-SVN: r140421
* ipa-reference.c (ipa_obstack): Remove.
(local_info_obstack, global_info_obstack): New.
(add_static_var): We now handle variables only.
(mark_address_taken, mark_load, mark_store): New functions based on ...
(check_operand): ... remove.
(get_asm_stmt_operands): Rename to ...
(check_asm_memory_clobber): ... this. Look only for memory clobber.
(scan_stmt_for_static_refs): Rewrite.
(scan_op_for_static_refs): Rename to ...
(scan_initializer_for_static_refs): do not look for VAR_DECL
initializers; stop recursion on types and decls.
(ipa_init): Use proper obstacks.
(analyze_variable): Use scan_initializer_for_static_refs.
(init_function_info): Use local obstack.
(analyze_function): Simplify.
(add_new_function): We don't need visited_nodes obstack.
(generate_summary): Use proper obstacks; cleanup after propagation.
From-SVN: r140415
2008-09-17 Richard Guenther <rguenther@suse.de>
PR middle-end/37385
PR tree-optimization/37491
* alias.c (get_alias_set): Use the canonical type.
* tree-vect-transform.c (vectorizable_store): Use the type of
the lhs for the vector type. Adjust checking.
(vectorizable_load): Adjust checking.
From-SVN: r140412
PR rtl-optimization/37483
* ifcvt.c (noce_try_sign_mask): Use if_info->test_bb instead of
if_info->insn_b's bb as argument to optimize_bb_for_speed_p.
Rearrange code to better match the original comment. Check
t_unconditional first. Improve comment.
testsuite/
* gcc.c-torture/compile/pr37483.c: New test.
* gcc.c-torture/compile/pr37395.c: New test.
Co-Authored-By: Adam Nemet <anemet@caviumnetworks.com>
From-SVN: r140403
PR c++/37531
* semantics.c (finish_compound_literal): Return error_mark_node if
type is errorneous.
* g++.dg/parse/crash47.C: New test.
From-SVN: r140400
PR testsuite/36889
* lib/fortran-torture.exp (get-fortran-torture-options): Only
set test_tree_vectorize on i?86/x86_64 resp. sparc* if sse2 resp.
ultrasparc hw is available.
From-SVN: r140398
2008-09-16 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/37263
* tree-ssa-loop-ivopts.c (determine_use_iv_cost_condition): Prefer the
eliminate IV if the cost are the same.
From-SVN: r140395
2008-09-16 Richard Guenther <rguenther@suse.de>
PR middle-end/37380
* tree-sra.c (sra_build_assignment): Do not call the gimplifier
if not necessary.
* gcc.c-torture/compile/pr37380.c: New testcase.
From-SVN: r140388
testsuite/
* g++.old-deja/g++.brendan/crash16.C: Function name is the correct
location for an error regarding a function.
* g++.old-deja/g++.other/pmf3.C: Same.
* g++.old-deja/g++.law/ctors5.C: Same.
* g++.old-deja/g++.pt/explicit34.C: Same.
* g++.dg/parse/error28.C: Same.
* g++.dg/parse/error17.C: Same.
* g++.dg/template/friend44.C: Same.
cp/
* decl.c (duplicate_decls): Call error_at.
(grokfndecl): New location argument. Use location if available.
(grokdeclarator): Pass declarator location to grokfndecl.
* cp-tree.h (struct cp_declarator): Update comment for id_loc.
* decl2.c (check_classfn): Use error_at.
* parser.c (cp_parser_init_declarator): Set function_start_locus
to brace location.
(cp_parser_member_declaration): Set id_loc for function declarators.
From-SVN: r140379
* tree-ssa-alias.c (init_alias_info): Call bitmap_obstack_release
in every call starting with the second one, instead of only when
alias_bitmap_obstack.elements != NULL.
From-SVN: r140377
* tree-predcom.c (filter_suitable_components): Free all refs in
act->refs vector before calling release_component.
(add_ref_to_chain): Free ref if not adding it to chain->refs.
* tree-data-ref.c (free_subscripts): Free all subscript objects.
* tree-loop-linear.c (linear_transform_loops): Initialize
lambda_obstack only after calling perfect_loop_nest_depth.
Goto free_and_continue instead of just continue for later failures.
From-SVN: r140376
* MAINTAINERS: Remove John Carr, Steve Chamberlain, Michael Chastain,
Klaus Kaempf, Mumit Khan, Alan Lehotsky, Warren Levy, Don Lindsay,
Dave Love, Alexandre Petit-Bianco, Clinton Popetz, Gavin Romig-Koch,
and Michael Tiemann from Write After Approval since they do not
actually have access.
From-SVN: r140364
PR target/19636
PR target/24894
PR target/31644
PR target/31786
* config/avr/avr.c (legitimate_address_p): Fix problem where subreg
is not recognized as a valid register usage. Allow REG_X to be used
as a base pointer.
* config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Remove code that
forces a reload when using a base register.
From-SVN: r140360
* config/i386/cygming-crtend.c (register_frame_ctor): If
DEFAULT_USE_CXA_ATEXIT, register __gcc_deregister_frame
directly with atexit.
(deregister_frame_ctor): Rename to ...
(deregister_frame_dtor): Use to call __gcc_deregister_frame
if !DEFAULT_USE_CXA_ATEXIT.
From-SVN: r140351