PR c/8083
* c-typeck.c (build_c_cast): Warn about type punning which breaks
type based aliasing.
testsuite:
* gcc.dg/alias-1.c: New test.
From-SVN: r57698
* stor-layout.c (update_alignment_for_field): New function.
(place_union_field): Use it.
(place_field): Likewise.
* gcc.dg/empty1.C: New test.
From-SVN: r57697
2002-09-30 Andrew Haley <aph@redhat.com>
* flow.c (insn_dead_p): When using non-call-exceptions, don't
eliminate insns that may trap.
* cse.c (insn_live_p): Likewise.
From-SVN: r57688
* config/mips/mips.c (mips16_strings): New variable.
(mips_output_function_epilogue): Clear the SYMBOL_REF_FLAG of every
symbol in mips16_strings. Free the list.
(mips_encode_section_info): Keep track of local strings.
From-SVN: r57685
* longlong.h: Partially synchronize with GMP-4.1 version:
Use i370 definitions also for s390.
Add generic definition of umul_ppmm in terms of smul_ppmm.
[s390] (umul_ppmm): Remove.
[s390] (smul_ppmm): Fix incorrect assembler constraints.
[s390] (smul_ppmm, sdiv_qrnnd): Rename __xx to __x.
From-SVN: r57670
* config/xtensa/xtensa.h (REG_CLASS_NAMES, REG_CLASS_CONTENTS):
Add new RL_REGS register class.
(PREFERRED_RELOAD_CLASS, PREFERRED_OUTPUT_RELOAD_CLASS):
Call xtensa_preferred_reload_class for both input and output reloads.
* config/xtensa/xtensa.c (xtensa_regno_to_class): Use new RL_REGS class.
(xtensa_preferred_reload_class): Handle output reloads; use RL_REGS
instead of either AR_REGS or GR_REGS classes.
(xtensa_secondary_reload_class): Use new RL_REGS class.
* config/xtensa/xtensa-protos.h (xtensa_preferred_reload_class): Update.
From-SVN: r57666
* pa.c (hppa_encode_label): Don't drop '*' from function labels.
(pa_strip_name_encoding): Strip '@' and '*', in that order.
* pa.h (ASM_OUTPUT_LABELREF): Output user_label_prefix except when
there is a '*' prefix in NAME.
From-SVN: r57664
* store-layout.c (finish_record_layout): Add free_p parameter.
(layout_type): Pass it.
* tree.h (finish_record_layout): Update prototype.
* class.c (walk_subobject_offsets): Correct the calculation of
offsets for virtual bases. Correct the counting of array
elements.
(layout_nonempty_base_or_field): Simplify. Correct the
calculation of offsets to be propagated through the binfo
hierarchy.
(build_base_field): Avoid creating a FIELD_DECL for empty bases.
Add the FIELD_DECL to TYPE_FIELDS.
(build_base_fields): Adjust accordingly.
(layout_virtual_bases): Use build_base_field.
(end_of_class): Return a tree, not an integer.
(warn_about_ambiguous_direct_bases): Rename to ...
(warn_about_ambiguous_bases): ... this.
(include_empty_classes): New function.
(layout_class_type): Create an alternative version of the type to
be used when as a base class type. Do not call
finish_record_layout until we are done laying out the class.
* cp-tree.h (lang_type_class): Remove size, size_unit. Add
as_base.
(CLASSTYPE_SIZE): Reimplement.
(CLASSTYPE_SIZE_UNIT): Likewise.
(CLASSTYPE_ALIGN): Likweise.
(CLASSTYPE_USER_ALIGN): Likewise.
(CLASSTYPE_AS_BASE): New macro.
(DECL_INITIALIZED_P): Likewise.
(extract_init): Remove prototype.
(build_forced_zero_init): Rename to ...
(build_zero_init): ... this.
(force_store_init_value): Remove.
* decl.c (obscure_complex_init): Remove.
(duplicate_decls): Copy DECL_INITIALIZED_P.
(check_initializer): Do not leave junk in DECL_INITIAL.
(cp_finish_decl): Handle zero-initialization of entities with
static storage duration.
* expr.c (extract_init): Remove.
* init.c (build_forced_zero_init): Remove.
(build_zero_init): New function.
(build_default_init): Use it.
(build_field_list): Skip FIELD_DECLs for base subobjects.
(push_base_cleanups): Likewise.
* method.c (do_build_assign_ref): Likewise.
(synthesize_exception_spec): Likewise.
* pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
(regenerate_decl_from_template): To not set DECL_INITIAL for a
static data member whose initialization took place in its class.
(instantiate_decl): Do not pass an initializer to cp_finish_decl
in that situation.
* search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
(dfs_unuse_fields): Likewise.
* tree.c (pod_type_p): Handle error_mark_node.
(zero_init_p): Likewise.
* typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
subobjects.
* typeck2.c (store_init_value): Remove #if 0'd code.
(force_store_init_value): Remove.
(process_init_constructor): Use build_zero_init.
* g++.dg/abi/empty7.C: New test.
* g++.dg/init/pm2.C: Likewise.
From-SVN: r57654
* i386.h (TARGET_CPP_CPU_BUILTINS): Define __SSE_MATH__.
* gcse.c (cprop_jump): Check that the register has not
been modified
(cprop_jump): Likewise.
From-SVN: r57648
* arm.h (BASE_REG_CLASS): Always return LO_REGS for Thumb.
(MODE_BASE_REG_CLASS, case Thumb): Only return BASE_REGS if we know
that we have a SImode access, and only then if reload hasn't completed;
for all other cases, use LO_REGS.
From-SVN: r57644